Documentation
¶
Index ¶
- type Column
- type HTTPError
- type Response
- func NewEmptyResponse() *Response
- func NewParseResponse(resp *protocol.ParseResponse) *Response
- func NewQueryResponse(rows []map[string]interface{}, columnNames, columnTypes []string) *Response
- func NewSchemaResponse(tables map[string][]Column) *Response
- func NewVersionResponse(version string) *Response
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPError ¶
HTTPError defines an Error message as it will be written in the http.Response
func NewHTTPError ¶
NewHTTPError returns an Error
type Response ¶
type Response struct { Status int `json:"status"` Data interface{} `json:"data,omitempty"` Meta interface{} `json:"meta,omitempty"` Errors []HTTPError `json:"errors,omitempty"` }
Response encapsulate the content of an http.Response
func NewEmptyResponse ¶
func NewEmptyResponse() *Response
NewEmptyResponse returns an empty Response
func NewParseResponse ¶ added in v0.0.3
func NewParseResponse(resp *protocol.ParseResponse) *Response
NewParseResponse returns a Response with UAST
func NewQueryResponse ¶
NewQueryResponse returns a Response with table headers and row contents
func NewSchemaResponse ¶ added in v0.0.3
NewSchemaResponse returns a Response with tables schema
func NewVersionResponse ¶
NewVersionResponse returns a Response with current version of the server
Click to show internal directories.
Click to hide internal directories.