Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("label not found")
ErrNotFound is returned when a label is not found.
Functions ¶
This section is empty.
Types ¶
type LabelStore ¶
type LabelStore interface { Insert(label *api.Label) error Delete(*DeleteInput) error // mark label as deleted List(ctx context.Context, input *ListInput) ([]*api.Label, error) Sample(ctx context.Context, input *SampleInput) ([]*api.Label, error) SampleWithQuery(ctx context.Context, input *SampleWithQueryInput) ([]*api.Label, error) Get(ctx context.Context, id string) (*api.Label, error) }
LabelStore is an interface for storing and retrieving labels. Labels are immutable. Once created, they cannot be updated. Labels are identified with a unique ID and are associated with a project.
type ListInput ¶
type ListInput struct {
ProjectID string // (required) project id
}
ListInput is the input for the List method.
type SampleInput ¶
type SampleInput struct { ProjectID string // (required) project id BatchSize int // (optional) number of labels to return }
SampleInput is the input for the Sample method.
type SampleWithQueryInput ¶
type SampleWithQueryInput struct { ProjectID string // (required) project id BatchSize int // (optional) number of labels to return Tags []string // (required) tags to match ExcludeTags []string // (optional) tags to exclude All bool // (optional) match all tags or any Payload map[string]interface{} // (required) payload fields to match }
SampleWithQueryInput is the input for the SampleWithQuery method.
Click to show internal directories.
Click to hide internal directories.