Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigDecoderOptions ¶
func ConfigDecoderOptions(config *mapstructure.DecoderConfig)
ConfigDecoderOptions enables necessary mapstructure decode hook functions
func ErrToStatus ¶
ErrToStatus gets the HTTP statuscode for an error
func JSONErrResponse ¶
func JSONErrResponse(w http.ResponseWriter, err error, statusCode int)
JSONErrResponse Sends an `error` as a JSON object with a `message` property
func JSONResponse ¶
func JSONResponse(w http.ResponseWriter, v interface{}, statusCode int)
JSONResponse Sends a JSON payload in response to a HTTP request
Types ¶
type Config ¶
type Config struct { LogLevel log.Level `mapstructure:"log_level"` HTTP struct { ListenAddress string `mapstructure:"listen_address"` } }
Config defines octolxd's configuration
Click to show internal directories.
Click to hide internal directories.