Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Server struct { ListenAddr string `default:""` Port int `default:"80"` ResponseHeaders map[string]string } Database struct { Dbname string `default:""` Connection string `default:""` } GinMode struct { Mode string `default:"Debug"` } }
Configuration is stuff that can be configured externally per env variables or config file (config.yml).
func Get ¶
func Get() *Configuration
Get returns the configuration extracted from env variables or config file.
type Error ¶
type Error struct { // The general error message // // required: true // example: Unauthorized Error string `json:"error"` // The http error code. // // required: true // example: 401 ErrorCode int `json:"errorCode"` // The http error code. // // required: true // example: you need to provide a valid access token or user credentials to access this api ErrorDescription string `json:"errorDescription"` }
Error: The Error contains error relevant information.
Click to show internal directories.
Click to hide internal directories.