MongoDB C++ Driver current
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
27
28namespace mongocxx {
29namespace v_noabi {
30namespace options {
31
36 public:
41
60
67 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::client*> const&)
69
92
99 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::pool*> const&)
101
105 using ns_pair = std::pair<std::string, std::string>;
106
125
133 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<ns_pair> const&)
135
181 kms_providers(bsoncxx::v_noabi::document::view_or_value kms_providers);
182
189 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
191
216 tls_opts(bsoncxx::v_noabi::document::view_or_value tls_opts);
217
224 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
225 tls_opts() const;
226
251 schema_map(bsoncxx::v_noabi::document::view_or_value schema_map);
252
259 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
260 schema_map() const;
261
282 encrypted_fields_map(bsoncxx::v_noabi::document::view_or_value encrypted_fields_map);
283
290 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
292
307
315
330
338
390 extra_options(bsoncxx::v_noabi::document::view_or_value extra);
391
398 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
400
401 private:
402 friend ::mongocxx::v_noabi::client;
403 friend ::mongocxx::v_noabi::pool;
404
405 void* convert() const;
406
407 bool _bypass;
408 bool _bypass_query_analysis;
409 bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::client*> _key_vault_client;
410 bsoncxx::v_noabi::stdx::optional<mongocxx::v_noabi::pool*> _key_vault_pool;
411 bsoncxx::v_noabi::stdx::optional<ns_pair> _key_vault_namespace;
412 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _kms_providers;
413 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _tls_opts;
414 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _schema_map;
415 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _encrypted_fields_map;
416 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _extra_options;
417};
418
419} // namespace options
420} // namespace v_noabi
421} // namespace mongocxx
422
423#include <mongocxx/config/postlude.hpp>
424
Declares mongocxx::v_noabi::options::auto_encryption.
Used by mongocxx::v_noabi::options::client::auto_encryption_opts.
Definition auto_encryption.hpp:35
bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::client * > const & key_vault_client() const
Gets the key vault client.
bsoncxx::v_noabi::stdx::optional< ns_pair > const & key_vault_namespace() const
Gets the key vault namespace.
bsoncxx::v_noabi::stdx::optional< mongocxx::v_noabi::pool * > const & key_vault_pool() const
Gets the key vault pool.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & schema_map() const
Gets the schema map.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & kms_providers() const
Gets the KMS providers.
bool bypass_query_analysis() const
Gets a boolean specifying whether or not query analysis is bypassed.
bool bypass_auto_encryption() const
Gets a boolean specifying whether or not auto encryption is bypassed.
std::pair< std::string, std::string > ns_pair
Represents the name of a database and a collection.
Definition auto_encryption.hpp:105
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & tls_opts() const
Gets the TLS options.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & encrypted_fields_map() const
Get encrypted fields map.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view_or_value > const & extra_options() const
Gets extra options related to the mongocryptd process.
Used by clients.
Definition client.hpp:37
Used by mongocxx::v_noabi::pool.
Definition pool.hpp:30
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 export.hpp:52
The mongocxx v_noabi 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.
Declares mongocxx::v_noabi::pool.
Provides std::optional-related polyfills for library API usage.