Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Env = Config{}
Functions ¶
Types ¶
type Config ¶
type Config struct {
DB DB `mapstructure:"db"`
Token Token `mapstructure:"token"`
Server Server `mapstructure:"server"`
}
Config contains all envs loaded from config file.
type DB ¶
type DB struct {
Type string `mapstructure:"type"`
User string `mapstructure:"user"`
Password string `mapstructure:"password"`
Proto string `mapstructure:"protocol"`
Addr string `mapstructure:"address"`
Schema string `mapstructure:"schema"`
Params string `mapstructure:"params"`
Migrations string `mapstructure:"migrations"`
}
DB contains database-related envs.
type Token ¶
type Token struct {
AccessDuration int `mapstructure:"accessDuration"`
RefreshDuration int `mapstructure:"refreshDuration"`
PrivatePEM string `mapstructure:"privatePem"`
PublicPEM string `mapstructure:"publicPem"`
PrivateKey crypto.PrivateKey
PublicKey crypto.PublicKey
Issuer string `mapstructure:"issuer"`
}
Token contains token-related envs.
Click to show internal directories.
Click to hide internal directories.