Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeResponse ¶
func EncodeResponse(rw http.ResponseWriter, statusCode int, data interface{}) error
EncodeResponse encodes response in json.
func HandleErrorResponse ¶
func HandleErrorResponse(w http.ResponseWriter, err error)
HandleErrorResponse handles err from daemon side and constructs response for client side.
Types ¶
type HandlerSpec ¶
HandlerSpec is used to describe a HTTP API.
func NewHandlerSpec ¶
func NewHandlerSpec(method, path string, handler Handler) *HandlerSpec
NewHandlerSpec constructs a brand new HandlerSpec.
Click to show internal directories.
Click to hide internal directories.