Documentation
¶
Index ¶
- type KeySearchOptions
- type Label
- type Store
- func (s *Store) FindAllByService(ctx context.Context, db gadb.DBTX, serviceID string) ([]Label, error)
- func (s *Store) SearchKeys(ctx context.Context, opts *KeySearchOptions) ([]string, error)
- func (s *Store) SearchValues(ctx context.Context, opts *ValueSearchOptions) ([]string, error)
- func (s *Store) SetTx(ctx context.Context, db gadb.DBTX, label *Label) error
- func (s *Store) UniqueKeysTx(ctx context.Context, db gadb.DBTX) ([]string, error)
- type ValueSearchOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeySearchOptions ¶ added in v0.25.0
type KeySearchOptions struct { Search string `json:"s,omitempty"` After string `json:"a,omitempty"` // Omit specifies a list of key names to exclude from the results. Omit []string `json:"o,omitempty"` Limit int `json:"-"` }
KeySearchOptions allow filtering and paginating the list of rotations.
type Label ¶
type Label struct { Target assignment.Target Key string `json:"key"` Value string `json:"value"` }
A Label is a key-value pair assigned to a target.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store allows the lookup and management of Labels.
func NewStore ¶ added in v0.30.0
NewStore will Set a DB backend from a sql.DB. An error will be returned if statements fail to prepare.
func (*Store) FindAllByService ¶
func (s *Store) FindAllByService(ctx context.Context, db gadb.DBTX, serviceID string) ([]Label, error)
FindAllByService finds all labels for a particular service. It returns all key-value pairs.
func (*Store) SearchKeys ¶ added in v0.25.0
func (*Store) SearchValues ¶ added in v0.25.0
type ValueSearchOptions ¶ added in v0.25.0
type ValueSearchOptions struct { Key string `json:"k"` KeySearchOptions }
ValueSearchOptions allow filtering and paginating the list of rotations.
Click to show internal directories.
Click to hide internal directories.