postgreskv

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 New

func New(dbURL string) (*Client, error)

New instantiates a new postgreskv client given db URL

func (*Client) Close

func (client *Client) Close() error

Close closes the client

func (*Client) Delete

func (client *Client) Delete(key storage.Key) error

Delete deletes the given key and its associated value.

func (*Client) DeletePath

func (client *Client) DeletePath(bucket, key storage.Key) error

DeletePath deletes the given key (in the given bucket) and its associated value.

func (*Client) Get

func (client *Client) Get(key storage.Key) (storage.Value, error)

Get looks up the provided key and returns its value (or an error).

func (*Client) GetAll

func (client *Client) GetAll(keys storage.Keys) (storage.Values, error)

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

func (client *Client) GetAllPath(bucket storage.Key, keys storage.Keys) (storage.Values, error)

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

func (client *Client) GetPath(bucket, key storage.Key) (storage.Value, error)

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

func (*Client) List

func (client *Client) List(first storage.Key, limit int) (storage.Keys, error)

List returns either a list of known keys, in order, or an error.

func (*Client) Put

func (client *Client) Put(key storage.Key, value storage.Value) error

Put sets the value for the provided key.

func (*Client) PutPath

func (client *Client) PutPath(bucket, key storage.Key, value storage.Value) error

PutPath sets the value for the provided key (in the given bucket).

Directories

Path Synopsis
Code generated by go-bindata.
Code generated by go-bindata.

Jump to

Keyboard shortcuts

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