dimension

package
v2.260.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 13 Imported by: 2

Documentation

Overview

Package dimension provides an HTTP client for the Cantabular Dimension API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area added in v2.124.0

type Area struct {
	ID       string `json:"id"`
	Label    string `json:"label"`
	AreaType string `json:"area_type"`
}

Area is an area model with ID and Label

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a Cantabular Dimension API client

func NewClient

func NewClient(dimensionsAPIURL string) (*Client, error)

NewClient creates a new instance of Client with a given Dimensions API URL

func NewWithHealthClient

func NewWithHealthClient(hcCli *health.Client) (*Client, error)

NewWithHealthClient creates a new instance of Client, reusing the URL and Clienter from the provided health check client

func (*Client) Checker

func (c *Client) Checker(ctx context.Context, check *healthcheck.CheckState) error

Checker calls recipe api health endpoint and returns a check object to the caller

type ErrorResp

type ErrorResp struct {
	Errors []string `json:"errors"`
}

ErrorResp represents an error response containing a list of errors

func (ErrorResp) Error

func (e ErrorResp) Error() string

type GetAreasInput added in v2.124.0

type GetAreasInput struct {
	UserAuthToken    string
	ServiceAuthToken string
	DatasetID        string
	AreaTypeID       string
	Text             string
}

type GetAreasResponse added in v2.124.0

type GetAreasResponse struct {
	Areas []Area `json:"areas"`
}

GetAreasResponse is the response object for GET /areas

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL