Documentation ¶
Index ¶
- func GetDB() (*sql.DB, error)
- func IsAuthorized(endpoint func(http.ResponseWriter, *http.Request, httprouter.Params)) httprouter.Handle
- func IsBasicAuthAuthorized(endpoint func(http.ResponseWriter, *http.Request, httprouter.Params)) httprouter.Handle
- func JSONError(w http.ResponseWriter, err interface{}, code int)
- func NoCache(w http.ResponseWriter)
- func ServeJSON(w http.ResponseWriter, o interface{})
- func ViperEnvVariable(key string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsAuthorized ¶
func IsAuthorized(endpoint func(http.ResponseWriter, *http.Request, httprouter.Params)) httprouter.Handle
func IsBasicAuthAuthorized ¶
func IsBasicAuthAuthorized(endpoint func(http.ResponseWriter, *http.Request, httprouter.Params)) httprouter.Handle
func JSONError ¶
func JSONError(w http.ResponseWriter, err interface{}, code int)
func NoCache ¶
func NoCache(w http.ResponseWriter)
func ServeJSON ¶
func ServeJSON(w http.ResponseWriter, o interface{})
func ViperEnvVariable ¶
use viper package to read .env file return the value of the key
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.