Documentation
¶
Overview ¶
Package storage implements storage backends for DEKs.
If an unset DEK is requested, the backend MUST return ErrDEKUnset.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrDEKUnset = errors.New("requested DEK not set")
ErrDEKUnset indicates if a key is not found in storage.
Functions ¶
This section is empty.
Types ¶
type AWSS3Storage ¶
type AWSS3Storage struct {
// contains filtered or unexported fields
}
AWSS3Storage is an implementation of the Storage interface, storing keys in AWS S3 buckets.
func NewAWSS3Storage ¶
func NewAWSS3Storage(ctx context.Context, bucketID string, optFns ...func(*s3.Options)) (*AWSS3Storage, error)
NewAWSS3Storage creates a Storage client for AWS S3: https://aws.amazon.com/s3/
You need to provide credentials to authenticate to AWS using the cfg parameter.
type AzureOpts ¶
type AzureOpts struct {
// contains filtered or unexported fields
}
AzureOpts are additional options to be used when interacting with the Azure API.
type AzureStorage ¶
type AzureStorage struct {
// contains filtered or unexported fields
}
AzureStorage is an implementation of the Storage interface, storing keys in the Azure Blob Store.
func NewAzureStorage ¶
func NewAzureStorage(ctx context.Context, connectionString, containerName string, opts *AzureOpts) (*AzureStorage, error)
NewAzureStorage initializes a storage client using Azure's Blob Storage: https://azure.microsoft.com/en-us/services/storage/blobs/
A connections string is required to connect to the Storage Account, see https://docs.microsoft.com/en-us/azure/storage/common/storage-configure-connection-string If the container does not exists, a new one is created automatically. Connect options for the Client, Downloader and Uploader can be configured using opts.
type GoogleCloudStorage ¶
type GoogleCloudStorage struct {
// contains filtered or unexported fields
}
GoogleCloudStorage is an implementation of the Storage interface, storing keys in Google Cloud Storage buckets.
func NewGoogleCloudStorage ¶
func NewGoogleCloudStorage(ctx context.Context, projectID, bucketName string, bucketOptions *storage.BucketAttrs, opts ...option.ClientOption) (*GoogleCloudStorage, error)
NewGoogleCloudStorage creates a Storage client for Google Cloud Storage: https://cloud.google.com/storage/docs/
The parameter bucketOptions is optional, if not present default options will be created.
type MemMapStorage ¶
type MemMapStorage struct {
// contains filtered or unexported fields
}
MemMapStorage is the standard implementation of the Storage interface, storing keys in memory only.
func NewMemMapStorage ¶
func NewMemMapStorage() *MemMapStorage
NewMemMapStorage creates and initialises a new MemMapStorage object.