Help us shape the future of Go! Take the 2026 Go Developer Survey

edv

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is used to interact with an EDV server.

func New

func New(edvServerURL string, opts ...Option) *Client

New returns a new instance of an EDV client.

func (*Client) CreateDataVault

func (c *Client) CreateDataVault(config *models.DataVaultConfiguration) (string, error)

CreateDataVault sends the EDV server a request to create a new data vault. The location of the newly created data vault is returned.

func (*Client) CreateDocument

func (c *Client) CreateDocument(vaultID string, document *models.EncryptedDocument) (string, error)

CreateDocument sends the EDV server a request to store the specified document. The location of the newly created document is returned.

func (*Client) QueryVault

func (c *Client) QueryVault(vaultID string, query *models.Query) ([]string, error)

QueryVault queries the given vault and returns the URLs of all documents that match the given query.

func (*Client) ReadDocument

func (c *Client) ReadDocument(vaultID, docID string) (*models.EncryptedDocument, error)

ReadDocument sends the EDV server a request to retrieve the specified document. The requested document is returned.

type Option

type Option func(opts *Client)

Option configures the edv client

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) Option

WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance

Jump to

Keyboard shortcuts

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