conf

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	API struct {
		Host string
		Port int `envconfig:"PORT" default:"8080"`
	}
	JWT JWTConfiguration `json:"jwt"`
}

Configuration holds configuration struct

func Load

func Load(filename string) (*Configuration, error)

Load loads configuration

type JWTConfiguration

type JWTConfiguration struct {
	Secret string        `json:"secret" required:"true"`
	Exp    time.Duration `json:"exp" required:"true" default:"3600s"`
}

JWTConfiguration holds all the JWT related configuration

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL