Documentation
¶
Index ¶
- type EventScope
- type Scope
- func (s *Scope) AddContainsSelection(label string, value string) *Scope
- func (s *Scope) AddDoesNotContainSelection(label string, value string) *Scope
- func (s *Scope) AddInSelection(label string, values ...string) *Scope
- func (s *Scope) AddIsNotSelection(label, value string) *Scope
- func (s *Scope) AddIsSelection(label, value string) *Scope
- func (s *Scope) AddNotInSelection(label string, values ...string) *Scope
- func (s *Scope) AddSelection(selector Selector, label, value string) *Scope
- func (s *Scope) AddSelectionMultiple(selector Selector, label string, values ...string) *Scope
- func (s *Scope) AddStartsWithSelection(label, value string) *Scope
- func (s *Scope) String() string
- type Selector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventScope ¶
type EventScope Scope
EventScope defines the Scope labels for an EventsService.Create
func NewEventScope ¶
func NewEventScope() *EventScope
NewEventScope initializes a new EventScope to be used for adding scope labels to an event in EventsService.Create.
func NewEventScopeWithLabels ¶
func NewEventScopeWithLabels(labels map[string]string) *EventScope
NewEventScopeWithLabels initializes a new EventScope with the provided scope labels.
func (*EventScope) AddIsSelection ¶
func (s *EventScope) AddIsSelection(label, value string) *EventScope
AddIsSelection adds a label to the EventScope with the given value.
func (*EventScope) String ¶
func (s *EventScope) String() string
String is implemented via the Scope.String() method.
type Scope ¶
type Scope struct {
// contains filtered or unexported fields
}
Scope defines a filter for an EventsService.List.
func New ¶
func New() *Scope
New initializes a new Scope to be used for filters in EventsService.List.
func (*Scope) AddContainsSelection ¶
AddContainsSelection adds a filter to the Scope with the given label, value and SelectionContains selector.
func (*Scope) AddDoesNotContainSelection ¶
AddDoesNotContainSelection adds a filter to the Scope with the given label, value and DoesNotContain selector.
func (*Scope) AddInSelection ¶
AddInSelection adds a filter to the Scope with the given label, value and SelectionIn selector.
func (*Scope) AddIsNotSelection ¶
AddIsNotSelection adds a filter to the Scope with the given label, value and SelectionIsNot selector.
func (*Scope) AddIsSelection ¶
AddIsSelection adds a filter to the Scope with the given label, value and SelectionIs selector.
func (*Scope) AddNotInSelection ¶
AddNotInSelection adds a filter to the Scope with the given label, value and SelectionNotIn selector.
func (*Scope) AddSelection ¶
AddSelection adds a filter to the Scope with the given label, value and selector. Note: You should prefer to use the explicitly scoped Add functions to ensure you do not accidentally add multiple values when only one is supported. e.g. if you add multiple values to SelectionIs Selection, the values will be joined which is probably not what you want.
func (*Scope) AddSelectionMultiple ¶
AddSelectionMultiple adds a filter to the Scope with the given label, value and selector. // Note: You should prefer to use the explicitly scoped Add functions to ensure you do not // accidentally add multiple values when only one is supported. e.g. if you add multiple // values to SelectionIs Selection, the values will be joined which is probably // not what you want.
func (*Scope) AddStartsWithSelection ¶
AddStartsWithSelection adds a filter to the Scope with the given label, value and SelectionStartsWith selector.
type Selector ¶
type Selector string
Selector defines a type for Scope filter operators.
const ( // SelectionIs filters EventsService.List to Events which do not exactly match the provided value. // It is also used to set Scope labels for a created Event. SelectionIs Selector = "=" // SelectionIsNot filters EventsService.List to Events which do not exactly match the provided value. SelectionIsNot Selector = "!=" // SelectionIn filters EventsService.List to Events which exactly match one of the provided values. SelectionIn Selector = "in" // SelectionNotIn filters EventsService.List to Events which do not exactly match one of the provided values. SelectionNotIn Selector = "not in" // SelectionContains filters EventsService.List to Events which substring match the provided value. SelectionContains Selector = "contains" // SelectionDoesNotContain filters EventsService.List to Events which do not substring match the provided value. SelectionDoesNotContain Selector = "does not contain" // SelectionStartsWith filters EventsService.List to Events which are prefixed with the provided value. SelectionStartsWith Selector = "starts with" )