Documentation ¶
Index ¶
Constants ¶
const ( Service = "cantabularMetadata" SoftwareVersion = "v10" )
Cantabular service names
const QueryDefaultClassification = `` /* 170-byte string literal not displayed */
QueryDefaultClassification is the graphQL query to determine which of the provided variables is the default categorisation
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the client for interacting with the Cantabular API
func (*Client) Checker ¶
func (c *Client) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker contacts the /graphql endpoint with an empty query and updates the healthcheck state accordingly.
func (*Client) GetDefaultClassification ¶
func (c *Client) GetDefaultClassification(ctx context.Context, req GetDefaultClassificationRequest) (*GetDefaultClassificationResponse, error)
func (*Client) StatusCode ¶
StatusCode provides a callback function whereby users can check a returned error for an embedded HTTP status code
type ErrorResponse ¶
type ErrorResponse struct {
Message string `json:"message"`
}
ErrorResponse models the error response from cantabular
type GQLError ¶
type GQLError struct { Message string `json:"message"` Locations []Location `json:"locations"` Path []string `json:"path"` }
func (*GQLError) StatusCode ¶
StatusCode returns the status code defined at the begining of the Error message. For example: a status 404 is extracted from '404 Not Found: dataset not loaded in this server'. If no status code is provided, then a value of 502 bad gateway is returned.
type GetDefaultClassificationResponse ¶
type GetDefaultClassificationResponse struct {
Variables []string
}
type Meta ¶
type Meta struct {
DefaultClassificationFlag string `json:"Default_Classification_Flag"`
}