Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInternalServer = &Error{ Status: http.StatusInternalServerError, Code: "INTERNAL_SERVER_ERROR", Desc: "Internal Server Error", }
ErrInternalServer is the default err for server side failures
Functions ¶
Types ¶
type Error ¶
type Error struct {
// Status is the http status. This should be >= 400.
Status int `json:"-"`
// Code is the error code that will be printed in the json response
Code string `json:"code"`
// Description is the error description that will be printed in the json response
Desc string `json:"description"`
}
Error represents an HTTP Error
type Router ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the server instance
type ServerOption ¶
ServerOption customizes the Server
func WithServerPort ¶
func WithServerPort(port int) ServerOption
WithServerPort sets the server port to the given port
Click to show internal directories.
Click to hide internal directories.