Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // NotFound - Basic 404 response NotFound = &Error{ Message: "Resource not found", Code: http.StatusNotFound, } // Unprocessable - 422 response type Unprocessable = &Error{ Message: "Entity unprocessable", Code: 422, } )
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Data interface{} `json:"data"` Meta map[string]interface{} `json:"_meta"` }
Response - Http response
type ThingHandler ¶
type ThingHandler struct {
// contains filtered or unexported fields
}
ThingHandler - accepts ThingRepository as arg
func NewThingHandler ¶
func NewThingHandler(datastore *models.ThingRepository) *ThingHandler
NewThingHandler - Creates new instance of ThingHandler
Click to show internal directories.
Click to hide internal directories.