Documentation ¶
Index ¶
- type AwsKmsProviderOptions
- type DataKeyOptions
- type ExplicitEncryptionOptions
- type LocalKmsProviderOptions
- type MongoCryptOptions
- func (mo *MongoCryptOptions) SetAwsProviderOptions(awsOpts *AwsKmsProviderOptions) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetLocalProviderOptions(localOpts *LocalKmsProviderOptions) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetLocalSchemaMap(localSchemaMap map[string]bsoncore.Document) *MongoCryptOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AwsKmsProviderOptions ¶
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 ¶
DataKeyOptions specifies options for creating a new data key.
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 ¶
func (eeo *ExplicitEncryptionOptions) SetKeyID(keyID primitive.Binary) *ExplicitEncryptionOptions
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.