Virtru SDK for C++  2.8.0
Virtru C++ SDK library - Create, Read, and Manage TDF3 Files
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
virtru::ConfigService Class Reference

#include <virtru_config_service.h>

Public Member Functions

 ConfigService (const std::string &configUrl)
 
void getConfig (const std::string &configKey, const std::string &outputFilePath)
 
void createConfig (const std::string &configKey, const std::string &inputFilePath)
 
std::string getConfigMetaData (const std::string &configKey)
 
void addHeader (const std::string &key, const std::string &value)
 
 ~ConfigService ()=default
 

Private Attributes

std::string m_configUrl
 
std::shared_ptr< INetworkm_httpServiceProvider
 
HttpHeaders m_additionalHeaders
 

Constructor & Destructor Documentation

virtru::ConfigService::ConfigService ( const std::string &  configUrl)

Constructor

Parameters
configUrl- https-prefixed URL where Config Service is hosted
virtru::ConfigService::~ConfigService ( )
default

Destructor.

Member Function Documentation

void virtru::ConfigService::addHeader ( const std::string &  key,
const std::string &  value 
)

Add additional header

Parameters
key- name of the Header, e.g. Connection
value- value of the Header, e.g. keep-alive
void virtru::ConfigService::createConfig ( const std::string &  configKey,
const std::string &  inputFilePath 
)

Create the Config Service entry

Parameters
configKey- compound key of the configuration to post
inputFilePath- path to the file to read the config from
void virtru::ConfigService::getConfig ( const std::string &  configKey,
const std::string &  outputFilePath 
)

Get the config from Config Service

Parameters
configKey- compound key of the configuration to get
outputFilePath- path to the file to save the output
std::string virtru::ConfigService::getConfigMetaData ( const std::string &  configKey)

Returns Configuration Metadata for a given key.

Parameters
configKey- compound key of the configuration to post
inputFilePath- path to the file to read the config
Returns
- Last-Modified Header value

Member Data Documentation

HttpHeaders virtru::ConfigService::m_additionalHeaders
private
std::string virtru::ConfigService::m_configUrl
private
std::shared_ptr<INetwork> virtru::ConfigService::m_httpServiceProvider
private

The documentation for this class was generated from the following file: