compat

package
v3.8.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToTagsLabelsRules

func ToTagsLabelsRules(d *model.KVPair) (t, l, r *model.KVPair)

ToTagsLabelsRules converts a Profile KVPair to separate KVPair types for Keys, Labels and Rules. These separate KVPairs are used to write three separate objects that make up a single profile.

Types

type ModelAdaptor

type ModelAdaptor struct {
	// contains filtered or unexported fields
}

func NewAdaptor

func NewAdaptor(c api.Client) *ModelAdaptor

func (*ModelAdaptor) Apply

func (c *ModelAdaptor) Apply(ctx context.Context, d *model.KVPair) (*model.KVPair, error)

Set an existing entry in the datastore. This ignores whether an entry already exists.

func (*ModelAdaptor) Clean

func (c *ModelAdaptor) Clean() error

func (*ModelAdaptor) Create

func (c *ModelAdaptor) Create(ctx context.Context, d *model.KVPair) (*model.KVPair, error)

Create an entry in the datastore. This errors if the entry already exists.

func (*ModelAdaptor) Delete

func (c *ModelAdaptor) Delete(ctx context.Context, k model.Key, rev string) (*model.KVPair, error)

Delete an entry in the datastore. This errors if the entry does not exists.

func (*ModelAdaptor) DeleteKVP

func (c *ModelAdaptor) DeleteKVP(ctx context.Context, kvp *model.KVPair) (*model.KVPair, error)

func (*ModelAdaptor) EnsureInitialized

func (c *ModelAdaptor) EnsureInitialized() error

func (*ModelAdaptor) Get

func (c *ModelAdaptor) Get(ctx context.Context, k model.Key, rev string) (*model.KVPair, error)

Get an entry from the datastore. This errors if the entry does not exist.

func (*ModelAdaptor) List

List entries in the datastore. This may return an empty list of there are no entries matching the request in the ListInterface.

func (*ModelAdaptor) Update

func (c *ModelAdaptor) Update(ctx context.Context, d *model.KVPair) (*model.KVPair, error)

Update an existing entry in the datastore. This errors if the entry does not exist.

func (*ModelAdaptor) Watch

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL