MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
auto_encryption.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 <string>
18
21#include <mongocxx/pool-fwd.hpp>
22
25
26#include <mongocxx/stdx.hpp>
27
29
30namespace mongocxx {
31namespace v_noabi {
32namespace options {
33
38 public:
43
62
69 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<mongocxx::v_noabi::client*>&)
71
94
101 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<mongocxx::v_noabi::pool*>&)
103
107 using ns_pair = std::pair<std::string, std::string>;
108
127
136
182 kms_providers(bsoncxx::v_noabi::document::view_or_value kms_providers);
183
190 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
192
217 tls_opts(bsoncxx::v_noabi::document::view_or_value tls_opts);
218
225 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
226 tls_opts() const;
227
252 schema_map(bsoncxx::v_noabi::document::view_or_value schema_map);
253
260 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
261 schema_map() const;
262
283 encrypted_fields_map(bsoncxx::v_noabi::document::view_or_value encrypted_fields_map);
284
291 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
293
308
316
331
339
391 extra_options(bsoncxx::v_noabi::document::view_or_value extra);
392
399 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
401
402 private:
403 friend ::mongocxx::v_noabi::client;
404 friend ::mongocxx::v_noabi::pool;
405
406 void* convert() const;
407
408 bool _bypass;
409 bool _bypass_query_analysis;
410 stdx::optional<mongocxx::v_noabi::client*> _key_vault_client;
411 stdx::optional<mongocxx::v_noabi::pool*> _key_vault_pool;
412 stdx::optional<ns_pair> _key_vault_namespace;
413 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _kms_providers;
414 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _tls_opts;
415 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _schema_map;
416 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _encrypted_fields_map;
417 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _extra_options;
418};
419
420} // namespace options
421} // namespace v_noabi
422} // namespace mongocxx
423
424// CXX-2770: missing include of postlude header.
425#if defined(MONGOCXX_TEST_MACRO_GUARDS_FIX_MISSING_POSTLUDE)
427#endif
428
Declares mongocxx::v_noabi::options::auto_encryption.
Class representing options for automatic client-side encryption.
Definition auto_encryption.hpp:37
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & tls_opts() const
Gets the TLS options.
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & schema_map() const
Gets the schema map.
const stdx::optional< ns_pair > & key_vault_namespace() const
Gets the key vault namespace.
bool bypass_query_analysis() const
Gets a boolean specifying whether or not query analysis is bypassed.
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & encrypted_fields_map() const
Get encrypted fields map.
const stdx::optional< mongocxx::v_noabi::pool * > & key_vault_pool() const
Gets the key vault pool.
bool bypass_auto_encryption() const
Gets a boolean specifying whether or not auto encryption is bypassed.
const stdx::optional< mongocxx::v_noabi::client * > & key_vault_client() const
Gets the key vault client.
std::pair< std::string, std::string > ns_pair
Represents the name of a database and a collection.
Definition auto_encryption.hpp:107
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & extra_options() const
Gets extra options related to the mongocryptd process.
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & kms_providers() const
Gets the KMS providers.
Class representing the optional arguments to a MongoDB driver client object.
Definition client.hpp:39
Class representing the optional arguments to a MongoDB driver pool object. Pool options logically ext...
Definition pool.hpp:31
Declares mongocxx::v_noabi::client.
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition fwd.hpp:222
The mongocxx macro guard postlude header.
The mongocxx macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
The top-level namespace reserved for the C++ standard library.
Provides std::optional-related polyfills for library API usage.
Declares mongocxx::v_noabi::pool.
Redeclares bsoncxx::v_noabi::stdx in mongocxx::v_noabi::stdx for internal use.