MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
client_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
22
25
26#include <mongocxx/stdx.hpp>
27
29
30namespace mongocxx {
31namespace v_noabi {
32namespace options {
33
38 public:
55
62 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<mongocxx::v_noabi::client*>&)
64
68 using ns_pair = std::pair<std::string, std::string>;
69
88
96 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<ns_pair>&) key_vault_namespace() const;
97
143 kms_providers(bsoncxx::v_noabi::document::view_or_value kms_providers);
144
151 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
153
178 tls_opts(bsoncxx::v_noabi::document::view_or_value tls_opts);
179
186 MONGOCXX_ABI_EXPORT_CDECL(const stdx::optional<bsoncxx::v_noabi::document::view_or_value>&)
187 tls_opts() const;
188
189 private:
190 friend ::mongocxx::v_noabi::client_encryption;
191
192 void* convert() const;
193
194 stdx::optional<mongocxx::v_noabi::client*> _key_vault_client;
195 stdx::optional<ns_pair> _key_vault_namespace;
196 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _kms_providers;
197 stdx::optional<bsoncxx::v_noabi::document::view_or_value> _tls_opts;
198};
199
200} // namespace options
201} // namespace v_noabi
202} // namespace mongocxx
203
204#include <mongocxx/config/postlude.hpp>
205
Class representing options for the object managing explicit client-side encryption.
Definition client_encryption.hpp:37
const stdx::optional< ns_pair > & key_vault_namespace() const
Gets the key vault namespace.
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & kms_providers() const
Gets the KMS providers.
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 client_encryption.hpp:68
const stdx::optional< bsoncxx::v_noabi::document::view_or_value > & tls_opts() const
Gets the TLS options.
Class representing the optional arguments to a MongoDB driver client object.
Definition client.hpp:39
Declares mongocxx::v_noabi::client.
Declares mongocxx::v_noabi::client_encryption.
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 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::options::client_encryption.
Redeclares bsoncxx::v_noabi::stdx in mongocxx::v_noabi::stdx for internal use.