Documentation ¶
Overview ¶
Package client provides SporeDB API client.
It can be used by external applications willing to communicate with a single SporeDB node. The API client is able to get current state of one node's database, and submit transactions to the whole SporeDB cluster.
Please note that the API is under development and is subject to change.
Index ¶
- type Client
- func (c *Client) CLI()
- func (c *Client) Close()
- func (c *Client) Connect() (err error)
- func (c *Client) Contains(ctx context.Context, key string, value []byte) (contains bool, err error)
- func (c *Client) Get(ctx context.Context, key string) (value []byte, v *version.V, err error)
- func (c *Client) Members(ctx context.Context, key string) (values [][]byte, v *version.V, err error)
- func (c *Client) SetPolicy(pol string)
- func (c *Client) Submit(ctx context.Context, tx *api.Transaction) (uuid string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the GRPC SporeDB client.
func (*Client) CLI ¶
func (c *Client) CLI()
CLI starts a command line interface to dial with the GRPC server (debug and maintenance).
func (*Client) Contains ¶
Contains returns wether or not a specific value is present in a container.
func (*Client) Members ¶
func (c *Client) Members(ctx context.Context, key string) (values [][]byte, v *version.V, err error)
Members returns the slice of every element of a container.
Click to show internal directories.
Click to hide internal directories.