Documentation ¶
Index ¶
- func FuncGetLogLevel()
- func FuncLogin()
- func FuncSetLogLevel()
- func IsAlive(w http.ResponseWriter, r *http.Request)
- func NotImplemented(w http.ResponseWriter, r *http.Request)
- func ParseDuration(dStr string) (time.Duration, error)
- func ParseInt(tStr string) (int, error)
- func ParseTime(tStr string) (time.Time, error)
- func QueryParamToOptionnalBool(r *http.Request, name string, orDefault bool) (bool, error)
- func QueryParamToOptionnalDuration(r *http.Request, name string, orDefault time.Duration) (time.Duration, error)
- func QueryParamToOptionnalInt64(r *http.Request, name string, orDefault int64) (int64, error)
- func QueryParamToOptionnalKeyValues(r *http.Request, name string, orDefault map[string]string) (map[string]string, error)
- func QueryParamToOptionnalTime(r *http.Request, name string, orDefault time.Time) (time.Time, error)
- func QueryParamToTime(r *http.Request, name string) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FuncGetLogLevel ¶
func FuncGetLogLevel()
FuncGetLogLevel godoc (only for swagger doc) @Summary Get Log Level @Description Get current logging level @Tags Logs @Produce json @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /log_level [get]
func FuncLogin ¶
func FuncLogin()
FuncLogin godoc (only for swagger doc) @Summary Login @Description Authenticate using basic auth @Description Example : @Description <pre>{"login":"myuser","password":"mypassword"}</pre> @Tags Security @Produce json @Param job body interface{} true "Credentials (json)" @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /login [post]
func FuncSetLogLevel ¶
func FuncSetLogLevel()
FuncSetLogLevel godoc (only for swagger doc) @Summary Set Log Level @Description Set logging level @Description Example : @Description <pre>{"level":"info"}</pre> @Tags Logs @Consumme json @Produce json @Param level body interface{} true "Level (json)" @Security Bearer @Success 200 "Status OK" @Failure 400 "Status Bad Request" @Router /log_level [put]
func IsAlive ¶
func IsAlive(w http.ResponseWriter, r *http.Request)
IsAlive godoc @Summary Check if alive @Description allows to check if the API is alive @Tags System @Success 200 "Status OK" @Router /isalive [get]
func NotImplemented ¶
func NotImplemented(w http.ResponseWriter, r *http.Request)
NotImplemented returns a basic message "Not Implemented" when called, and should be use a filler for future handler
func ParseDuration ¶
ParseDuration try to parse a string as an int or returns 0
func QueryParamToOptionnalKeyValues ¶
func QueryParamToOptionnalKeyValues(r *http.Request, name string, orDefault map[string]string) (map[string]string, error)
QueryParamToOptionnalKeyValues parse multiple key:value entries separated by commas from a string
Types ¶
This section is empty.