Documentation ¶
Index ¶
- type Client
- func (c *Client) AddFilterDimension(ctx context.Context, fID string, dim model.Dimension) error
- func (c *Client) AddFilterOutputEvent(ctx context.Context, id string, f *model.Event) error
- func (c *Client) Checker(ctx context.Context, state *healthcheck.CheckState) error
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) Conn() *mongo.MongoConnection
- func (c *Client) CreateEtag(current, update interface{}) (eTag string, err error)
- func (c *Client) CreateFilter(ctx context.Context, f *model.Filter) error
- func (c *Client) CreateFilterOutput(ctx context.Context, f *model.FilterOutput) error
- func (c *Client) DeleteFilterDimension(ctx context.Context, filterID, dimensionName string) (string, error)
- func (c *Client) DeleteFilterDimensionOptions(ctx context.Context, filterID, dimensionName string) (string, error)
- func (c *Client) GetFilter(ctx context.Context, fID string) (*model.Filter, error)
- func (c *Client) GetFilterDimension(ctx context.Context, fID, dimName string) (model.Dimension, error)
- func (c *Client) GetFilterDimensionOptions(ctx context.Context, filterID, dimensionName string, limit, offset int) (finalOptions []string, totalCount int, eTag string, err error)
- func (c *Client) GetFilterDimensions(ctx context.Context, fID string, limit, offset int) ([]model.Dimension, int, error)
- func (c *Client) GetFilterOutput(ctx context.Context, filterID string) (*model.FilterOutput, error)
- func (c *Client) RemoveFilterDimensionOption(ctx context.Context, filterID, dimension, option, currentETag string) (string, error)
- func (c *Client) UpdateFilterDimension(ctx context.Context, filterID, dimensionName string, dimension model.Dimension, ...) (string, error)
- func (c *Client) UpdateFilterOutput(ctx context.Context, f *model.FilterOutput) error
- type Collection
- type Collections
- type Config
Constants ¶
This section is empty.
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 responsible for querying mongodb
func (*Client) AddFilterDimension ¶
func (*Client) AddFilterOutputEvent ¶ added in v1.2.0
AddFilterOutputEvent will append to the existing list of events in the filter output
func (*Client) Checker ¶
func (c *Client) Checker(ctx context.Context, state *healthcheck.CheckState) error
Checker is called by the healthcheck library to check the health state of this mongoDB instance
func (*Client) Conn ¶
func (c *Client) Conn() *mongo.MongoConnection
Conn returns the underlying mongodb connection.
func (*Client) CreateEtag ¶
CreateEtag creates a new etag for when an update request is made.
func (*Client) CreateFilter ¶
CreateFilter creates a new Filter in the CantabularFilters collection
func (*Client) CreateFilterOutput ¶
CreateFilterOutput creates a new FilterOutputs in the CantabularFilters collection
func (*Client) DeleteFilterDimension ¶ added in v1.6.0
func (c *Client) DeleteFilterDimension(ctx context.Context, filterID, dimensionName string) (string, error)
DeleteFilterDimension deletes a given dimension in a Filter etag checks should haev passed before calling this function
func (*Client) DeleteFilterDimensionOptions ¶ added in v1.2.0
func (c *Client) DeleteFilterDimensionOptions(ctx context.Context, filterID, dimensionName string) (string, error)
DeleteFilterDimensionOptions deletes all options for a given dimension in a Filter by the time that it gets to here, you should actually have determined that the etag is fine
func (*Client) GetFilterDimension ¶ added in v1.2.0
func (c *Client) GetFilterDimension(ctx context.Context, fID, dimName string) (model.Dimension, error)
GetFilterDimension gets a specific dimensions for a Filter in the CantabularFilters collection
func (*Client) GetFilterDimensionOptions ¶ added in v1.2.0
func (c *Client) GetFilterDimensionOptions(ctx context.Context, filterID, dimensionName string, limit, offset int) (finalOptions []string, totalCount int, eTag string, err error)
GetFilterDimensionOptions gets the options for a dimension that is part of a Filter
func (*Client) GetFilterDimensions ¶
func (c *Client) GetFilterDimensions(ctx context.Context, fID string, limit, offset int) ([]model.Dimension, int, error)
GetFilterDimensions gets the dimensions for a Filter in the CantabularFilters collection
func (*Client) GetFilterOutput ¶ added in v1.2.0
GetFilterOutput
func (*Client) RemoveFilterDimensionOption ¶ added in v1.2.0
func (*Client) UpdateFilterDimension ¶ added in v1.2.0
func (*Client) UpdateFilterOutput ¶ added in v1.2.0
UpdateFilterOutput creates/updates a FilterOutputs in the CantabularFilters collection
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection represents a collection in mongodb. Holds The name(s), lock client and any other relevant information.
type Collections ¶
type Collections struct {
// contains filtered or unexported fields
}
Collections holds information about the mongodb collections relevant to this service