options

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsKmsProviderOptions

type AwsKmsProviderOptions struct {
	AccessKeyID     string
	SecretAccessKey string
}

AwsKmsProviderOptions specifies options for configuring the AWS KMS provider.

func AwsKmsProvider

func AwsKmsProvider() *AwsKmsProviderOptions

AwsKmsProvider creates a new AwsKmsProviderOptions instance.

func (*AwsKmsProviderOptions) SetAccessKeyID

func (akpo *AwsKmsProviderOptions) SetAccessKeyID(accessKeyID string) *AwsKmsProviderOptions

SetAccessKeyID specifies the AWS access key ID.

func (*AwsKmsProviderOptions) SetSecretAccessKey

func (akpo *AwsKmsProviderOptions) SetSecretAccessKey(secretAccessKey string) *AwsKmsProviderOptions

SetSecretAccessKey specifies the AWS secret access key.

type DataKeyOptions

type DataKeyOptions struct {
	KeyAltNames []string
	MasterKey   bsoncore.Document
}

DataKeyOptions specifies options for creating a new data key.

func DataKey

func DataKey() *DataKeyOptions

DataKey creates a new DataKeyOptions instance.

func (*DataKeyOptions) SetKeyAltNames

func (dko *DataKeyOptions) SetKeyAltNames(names []string) *DataKeyOptions

SetKeyAltNames specifies alternate key names.

func (*DataKeyOptions) SetMasterKey

func (dko *DataKeyOptions) SetMasterKey(key bsoncore.Document) *DataKeyOptions

SetMasterKey specifies the master key.

type ExplicitEncryptionOptions

type ExplicitEncryptionOptions struct {
	KeyID      *primitive.Binary
	KeyAltName *string
	Algorithm  string
}

ExplicitEncryptionOptions specifies options for configuring an explicit encryption context.

func ExplicitEncryption

func ExplicitEncryption() *ExplicitEncryptionOptions

ExplicitEncryption creates a new ExplicitEncryptionOptions instance.

func (*ExplicitEncryptionOptions) SetAlgorithm

func (eeo *ExplicitEncryptionOptions) SetAlgorithm(algorithm string) *ExplicitEncryptionOptions

SetAlgorithm specifies an encryption algorithm.

func (*ExplicitEncryptionOptions) SetKeyAltName

func (eeo *ExplicitEncryptionOptions) SetKeyAltName(keyAltName string) *ExplicitEncryptionOptions

SetKeyAltName sets the key alternative name.

func (*ExplicitEncryptionOptions) SetKeyID

SetKeyID sets the key identifier.

type LocalKmsProviderOptions

type LocalKmsProviderOptions struct {
	MasterKey []byte
}

LocalKmsProviderOptions specifies options for configuring a local KMS provider.

func LocalKmsProvider

func LocalKmsProvider() *LocalKmsProviderOptions

LocalKmsProvider creates a new LocalKmsProviderOptions instance.

func (*LocalKmsProviderOptions) SetMasterKey

func (lkpo *LocalKmsProviderOptions) SetMasterKey(key []byte) *LocalKmsProviderOptions

SetMasterKey specifies the local master key.

type MongoCryptOptions

type MongoCryptOptions struct {
	AwsProviderOpts   *AwsKmsProviderOptions
	LocalProviderOpts *LocalKmsProviderOptions
	LocalSchemaMap    map[string]bsoncore.Document
}

MongoCryptOptions specifies options to configure a MongoCrypt instance.

func MongoCrypt

func MongoCrypt() *MongoCryptOptions

MongoCrypt creates a new MongoCryptOptions instance.

func (*MongoCryptOptions) SetAwsProviderOptions

func (mo *MongoCryptOptions) SetAwsProviderOptions(awsOpts *AwsKmsProviderOptions) *MongoCryptOptions

SetAwsProviderOptions specifies AWS KMS provider options.

func (*MongoCryptOptions) SetLocalProviderOptions

func (mo *MongoCryptOptions) SetLocalProviderOptions(localOpts *LocalKmsProviderOptions) *MongoCryptOptions

SetLocalProviderOptions specifies local KMS provider options.

func (*MongoCryptOptions) SetLocalSchemaMap

func (mo *MongoCryptOptions) SetLocalSchemaMap(localSchemaMap map[string]bsoncore.Document) *MongoCryptOptions

SetLocalSchemaMap specifies the local schema map.

Jump to

Keyboard shortcuts

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