MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
encrypt_options.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <mongocxx/v1/encrypt_options-fwd.hpp> // IWYU pragma: export
18
19//
20
22
25
28
31
33
34#include <cstdint>
35#include <string>
36
37namespace mongocxx {
38namespace v1 {
39
60 // This class implements `EncryptOpts`:
61 // - https://specifications.readthedocs.io/en/latest/client-side-encryption/client-side-encryption/
62
63 private:
64 class impl;
65 void* _impl;
66
67 public:
88
120
127
135
143
148
153
161
168
172 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::types::view>) key_id() const;
173
178
182 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<bsoncxx::v1::stdx::string_view>) key_alt_name() const;
183
188
193
198
202 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v1::stdx::optional<std::int64_t>) contention_factor() const;
203
208
213
218
223
228
235
236 class internal;
237
238 private:
239 /* explicit(false) */ encrypt_options(void* impl);
240};
241
242} // namespace v1
243} // namespace mongocxx
244
245#include <mongocxx/v1/detail/postlude.hpp>
246
encrypt_options & algorithm(encryption_algorithm v)
Set the "algorithm" field.
encrypt_options & query_type(encryption_query_type v)
Set the "queryType" field.
encrypt_options & key_alt_name(std::string v)
Set the "keyAltName" field.
encrypt_options & text_opts(v1::text_options v)
Set the "textOpts" field.
encrypt_options & key_id(bsoncxx::v1::types::value v)
Set the "keyId" field.
encrypt_options & contention_factor(std::int64_t v)
Set the "contentionFactor" field.
encrypt_options & range_opts(v1::range_options v)
Set the "rangeOpts" field.
encrypt_options(encrypt_options &&other) noexcept
Move constructor.
encryption_algorithm
An encryption algorithm.
Definition encrypt_options.hpp:74
@ k_deterministic
"AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic"
Definition encrypt_options.hpp:75
@ k_range
"Range"
Definition encrypt_options.hpp:79
@ k_indexed
"Indexed"
Definition encrypt_options.hpp:77
@ k_textPreview
"TextPreview"
Definition encrypt_options.hpp:86
@ k_random
"AEAD_AES_256_CBC_HMAC_SHA_512-Random"
Definition encrypt_options.hpp:76
@ k_unindexed
"Unindexed"
Definition encrypt_options.hpp:78
~encrypt_options()
Destroy this object.
encryption_query_type
A query type.
Definition encrypt_options.hpp:95
@ k_equality
"equalty"
Definition encrypt_options.hpp:96
@ k_suffixPreview
"suffixPreview"
Definition encrypt_options.hpp:111
@ k_prefixPreview
"prefixPreview"
Definition encrypt_options.hpp:104
@ k_substringPreview
"substringPreview"
Definition encrypt_options.hpp:118
Options related to range_options queries for Queryable Encryption.
Definition range_options.hpp:51
Options related to text queries for Queryable Encryption.
Definition text_options.hpp:46
Declares mongocxx::v1::encrypt_options.
Provides macros to control the set of symbols exported in the ABI.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v1 macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v1::range_options.
Declares mongocxx::v1::text_options.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Declares bsoncxx::v1::types::value.
Declares non-owning, read-only entities representing a BSON type value.