Documentation
¶
Index ¶
Constants ¶
View Source
const ( //ContentTypeJSON represents JSON content type ContentTypeJSON = "application/json; charset=UTF-8" //ContentTypeXML represents XML content type ContentTypeXML = "application/xml; charset=UTF-8" //ContentTypeYaml represents yaml ContentTypeYaml = "application/x-yaml" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthReport ¶
type HealthReport struct {
Status string `json:"status" yaml:"status"`
}
HealthReport represents a health report
type Payload ¶
type Payload interface { RequestReader ResponseReadWriter }
Payload represents an generic interface to read and write data from HTTP Request or Response
type RequestReader ¶
type RequestReader interface {
ReadRequest(contentType string, data interface{}, r *http.Request) error
}
RequestReader represents a generic interface to read from HTTP Request
type ResponseReadWriter ¶
type ResponseReadWriter interface { WriteResponse(contentType string, status int, data interface{}, w http.ResponseWriter) ReadResponse(contentType string, data interface{}, response *http.Response) error }
ResponseReadWriter represents a generic interface to read from and write to HTTP Response
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
Route defines an http route
Click to show internal directories.
Click to hide internal directories.