Documentation ¶
Index ¶
- type Config
- type HTTP
- type Handlers
- func (h *Handlers) CreateUser(w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) CreateUserNote(w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) Health(w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) HelloWorld(w http.ResponseWriter, r *http.Request) error
- func (h *Handlers) ReadUserByEmail(w http.ResponseWriter, r *http.Request) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Host string Port uint16 ReadTimeout time.Duration WriteTimeout time.Duration DialTimeout time.Duration TemplatesBasePath string EnableAccessLog bool }
Config holds all the configuration required to start the HTTP server
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func NewService ¶
NewService returns an instance of HTTP with all its dependencies set
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers struct has all the dependencies required for HTTP handlers
func (*Handlers) CreateUser ¶
CreateUser is the HTTP handler to create a new user This handler does not use any framework, instead just the standard library
func (*Handlers) CreateUserNote ¶
func (*Handlers) Health ¶
Health is the HTTP handler to return the status of the app including the version, and other details This handler uses webgo to respond to the http request
func (*Handlers) HelloWorld ¶
HelloWorld is a helloworld HTTP handler
func (*Handlers) ReadUserByEmail ¶
ReadUserByEmail is the HTTP handler to read an existing user by email
Click to show internal directories.
Click to hide internal directories.