Documentation ¶
Overview ¶
Package dsfake implements a fake dsiface.Client If you make changes to existing code, please test whether it breaks existing clients, e.g. in etl-gardener.
Index ¶
- Variables
- type Client
- func (c *Client) Close() error
- func (c *Client) Count(ctx context.Context, q *datastore.Query) (n int, err error)
- func (c *Client) Delete(ctx context.Context, key *datastore.Key) error
- func (c *Client) Get(ctx context.Context, key *datastore.Key, dst interface{}) (err error)
- func (c *Client) GetKeys() []datastore.Key
- func (c *Client) Put(ctx context.Context, key *datastore.Key, src interface{}) (*datastore.Key, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("Not implemented")
ErrNotImplemented is returned if a dsiface function is unimplemented.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { dsiface.Client // For unimplemented methods // contains filtered or unexported fields }
Client implements a crude datastore test client. It is somewhat simplistic and incomplete. It works only for basic Put, Get, and Delete, but may not always work correctly.
func NewClient ¶
func NewClient() *Client
NewClient returns a fake client that satisfies dsiface.Client.
Click to show internal directories.
Click to hide internal directories.