Documentation
¶
Index ¶
- type Client
- func (c *Client) Batch(vaultID string, batch *models.Batch, opts ...ReqOption) ([]string, error)
- func (c *Client) CreateDataVault(config *models.DataVaultConfiguration, opts ...ReqOption) (string, []byte, error)
- func (c *Client) CreateDocument(vaultID string, document *models.EncryptedDocument, opts ...ReqOption) (string, error)
- func (c *Client) DeleteDocument(vaultID, docID string, opts ...ReqOption) error
- func (c *Client) QueryVault(vaultID, name, value string, opts ...ReqOption) ([]string, error)
- func (c *Client) QueryVaultForFullDocuments(vaultID, name, value string, opts ...ReqOption) ([]models.EncryptedDocument, error)
- func (c *Client) ReadAllDocuments(vaultID string, opts ...ReqOption) ([]models.EncryptedDocument, error)
- func (c *Client) ReadDocument(vaultID, docID string, opts ...ReqOption) (*models.EncryptedDocument, error)
- func (c *Client) UpdateDocument(vaultID, docID string, document *models.EncryptedDocument, opts ...ReqOption) error
- type Option
- type ReqOption
- type ReqOpts
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 (*Client) Batch ¶ added in v0.1.5
Batch performs batch operations within a vault. Requires the EDV server to support the Batch extension.
func (*Client) CreateDataVault ¶
func (c *Client) CreateDataVault(config *models.DataVaultConfiguration, opts ...ReqOption) (string, []byte, 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, opts ...ReqOption) (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) DeleteDocument ¶ added in v0.1.5
DeleteDocument sends the EDV server a request to delete the specified document.
func (*Client) QueryVault ¶
QueryVault queries the given vault and returns the URLs of all documents that match the given query.
func (*Client) QueryVaultForFullDocuments ¶ added in v0.1.5
func (c *Client) QueryVaultForFullDocuments(vaultID, name, value string, opts ...ReqOption) ([]models.EncryptedDocument, error)
QueryVaultForFullDocuments queries the given vault and returns all documents that match the given query. Requires the EDV server to support the ReturnFullDocumentsOnQuery extension.
func (*Client) ReadAllDocuments ¶
func (c *Client) ReadAllDocuments(vaultID string, opts ...ReqOption) ([]models.EncryptedDocument, error)
ReadAllDocuments sends the EDV server a request to retrieve all the documents within the specified vault.
func (*Client) ReadDocument ¶
func (c *Client) ReadDocument(vaultID, docID string, opts ...ReqOption) (*models.EncryptedDocument, error)
ReadDocument sends the EDV server a request to retrieve the specified document. The requested document is returned.
func (*Client) UpdateDocument ¶ added in v0.1.5
func (c *Client) UpdateDocument(vaultID, docID string, document *models.EncryptedDocument, opts ...ReqOption) error
UpdateDocument sends the EDV server a request to update the specified document.
type Option ¶
type Option func(opts *Client)
Option configures the edv client
func WithHeaders ¶ added in v0.1.5
func WithHeaders(addHeadersFunc addHeaders) Option
WithHeaders option is for setting additional http request headers
func WithTLSConfig ¶
WithTLSConfig option is for definition of secured HTTP transport using a tls.Config instance