Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// RequestStruct is a struct to store the fields of request
// paramemters, passed as JSON from the client.
RequestStruct interface{}
}
Handler handles a single API endpoint
type RequestParams ¶
type RequestParams interface {
// HandleRequest is called when a request comes in. POST body will
// be decoded into the receiver; returned value will be encoded to
// JSON before responding to the client.
// FIXME: pre-define errors for appropriate HTTP codes (404, 500) ...
HandleRequest() (interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.