Documentation ¶
Index ¶
- Variables
- type Client
- type Event
- type Store
- func (store *Store) GetFilter(ctx context.Context, filterOutputID string) (filter *filter.Model, err error)
- func (store *Store) PutCSVData(ctx context.Context, filterJobID string, csv filter.Download) error
- func (store *Store) PutStateAsEmpty(ctx context.Context, filterJobID string) error
- func (store *Store) PutStateAsError(ctx context.Context, filterJobID string) error
Constants ¶
This section is empty.
Variables ¶
var ErrFilterAPIError = errors.New("internal error from the filter api")
ErrFilterAPIError returned when an unrecognised error occurs.
var ErrFilterJobNotFound = errors.New("failed to find filter job")
ErrFilterJobNotFound returned when the filter job count not be found for the given ID.
var ErrUnrecognisedAPIError = errors.New("unrecognised error from the filter api")
ErrUnrecognisedAPIError returned when an unrecognised error occurs.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { UpdateFilterOutputBytes(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceToken, filterJobID string, b []byte) error GetOutputBytes(ctx context.Context, userAuthToken, serviceAuthToken, downloadServiceToken, collectionID, filterOutputID string) ([]byte, error) Checker(context.Context, *healthcheck.CheckState) error }
Client interface contains the method signatures expected to be implemented by dp-api-clients-go/filter
type Event ¶
type Event struct { Type string `bson:"type,omitempty" json:"type"` Time time.Time `bson:"time,omitempty" json:"time"` }
Event represents a structure with type and time
type Store ¶
type Store struct { Client // contains filtered or unexported fields }
Store provides access to stored dimension data using the filter dp-api-client
func (*Store) GetFilter ¶
func (store *Store) GetFilter(ctx context.Context, filterOutputID string) (filter *filter.Model, err error)
GetFilter returns filter data from the filter API for the given ID
func (*Store) PutCSVData ¶
PutCSVData allows the filtered file data to be sent back to the filter store when complete.
func (*Store) PutStateAsEmpty ¶
PutStateAsEmpty sets the filter output as empty