Documentation ¶
Index ¶
- type ModelAdaptor
- func (c *ModelAdaptor) Apply(d *KVPair) (*KVPair, error)
- func (c *ModelAdaptor) Create(d *KVPair) (*KVPair, error)
- func (c *ModelAdaptor) Delete(d *KVPair) error
- func (c *ModelAdaptor) Get(k Key) (*KVPair, error)
- func (c *ModelAdaptor) List(l ListInterface) ([]*KVPair, error)
- func (c *ModelAdaptor) Syncer(callbacks api.SyncerCallbacks) api.Syncer
- func (c *ModelAdaptor) Update(d *KVPair) (*KVPair, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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(d *KVPair) (*KVPair, error)
Set an existing entry in the datastore. This ignores whether an entry already exists.
func (*ModelAdaptor) Create ¶
func (c *ModelAdaptor) Create(d *KVPair) (*KVPair, error)
Create an entry in the datastore. This errors if the entry already exists.
func (*ModelAdaptor) Delete ¶
func (c *ModelAdaptor) Delete(d *KVPair) error
Delete an entry in the datastore. This errors if the entry does not exists.
func (*ModelAdaptor) Get ¶
func (c *ModelAdaptor) Get(k Key) (*KVPair, error)
Get an entry from the datastore. This errors if the entry does not exist.
func (*ModelAdaptor) List ¶
func (c *ModelAdaptor) List(l ListInterface) ([]*KVPair, error)
List entries in the datastore. This may return an empty list of there are no entries matching the request in the ListInterface.
func (*ModelAdaptor) Syncer ¶
func (c *ModelAdaptor) Syncer(callbacks api.SyncerCallbacks) api.Syncer
func (*ModelAdaptor) Update ¶
func (c *ModelAdaptor) Update(d *KVPair) (*KVPair, error)
Update an existing entry in the datastore. This errors if the entry does not exist.
Click to show internal directories.
Click to hide internal directories.