Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConfig ¶
type APIConfig struct { // LogLevel is INFO, DEBUG or ERROR. LogLevel string `default:"INFO"` // Port is the port number the API listen on. Port int16 `default:"3000"` // Token is the access token. Token string `required:"true"` }
APIConfig represents the configuration of the application.
func LoadAPIConfigFromEnv ¶
LoadAPIConfigFromEnv loads the application configuration from environment variables.
type DBConfig ¶
type DBConfig struct { // UserName is the user name of the database. UserName string `required:"true"` // Password is the database's password. Password string `required:"true"` // Host is the database's host. Host string `required:"true"` // Port is the port number the database listen on. Port int16 `required:"true"` // Name is the database name. Name string `required:"true"` // Protocol is the protocol of the connection. Protocol string `default:"tcp"` }
DBConfig represents the database configuration.
func LoadDBConfigFromEnv ¶
LoadDBConfigFromEnv loads the database configuration from environment variables.
func (*DBConfig) GetDataSourceName ¶
GetDataSourceName returns the driver-specific data source name.
Click to show internal directories.
Click to hide internal directories.