Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ErrorResponse ¶
type ErrorResponse struct { Code string `json:"code"` Message string `json:"message"` Fields []*FieldError `json:"fields"` }
ErrorResponse represents the default error response
type FieldError ¶
FieldError represents error message for each field
type Responder ¶
type Responder struct { }
Responder represents the http responder interface
func (*Responder) Error ¶
func (r *Responder) Error(w http.ResponseWriter, status int, err error)
Error writes error http response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the http server that handles the requests
func NewServer ¶
func NewServer( userService user.ServiceInterface, characterService character.ServiceInterface, dataManager *data.Manager, config *config.Config, utility *util.Utility, httpManager *hosts.HTTPManager, ) *Server
NewServer creates a new http server
Click to show internal directories.
Click to hide internal directories.