Documentation
¶
Index ¶
- Constants
- type CantabularClient
- func (c *CantabularClient) Checker(_ context.Context, _ *healthcheck.CheckState) error
- func (c *CantabularClient) CheckerAPIExt(_ context.Context, _ *healthcheck.CheckState) error
- func (c *CantabularClient) GetArea(ctx context.Context, req cantabular.GetAreaRequest) (*cantabular.GetAreaResponse, error)
- func (c *CantabularClient) GetDimensionOptions(_ context.Context, _ cantabular.GetDimensionOptionsRequest) (*cantabular.GetDimensionOptionsResponse, error)
- func (c *CantabularClient) GetDimensionsByName(ctx context.Context, req cantabular.GetDimensionsByNameRequest) (*cantabular.GetDimensionsResponse, error)
- func (c *CantabularClient) GetGeographyDimensionsInBatches(ctx context.Context, datasetID string, batchSize, maxWorkers int) (*gql.Dataset, error)
- func (c *CantabularClient) Reset()
- func (c *CantabularClient) StaticDatasetQuery(ctx context.Context, req cantabular.StaticDatasetQueryRequest) (*cantabular.StaticDatasetQuery, error)
- func (c *CantabularClient) StatusCode(_ error) int
- type CantabularServer
- type Generator
Constants ¶
View Source
const ( TestUUID = "94310d8d-72d6-492a-bc30-27584627edb1" TestTimestamp = "2022-01-26T12:27:04.783936865Z" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CantabularClient ¶
type CantabularClient struct { ErrStatus int OptionsHappy bool DimensionsHappy bool GetDimensionsByNameFunc func(context.Context, cantabular.GetDimensionsByNameRequest) (*cantabular.GetDimensionsResponse, error) SearchDimensionsFunc func(ctx context.Context, req cantabular.SearchDimensionsRequest) (*cantabular.GetDimensionsResponse, error) GetGeographyDimensionsInBatchesFunc func(ctx context.Context, datasetID string, batchSize, maxWorkers int) (*gql.Dataset, error) GetAreaFunc func(context.Context, cantabular.GetAreaRequest) (*cantabular.GetAreaResponse, error) StaticDatasetQueryFunc func(context.Context, cantabular.StaticDatasetQueryRequest) (*cantabular.StaticDatasetQuery, error) }
func (*CantabularClient) Checker ¶
func (c *CantabularClient) Checker(_ context.Context, _ *healthcheck.CheckState) error
func (*CantabularClient) CheckerAPIExt ¶
func (c *CantabularClient) CheckerAPIExt(_ context.Context, _ *healthcheck.CheckState) error
func (*CantabularClient) GetArea ¶ added in v1.13.0
func (c *CantabularClient) GetArea(ctx context.Context, req cantabular.GetAreaRequest) (*cantabular.GetAreaResponse, error)
func (*CantabularClient) GetDimensionOptions ¶
func (c *CantabularClient) GetDimensionOptions(_ context.Context, _ cantabular.GetDimensionOptionsRequest) (*cantabular.GetDimensionOptionsResponse, error)
func (*CantabularClient) GetDimensionsByName ¶ added in v1.10.0
func (c *CantabularClient) GetDimensionsByName(ctx context.Context, req cantabular.GetDimensionsByNameRequest) (*cantabular.GetDimensionsResponse, error)
func (*CantabularClient) GetGeographyDimensionsInBatches ¶ added in v1.13.0
func (*CantabularClient) Reset ¶ added in v1.2.0
func (c *CantabularClient) Reset()
func (*CantabularClient) StaticDatasetQuery ¶ added in v1.2.0
func (c *CantabularClient) StaticDatasetQuery(ctx context.Context, req cantabular.StaticDatasetQueryRequest) (*cantabular.StaticDatasetQuery, error)
func (*CantabularClient) StatusCode ¶
func (c *CantabularClient) StatusCode(_ error) int
type CantabularServer ¶ added in v1.10.0
type CantabularServer struct { *httpfake.HTTPFake sync.RWMutex // contains filtered or unexported fields }
func NewCantabularServer ¶ added in v1.10.0
func NewCantabularServer(t *testing.T) *CantabularServer
func (*CantabularServer) Handle ¶ added in v1.10.0
func (cs *CantabularServer) Handle(request, response []byte)
func (*CantabularServer) PostResponder ¶ added in v1.10.0
func (cs *CantabularServer) PostResponder() httpfake.Responder
func (*CantabularServer) Reset ¶ added in v1.10.0
func (cs *CantabularServer) Reset()
type Generator ¶
type Generator struct {
URLHost string
}
Generator is responsible for generating mocked constant strings and tokens for tests
func (*Generator) URL ¶
URL generates a URL from a constant host and a path made from a printf string + arguments
func (*Generator) UniqueTimestamp ¶
UniqueTimestamp generates a constant timestamp
Click to show internal directories.
Click to hide internal directories.