Documentation ¶
Overview ¶
Package options is intended for internal use only. It is made available to facilitate use cases that require access to internal MongoDB driver functionality and state. The API of this package is not stable and there is no backward compatibility guarantee.
WARNING: THIS PACKAGE IS EXPERIMENTAL AND MAY BE MODIFIED OR REMOVED WITHOUT NOTICE! USE WITH EXTREME CAUTION!
Index ¶
- type DataKeyOptions
- type ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetAlgorithm(algorithm string) *ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetContentionFactor(contentionFactor int64) *ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetKeyAltName(keyAltName string) *ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetKeyID(keyID primitive.Binary) *ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetQueryType(queryType string) *ExplicitEncryptionOptions
- func (eeo *ExplicitEncryptionOptions) SetRangeOptions(ro ExplicitRangeOptions) *ExplicitEncryptionOptions
- type ExplicitRangeOptions
- type MongoCryptOptions
- func (mo *MongoCryptOptions) SetBypassQueryAnalysis(bypassQueryAnalysis bool) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetCryptSharedLibDisabled(disabled bool) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetCryptSharedLibOverridePath(path string) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetEncryptedFieldsMap(efcMap map[string]bsoncore.Document) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetHTTPClient(httpClient *http.Client) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetKmsProviders(kmsProviders bsoncore.Document) *MongoCryptOptions
- func (mo *MongoCryptOptions) SetLocalSchemaMap(localSchemaMap map[string]bsoncore.Document) *MongoCryptOptions
- type QueryType
- type RewrapManyDataKeyOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) SetKeyMaterial ¶ added in v1.10.0
func (dko *DataKeyOptions) SetKeyMaterial(keyMaterial []byte) *DataKeyOptions
SetKeyMaterial specifies the key material.
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 QueryType string ContentionFactor *int64 RangeOptions *ExplicitRangeOptions }
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) SetContentionFactor ¶ added in v1.10.0
func (eeo *ExplicitEncryptionOptions) SetContentionFactor(contentionFactor int64) *ExplicitEncryptionOptions
SetContentionFactor specifies the contention factor.
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.
func (*ExplicitEncryptionOptions) SetQueryType ¶ added in v1.10.0
func (eeo *ExplicitEncryptionOptions) SetQueryType(queryType string) *ExplicitEncryptionOptions
SetQueryType specifies the query type.
func (*ExplicitEncryptionOptions) SetRangeOptions ¶ added in v1.12.0
func (eeo *ExplicitEncryptionOptions) SetRangeOptions(ro ExplicitRangeOptions) *ExplicitEncryptionOptions
SetRangeOptions specifies the range options.
type ExplicitRangeOptions ¶ added in v1.12.0
type ExplicitRangeOptions struct { Min *bsoncore.Value Max *bsoncore.Value Sparsity int64 Precision *int32 }
ExplicitRangeOptions specifies options for the range index.
type MongoCryptOptions ¶
type MongoCryptOptions struct { KmsProviders bsoncore.Document LocalSchemaMap map[string]bsoncore.Document BypassQueryAnalysis bool EncryptedFieldsMap map[string]bsoncore.Document HTTPClient *http.Client }
MongoCryptOptions specifies options to configure a MongoCrypt instance.
func MongoCrypt ¶
func MongoCrypt() *MongoCryptOptions
MongoCrypt creates a new MongoCryptOptions instance.
func (*MongoCryptOptions) SetBypassQueryAnalysis ¶ added in v1.10.0
func (mo *MongoCryptOptions) SetBypassQueryAnalysis(bypassQueryAnalysis bool) *MongoCryptOptions
SetBypassQueryAnalysis skips the NeedMongoMarkings state.
func (*MongoCryptOptions) SetCryptSharedLibDisabled ¶ added in v1.10.0
func (mo *MongoCryptOptions) SetCryptSharedLibDisabled(disabled bool) *MongoCryptOptions
SetCryptSharedLibDisabled explicitly disables loading the crypt_shared library if set to true.
func (*MongoCryptOptions) SetCryptSharedLibOverridePath ¶ added in v1.10.0
func (mo *MongoCryptOptions) SetCryptSharedLibOverridePath(path string) *MongoCryptOptions
SetCryptSharedLibOverridePath sets the override path to the crypt_shared library file. Setting an override path disables the default operating system dynamic library search path.
func (*MongoCryptOptions) SetEncryptedFieldsMap ¶ added in v1.10.0
func (mo *MongoCryptOptions) SetEncryptedFieldsMap(efcMap map[string]bsoncore.Document) *MongoCryptOptions
SetEncryptedFieldsMap specifies the encrypted fields map.
func (*MongoCryptOptions) SetHTTPClient ¶ added in v1.12.0
func (mo *MongoCryptOptions) SetHTTPClient(httpClient *http.Client) *MongoCryptOptions
SetHTTPClient sets the http client.
func (*MongoCryptOptions) SetKmsProviders ¶ added in v1.5.0
func (mo *MongoCryptOptions) SetKmsProviders(kmsProviders bsoncore.Document) *MongoCryptOptions
SetKmsProviders specifies the KMS providers map.
func (*MongoCryptOptions) SetLocalSchemaMap ¶
func (mo *MongoCryptOptions) SetLocalSchemaMap(localSchemaMap map[string]bsoncore.Document) *MongoCryptOptions
SetLocalSchemaMap specifies the local schema map.
type QueryType ¶ added in v1.10.0
type QueryType int
QueryType describes the type of query the result of Encrypt is used for.
const (
QueryTypeEquality QueryType = 1
)
These constants specify valid values for QueryType
type RewrapManyDataKeyOptions ¶ added in v1.10.0
type RewrapManyDataKeyOptions struct { // Provider identifies the new KMS provider. If omitted, encrypting uses the current KMS provider. Provider *string // MasterKey identifies the new masterKey. If omitted, rewraps with the current masterKey. MasterKey bsoncore.Document }
RewrapManyDataKeyOptions represents all possible options used to decrypt and encrypt all matching data keys with a possibly new masterKey.
func MergeRewrapManyDataKeyOptions
deprecated
added in
v1.10.0
func MergeRewrapManyDataKeyOptions(opts ...*RewrapManyDataKeyOptions) *RewrapManyDataKeyOptions
MergeRewrapManyDataKeyOptions combines the given RewrapManyDataKeyOptions instances into a single RewrapManyDataKeyOptions in a last one wins fashion.
Deprecated: Merging options structs will not be supported in Go Driver 2.0. Users should create a single options struct instead.
func RewrapManyDataKey ¶ added in v1.10.0
func RewrapManyDataKey() *RewrapManyDataKeyOptions
RewrapManyDataKey creates a new RewrapManyDataKeyOptions instance.
func (*RewrapManyDataKeyOptions) SetMasterKey ¶ added in v1.10.0
func (rmdko *RewrapManyDataKeyOptions) SetMasterKey(masterKey bsoncore.Document) *RewrapManyDataKeyOptions
SetMasterKey sets the value for the MasterKey field.
func (*RewrapManyDataKeyOptions) SetProvider ¶ added in v1.10.0
func (rmdko *RewrapManyDataKeyOptions) SetProvider(provider string) *RewrapManyDataKeyOptions
SetProvider sets the value for the Provider field.