Documentation ¶
Index ¶
- Variables
- type RequestHandlerFunction
- type Server
- func (s *Server) Get(path string, f func(w http.ResponseWriter, r *http.Request))
- func (s *Server) Health(path string, f func(w http.ResponseWriter, r *http.Request))
- func (s *Server) Initialize()
- func (s *Server) Post(path string, f func(w http.ResponseWriter, r *http.Request))
- func (s *Server) Run(addr string)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAccept = errors.New("accept header must be application/json; charset=utf-8")
ErrAccept accept error
View Source
var ErrContentType = errors.New("Content-Type header must be application/json; charset=utf-8")
ErrContentType content type error
Functions ¶
This section is empty.
Types ¶
type RequestHandlerFunction ¶
type RequestHandlerFunction func(db repositories.Executor, w http.ResponseWriter, r *http.Request)
RequestHandlerFunction is the function to call any handle
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the whole service
Click to show internal directories.
Click to hide internal directories.