Documentation ¶
Index ¶
- type Column
- type HTTPError
- type Response
- func NewDetectLangResponse(lang string, langType enry.Type) *Response
- func NewEmptyResponse() *Response
- func NewLanguagesResponse(langs []service.Language) *Response
- func NewParseResponse(resp *service.ParseResponse) *Response
- func NewQueryResponse(rows []map[string]interface{}, columnNames, columnTypes []string, ...) *Response
- func NewSchemaResponse(tables map[string][]Column) *Response
- func NewVersionResponse(version, bblfshVersion, gitbaseVersion string) *Response
- func UASTFilterResponse(resp nodes.Array) *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 NewDetectLangResponse ¶ added in v0.0.7
NewDetectLangResponse returns a Response with detected language
func NewEmptyResponse ¶
func NewEmptyResponse() *Response
NewEmptyResponse returns an empty Response
func NewLanguagesResponse ¶ added in v0.0.7
NewLanguagesResponse returns Response with a list of languages
func NewParseResponse ¶ added in v0.0.3
func NewParseResponse(resp *service.ParseResponse) *Response
NewParseResponse returns a Response with UAST
func NewQueryResponse ¶
func NewQueryResponse( rows []map[string]interface{}, columnNames, columnTypes []string, limitSet bool, limit int, ) *Response
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
func UASTFilterResponse ¶ added in v0.0.9
UASTFilterResponse return a Response with UAST search results