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::AuditService Class Reference

#include <virtru_audit_service.h>

Public Member Functions

 AuditService (const std::string &auditUrl)
 
std::string getEvents ()
 
std::string getEventById (const std::string &eventId)
 
void addQueryParam (const std::string &key, const std::string &value)
 
void addHeader (const std::string &key, const std::string &value)
 
 ~AuditService ()=default
 

Private Member Functions

std::string makeHttpGet (const std::string &fullUrl)
 

Private Attributes

std::string m_auditUrl
 
std::shared_ptr< INetworkm_httpServiceProvider
 
std::string m_queryString
 
HttpHeaders m_additionalHeaders
 

Constructor & Destructor Documentation

virtru::AuditService::AuditService ( const std::string &  auditUrl)

Constructor

Parameters
auditUrl- https-prefixed URL where Audit Service is hosted
virtru::AuditService::~AuditService ( )
default

Destructor.

Member Function Documentation

void virtru::AuditService::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::AuditService::addQueryParam ( const std::string &  key,
const std::string &  value 
)

Construct query string

Parameters
key- name of the Query, e.g. eventType
value- value of the Query, e.g. : encrypt
std::string virtru::AuditService::getEventById ( const std::string &  eventId)

Get an event which matches the provided event id.

Parameters
eventId- Event Id
Returns
- JSON
std::string virtru::AuditService::getEvents ( )

Get all Audit Events

Returns
- All audit events as JSON
std::string virtru::AuditService::makeHttpGet ( const std::string &  fullUrl)
private

Member Data Documentation

HttpHeaders virtru::AuditService::m_additionalHeaders
private
std::string virtru::AuditService::m_auditUrl
private
std::shared_ptr<INetwork> virtru::AuditService::m_httpServiceProvider
private
std::string virtru::AuditService::m_queryString
private

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