Documentation ¶
Index ¶
- Constants
- func ErrorResponse(statusCode, errorCode int, message string, w http.ResponseWriter)
- func Logger(next httprouter.Handle) httprouter.Handle
- func SuccessResponse(response *Response, w http.ResponseWriter)
- type API
- type GetByIDController
- type GetController
- type PostController
- type Request
- type Response
Constants ¶
View Source
const ( GET = "GET" POST = "POST" PUT = "PUT" DELETE = "DELETE" HEAD = "HEAD" PATCH = "PATCH" )
Available Methods
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(statusCode, errorCode int, message string, w http.ResponseWriter)
ErrorResponse TO-DO
func Logger ¶
func Logger(next httprouter.Handle) httprouter.Handle
Logger is a middleware that logs request method, request uri and processing time.
func SuccessResponse ¶
func SuccessResponse(response *Response, w http.ResponseWriter)
SuccessResponse TO-DO
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API TO-DO
func (*API) NewEndpoint ¶
NewEndpoint TO-DO
func (*API) NewEndpointGroup ¶
NewEndpointGroup TO-DO
func (*API) Use ¶
func (api *API) Use(middleware func(next httprouter.Handle) httprouter.Handle)
Use TO-DO
type GetByIDController ¶
GetByIDController TO-DO
type PostController ¶
PostController TO-DO
Click to show internal directories.
Click to hide internal directories.