Documentation ¶
Index ¶
- Variables
- type AlternateClient
- type Client
- func (client *Client) Close() error
- func (client *Client) Delete(key storage.Key) error
- func (client *Client) DeletePath(bucket, key storage.Key) error
- func (client *Client) Get(key storage.Key) (storage.Value, error)
- func (client *Client) GetAll(keys storage.Keys) (storage.Values, error)
- func (client *Client) GetAllPath(bucket storage.Key, keys storage.Keys) (storage.Values, error)
- func (client *Client) GetPath(bucket, key storage.Key) (storage.Value, error)
- func (client *Client) Iterate(opts storage.IterateOptions, fn func(storage.Iterator) error) (err error)
- func (client *Client) List(first storage.Key, limit int) (storage.Keys, error)
- func (client *Client) Put(key storage.Key, value storage.Value) error
- func (client *Client) PutPath(bucket, key storage.Key, value storage.Value) error
Constants ¶
This section is empty.
Variables ¶
var Error = errs.Class("postgreskv error")
Error is the default postgreskv errs class
Functions ¶
This section is empty.
Types ¶
type AlternateClient ¶
type AlternateClient struct {
*Client
}
AlternateClient is the entrypoint into an alternate postgreskv data store
func AltNew ¶
func AltNew(dbURL string) (*AlternateClient, error)
AltNew instantiates a new postgreskv AlternateClient given db URL
func (*AlternateClient) Close ¶
func (altClient *AlternateClient) Close() error
Close closes an AlternateClient and frees its resources.
func (*AlternateClient) Iterate ¶
func (altClient *AlternateClient) Iterate(opts storage.IterateOptions, fn func(storage.Iterator) error) (err error)
Iterate iterates over items based on opts
type Client ¶
type Client struct { URL string // contains filtered or unexported fields }
Client is the entrypoint into a postgreskv data store
func (*Client) DeletePath ¶
DeletePath deletes the given key (in the given bucket) and its associated value.
func (*Client) GetAll ¶
GetAll finds all values for the provided keys (up to storage.LookupLimit). If more keys are provided than the maximum, an error will be returned.
func (*Client) GetAllPath ¶
GetAllPath finds all values for the provided keys (up to storage.LookupLimit) in the given bucket. if more keys are provided than the maximum, an error will be returned.
func (*Client) GetPath ¶
GetPath looks up the provided key (in the given bucket) and returns its value (or an error).
func (*Client) Iterate ¶
func (client *Client) Iterate(opts storage.IterateOptions, fn func(storage.Iterator) error) (err error)
Iterate iterates over items based on opts