Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateAuthorization(vaultID, requestingParty string, scope *vault.AuthorizationsScope) (*vault.CreatedAuthorization, error)
- func (c *Client) CreateVault() (*vault.CreatedVault, error)
- func (c *Client) GetAuthorization(vaultID, id string) (*vault.CreatedAuthorization, error)
- func (c *Client) GetDocMetaData(vaultID, docID string) (*vault.DocumentMetadata, error)
- func (c *Client) SaveDoc(vaultID, id string, content interface{}) (*vault.DocumentMetadata, error)
- type ConfidentialStorageDocReader
- type DocumentReader
- type HTTPClient
- type Option
- type ReaderOption
- type Vault
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 for vault.
func (*Client) CreateAuthorization ¶
func (c *Client) CreateAuthorization(vaultID, requestingParty string, scope *vault.AuthorizationsScope, ) (*vault.CreatedAuthorization, error)
CreateAuthorization creates an authorization.
func (*Client) CreateVault ¶
func (c *Client) CreateVault() (*vault.CreatedVault, error)
CreateVault creates a new vault.
func (*Client) GetAuthorization ¶
func (c *Client) GetAuthorization(vaultID, id string) (*vault.CreatedAuthorization, error)
GetAuthorization returns an authorization.
func (*Client) GetDocMetaData ¶
func (c *Client) GetDocMetaData(vaultID, docID string) (*vault.DocumentMetadata, error)
GetDocMetaData get doc metadata.
type ConfidentialStorageDocReader ¶
type ConfidentialStorageDocReader interface {
ReadDocument(vaultID, docID string, opts ...edv.ReqOption) (*models.EncryptedDocument, error)
}
ConfidentialStorageDocReader reads encrypted documents from Confidential Storages.
type DocumentReader ¶
type DocumentReader struct {
// contains filtered or unexported fields
}
DocumentReader is an io.Reader encapsulating the contents of a Confidential Storage document.
func NewDocumentReader ¶
func NewDocumentReader(vaultID, docID string, client ConfidentialStorageDocReader, options ...ReaderOption, ) *DocumentReader
NewDocumentReader returns a non thread-safe Reader for the Confidential Storage document.
If the Confidential Storage document is encrypted then use the WithDocumentDecrypter ReaderOption to decrypt the contents.
type HTTPClient ¶
HTTPClient interface for the http client.
type Option ¶
type Option func(opts *Client)
Option is a vault client instance option.
func WithHTTPClient ¶
func WithHTTPClient(c HTTPClient) Option
WithHTTPClient allows providing HTTP client.
type ReaderOption ¶
type ReaderOption func(*DocumentReader)
ReaderOption configures the DocumentReader.
func WithDocumentDecrypter ¶
func WithDocumentDecrypter(jd jose.Decrypter) ReaderOption
WithDocumentDecrypter must be used when the Confidential Storage document has been encrypted.
type Vault ¶
type Vault interface { CreateVault() (*vault.CreatedVault, error) SaveDoc(vaultID, id string, content interface{}) (*vault.DocumentMetadata, error) GetDocMetaData(vaultID, docID string) (*vault.DocumentMetadata, error) CreateAuthorization(vaultID, requestingParty string, scope *vault.AuthorizationsScope) (*vault.CreatedAuthorization, error) GetAuthorization(vaultID, id string) (*vault.CreatedAuthorization, error) }
Vault defines vault client interface.