Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- func (cli *Client) Checker(ctx context.Context, check *health.CheckState) error
- func (cli *Client) CreateIndex(ctx context.Context, options Options) (*models.CreateIndexResponse, apiError.Error)
- func (cli *Client) GetReleaseCalendarEntries(ctx context.Context, options Options) (*transformer.SearchReleaseResponse, apiError.Error)
- func (cli *Client) GetSearch(ctx context.Context, options Options) (*models.SearchResponse, apiError.Error)
- func (cli *Client) Health() *healthcheck.Client
- func (cli *Client) PostSearchURIs(ctx context.Context, options Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error)
- func (cli *Client) URL() string
- type Clienter
- type Options
- func (o *Options) CDIDs(val string) *Options
- func (o *Options) Census(val string) *Options
- func (o *Options) ContentType(val string) *Options
- func (o *Options) DatasetIDs(val string) *Options
- func (o *Options) Dimensions(val string) *Options
- func (o *Options) Highlight(val string) *Options
- func (o *Options) Limit(val string) *Options
- func (o *Options) NLPWeighting(val string) *Options
- func (o *Options) Offset(val string) *Options
- func (o *Options) PopulationTypes(val string) *Options
- func (o *Options) Q(val string) *Options
- func (o *Options) Sort(val string) *Options
- func (o *Options) SubtypeConfirmed(val string) *Options
- func (o *Options) SubtypePostponed(val string) *Options
- func (o *Options) SubtypeProvisional(val string) *Options
- func (o *Options) Topics(val string) *Options
- func (o *Options) URIPrefix(val string) *Options
- type ResponseInfo
Constants ¶
const ( // List of available headers Authorization string = request.AuthHeaderKey CollectionID string = request.CollectionIDHeaderKey FlorenceToken string = request.FlorenceHeaderKey )
Variables ¶
var ( // ErrGetPermissionsResponseBodyNil error used when a nil response is returned from the permissions API. ErrGetPermissionsResponseBodyNil = errors.New("error creating get permissions request http.Request required but was nil") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewWithHealthClient ¶
func NewWithHealthClient(hcCli *healthcheck.Client) *Client
NewWithHealthClient creates a new instance of search API Client, reusing the URL and Clienter from the provided healthcheck client
func (*Client) Checker ¶
Checker calls search api health endpoint and returns a check object to the caller
func (*Client) CreateIndex ¶
func (cli *Client) CreateIndex(ctx context.Context, options Options) (*models.CreateIndexResponse, apiError.Error)
PostSearch creates a new search index
func (*Client) GetReleaseCalendarEntries ¶
func (cli *Client) GetReleaseCalendarEntries(ctx context.Context, options Options) (*transformer.SearchReleaseResponse, apiError.Error)
GetReleaseCalendarEntries gets a list of release calendar entries based on the search request
func (*Client) GetSearch ¶
func (cli *Client) GetSearch(ctx context.Context, options Options) (*models.SearchResponse, apiError.Error)
GetSearch gets a list of search results based on the search request
func (*Client) Health ¶
func (cli *Client) Health() *healthcheck.Client
Health returns the underlying Healthcheck Client for this search API client
func (*Client) PostSearchURIs ¶ added in v1.47.0
func (cli *Client) PostSearchURIs(ctx context.Context, options Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error)
PostSearchURIs sends a POST request to the /search/uris endpoint
type Clienter ¶
type Clienter interface { Checker(ctx context.Context, check *health.CheckState) error CreateIndex(ctx context.Context, options Options) (*models.CreateIndexResponse, apiError.Error) GetReleaseCalendarEntries(ctx context.Context, options Options) (*transformer.SearchReleaseResponse, apiError.Error) GetSearch(ctx context.Context, options Options) (*models.SearchResponse, apiError.Error) PostSearchURIs(ctx context.Context, options Options, urisRequest api.URIsRequest) (*models.SearchResponse, apiError.Error) Health() *healthcheck.Client URL() string }
type Options ¶
Options is a struct containing for customised options for the API client
func (*Options) CDIDs ¶ added in v1.47.0
CDIDs sets the 'cdids' a.k.a timeseries_id Query parameter to the request
func (*Options) ContentType ¶ added in v1.36.0
ContentType sets the 'content_type' Query parameter to the request
func (*Options) DatasetIDs ¶ added in v1.47.0
DatasetIDs sets the 'dataset_ids' Query parameter to the request
func (*Options) Dimensions ¶ added in v1.36.0
Dimensions sets the 'dimensions' Query parameter to the request
func (*Options) Highlight ¶ added in v1.36.0
Highlight sets the 'highlight' Query parameter to the request
func (*Options) NLPWeighting ¶ added in v1.43.0
NLPWeighting sets the 'census' Query parameter to the request
func (*Options) PopulationTypes ¶ added in v1.36.0
PopulationTypes sets the 'population_types' Query parameter to the request
func (*Options) SubtypeConfirmed ¶ added in v1.36.0
SubtypeConfirmed sets the 'subtype-confirmed' Query parameter to the request
func (*Options) SubtypePostponed ¶ added in v1.36.0
SubtypePostponed sets the 'subtype-postponed' Query parameter to the request
func (*Options) SubtypeProvisional ¶ added in v1.36.0
SubtypeProvisional sets the 'subtype-provisional' Query parameter to the request