Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPAPIError ¶
type HTTPAPIError struct {
Msg string
}
HTTPAPIError is returned when an API method fails. It wraps the error message.
type HTTPAPIResponse ¶
type HTTPAPIResponse struct { ServerID string // the original type is ResponseType. Here we want the mnemonic string to // return in the HTTP API response. Type string Data interface{} Error *string }
HTTPAPIResponse is returned when an API method succeeds. It wraps the content of an api.Response and reworks some of its fields
func NewHTTPAPIResponse ¶
func NewHTTPAPIResponse(r *api.Response) *HTTPAPIResponse
NewHTTPAPIResponse returns an HTTPAPIResponse from an api.Response object. In case of errors, some fields are set accordingly.
type HTTPListener ¶
type HTTPListener struct {
// contains filtered or unexported fields
}
HTTPListener implements the api.Listener interface.
func NewHTTPListener ¶
func NewHTTPListener(listenAddr string) *HTTPListener
Click to show internal directories.
Click to hide internal directories.