Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Debug bool Production bool DBConfigurationFile string AgnuDBConfigurationFile string DBConfiguration *DBConfiguration AgnuDBConfiguration *DBConfiguration JwtSecret string // contains filtered or unexported fields }
Config for the environment, read from a json file
func NewInitialConfig ¶
NewInitialConfig reads configuration from json file and validates it
type ConfigBase ¶
type ConfigBase struct{}
func (*ConfigBase) ReadConfigurationFile ¶
func (cfg *ConfigBase) ReadConfigurationFile(fileName string) ([]byte, error)
type DBConfiguration ¶
type DBConfiguration struct { DBName string `json:"dbname,omitempty"` Engine string `json:"engine,omitempty"` Host string `json:"host,omitempty"` Port int `json:"port,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
func (*DBConfiguration) GetDSN ¶
func (cfg *DBConfiguration) GetDSN() (string, error)
func (*DBConfiguration) Validate ¶
func (cfg *DBConfiguration) Validate() error
Click to show internal directories.
Click to hide internal directories.