Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrInternalServerError ¶
ErrInternalServerError error
Types ¶
type CollectionResponse ¶
type CollectionResponse struct { Documents []map[string]interface{} `json:"documents"` // contains filtered or unexported fields }
CollectionResponse returns a collection of documents
func (*CollectionResponse) Render ¶
func (res *CollectionResponse) Render(w http.ResponseWriter, r *http.Request) error
Render is called before the response is written
type ErrResponse ¶
type ErrResponse struct { Err error `json:"-"` // low-level runtime error HTTPStatusCode int `json:"statusCode"` // http response status code StatusText string `json:"status"` // user-level status message AppCode int64 `json:"code,omitempty"` // application-specific error code ErrorText string `json:"error,omitempty"` // application-level error message, for debugging Fields interface{} `json:"fields,omitempty"` // field validation errors }
ErrResponse response
func (*ErrResponse) Render ¶
func (e *ErrResponse) Render(w http.ResponseWriter, r *http.Request) error
Render runs before response is written
type JSONResponse ¶
type JSONResponse struct { Document *map[string]interface{} `json:"document"` // contains filtered or unexported fields }
JSONResponse is the response payload
func (*JSONResponse) Render ¶
func (res *JSONResponse) Render(w http.ResponseWriter, r *http.Request) error
Render is called before the response is written
Click to show internal directories.
Click to hide internal directories.