Leosac  0.8.0
Open Source Access Control
Leosac::Audit::IWSAPICall Class Referenceabstract

An audit entry dedicated to tracing API call. More...

#include <IWSAPICall.hpp>

+ Inheritance diagram for Leosac::Audit::IWSAPICall:
+ Collaboration diagram for Leosac::Audit::IWSAPICall:

Public Member Functions

 MAKE_VISITABLE ()
 
virtual void method (const std::string &)=0
 Set the API method that was targeted by the call. More...
 
virtual const std::string & method () const =0
 
virtual void uuid (const std::string &)=0
 Set the UUID of the request. More...
 
virtual const std::string & uuid () const =0
 
virtual void status_code (APIStatusCode)=0
 Set the status_code of the reponse. More...
 
virtual APIStatusCode status_code () const =0
 
virtual void status_string (const std::string &)=0
 Set the status string of the response. More...
 
virtual const std::string & status_string () const =0
 
virtual void source_endpoint (const std::string &)=0
 Set the source endpoint. More...
 
virtual const std::string & source_endpoint () const =0
 
virtual void request_content (const std::string &)=0
 The (JSON) content of the request. More...
 
virtual void response_content (const std::string &)=0
 
virtual void database_operations (uint16_t nb_operation)=0
 The number of database queries. More...
 
- Public Member Functions inherited from Leosac::Audit::IAuditEntry
 MAKE_VISITABLE ()
 
virtual AuditEntryId id () const =0
 Retrieve the identifier of the entry. More...
 
virtual void finalize ()=0
 Mark the entry as finalized, and update it wrt the database. More...
 
virtual bool finalized () const =0
 Is this entry finalized. More...
 
virtual void reload ()=0
 Reload the object from the database. More...
 
virtual void event_mask (const EventMask &mask)=0
 Set the event mask for the entry. More...
 
virtual const EventMaskevent_mask () const =0
 Retrieve the current event mask. More...
 
virtual void author (Auth::UserPtr user)=0
 Set the author of the entry. More...
 
virtual Auth::UserId author_id () const =0
 Retrieve the user id of the author of this entry. More...
 
virtual void set_parent (IAuditEntryPtr parent)=0
 Set parent as the parent audit entry for this entry. More...
 
virtual IAuditEntryPtr parent () const =0
 Retrieve the parent of this entry. More...
 
virtual void remove_parent ()=0
 Remove the parent-child relationship between this entry and its parent. More...
 
virtual size_t children_count () const =0
 Returns the number of children that this entry has. More...
 
virtual boost::posix_time::ptime timestamp () const =0
 Retrieve unix timestamp. More...
 
virtual std::string generate_description () const
 Generate a description for this event. More...
 
virtual size_t version () const =0
 Returns the ODB version of the object. More...
 
- Public Member Functions inherited from Leosac::Tools::IVisitable
virtual void accept (::Leosac::Tools::BaseVisitor &)=0
 Accept a visitor that may mutate this. More...
 
virtual void accept (::Leosac::Tools::BaseVisitor &) const =0
 Accept a visitor that will not mutate this. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Leosac::Tools::IVisitable
template<class T >
static bool visitor_dispatch (T &visited, BaseVisitor &visitor, bool abort_on_failure)
 

Detailed Description

An audit entry dedicated to tracing API call.

The various parameters of the API call are saved:

  1. Source endpoint
  2. API method
  3. Request/Response content
  4. ...

Definition at line 39 of file IWSAPICall.hpp.

Member Function Documentation

◆ database_operations()

virtual void Leosac::Audit::IWSAPICall::database_operations ( uint16_t  nb_operation)
pure virtual

The number of database queries.

Implemented in Leosac::Audit::WSAPICall.

◆ MAKE_VISITABLE()

Leosac::Audit::IWSAPICall::MAKE_VISITABLE ( )

◆ method() [1/2]

virtual const std::string& Leosac::Audit::IWSAPICall::method ( ) const
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ method() [2/2]

virtual void Leosac::Audit::IWSAPICall::method ( const std::string &  )
pure virtual

Set the API method that was targeted by the call.

Implemented in Leosac::Audit::WSAPICall.

◆ request_content()

virtual void Leosac::Audit::IWSAPICall::request_content ( const std::string &  )
pure virtual

The (JSON) content of the request.

Implemented in Leosac::Audit::WSAPICall.

◆ response_content()

virtual void Leosac::Audit::IWSAPICall::response_content ( const std::string &  )
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ source_endpoint() [1/2]

virtual const std::string& Leosac::Audit::IWSAPICall::source_endpoint ( ) const
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ source_endpoint() [2/2]

virtual void Leosac::Audit::IWSAPICall::source_endpoint ( const std::string &  )
pure virtual

Set the source endpoint.

Generally IP:PORT

Implemented in Leosac::Audit::WSAPICall.

◆ status_code() [1/2]

virtual APIStatusCode Leosac::Audit::IWSAPICall::status_code ( ) const
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ status_code() [2/2]

virtual void Leosac::Audit::IWSAPICall::status_code ( APIStatusCode  )
pure virtual

Set the status_code of the reponse.

Implemented in Leosac::Audit::WSAPICall.

◆ status_string() [1/2]

virtual const std::string& Leosac::Audit::IWSAPICall::status_string ( ) const
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ status_string() [2/2]

virtual void Leosac::Audit::IWSAPICall::status_string ( const std::string &  )
pure virtual

Set the status string of the response.

Implemented in Leosac::Audit::WSAPICall.

◆ uuid() [1/2]

virtual const std::string& Leosac::Audit::IWSAPICall::uuid ( ) const
pure virtual

Implemented in Leosac::Audit::WSAPICall.

◆ uuid() [2/2]

virtual void Leosac::Audit::IWSAPICall::uuid ( const std::string &  )
pure virtual

Set the UUID of the request.

Implemented in Leosac::Audit::WSAPICall.


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