Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ServeAddress string `default:":3333" split_words:"true"`
}
Config - hello app configs
type Context ¶
type Context struct {
Config *Config
}
Context - is struct containing all needed things to handle requests it also contains config and may contain connection objects to databases
func GetContext ¶
GetContext - returns new context based on config in real apps this method will try to connect to databases and configure other dependent services
func (*Context) HelloHandler ¶
func (ctx *Context) HelloHandler(w http.ResponseWriter, r *http.Request)
HelloHandler - simple http handler
func (*Context) LivenessHealthcheckHandler ¶
func (ctx *Context) LivenessHealthcheckHandler(w http.ResponseWriter, r *http.Request)
LivenessHealthcheckHandler - dumb healthcheck method
func (*Context) ReadinessHealthcheckHandler ¶
func (ctx *Context) ReadinessHealthcheckHandler(w http.ResponseWriter, r *http.Request)
ReadinessHealthcheckHandler - dumb healthcheck method
Click to show internal directories.
Click to hide internal directories.