options

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataKeyOptions

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

DataKeyOptions specifies options for creating a new data key.

type ExplicitEncryptionOptions

type ExplicitEncryptionOptions struct {
	KeyID            *bson.Binary
	KeyAltName       *string
	Algorithm        string
	QueryType        string
	ContentionFactor *int64
	RangeOptions     *ExplicitRangeOptions
	TextOptions      *ExplicitTextOptions
}

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

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

SetKeyID sets the key identifier.

func (*ExplicitEncryptionOptions) SetQueryType

func (eeo *ExplicitEncryptionOptions) SetQueryType(queryType string) *ExplicitEncryptionOptions

SetQueryType specifies the query type.

func (*ExplicitEncryptionOptions) SetRangeOptions

SetRangeOptions specifies the range options.

func (*ExplicitEncryptionOptions) SetTextOptions

SetTextOptions specifies the text options.

type ExplicitRangeOptions

type ExplicitRangeOptions struct {
	Min        *bsoncore.Value
	Max        *bsoncore.Value
	Sparsity   *int64
	TrimFactor *int32
	Precision  *int32
}

ExplicitRangeOptions specifies options for the range index.

type ExplicitTextOptions

type ExplicitTextOptions struct {
	Substring          *SubstringOptions
	Prefix             *PrefixOptions
	Suffix             *SuffixOptions
	CaseSensitive      bool
	DiacriticSensitive bool
}

ExplicitTextOptions specifies options for the text query.

type MongoCryptOptions

type MongoCryptOptions struct {
	KmsProviders               bsoncore.Document
	LocalSchemaMap             map[string]bsoncore.Document
	BypassQueryAnalysis        bool
	EncryptedFieldsMap         map[string]bsoncore.Document
	CryptSharedLibDisabled     bool
	CryptSharedLibOverridePath string
	HTTPClient                 *http.Client
	KeyExpiration              *time.Duration
}

MongoCryptOptions specifies options to configure a MongoCrypt instance.

type PrefixOptions

type PrefixOptions struct {
	StrMinQueryLength int32
	StrMaxQueryLength int32
}

PrefixOptions specifies options to support prefix queries.

type QueryType

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

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.

type SubstringOptions

type SubstringOptions struct {
	StrMaxLength      int32
	StrMinQueryLength int32
	StrMaxQueryLength int32
}

SubstringOptions specifies options to support substring queries.

type SuffixOptions

type SuffixOptions struct {
	StrMinQueryLength int32
	StrMaxQueryLength int32
}

SuffixOptions specifies options to support suffix queries.

Jump to

Keyboard shortcuts

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