Leosac  0.8.0
Open Source Access Control
Leosac::Module::WebSockAPI::LogGet Class Reference

Retrieve (part of) the logs generated Leosac. More...

#include <LogGet.hpp>

+ Inheritance diagram for Leosac::Module::WebSockAPI::LogGet:
+ Collaboration diagram for Leosac::Module::WebSockAPI::LogGet:

Public Member Functions

 LogGet (RequestContext ctx)
 
- Public Member Functions inherited from Leosac::Module::WebSockAPI::MethodHandler
 MethodHandler (RequestContext ctx)
 
virtual ~MethodHandler ()=default
 
json process (const ClientMessage &msg)
 The public process() method. More...
 
UserSecurityContextsecurity_context ()
 
ExecutionContext exec_context ()
 Returns a representation of the execution context of this request. More...
 

Static Public Member Functions

static MethodHandlerUPtr create (RequestContext)
 
- Static Public Member Functions inherited from Leosac::Module::WebSockAPI::MethodHandler
static MethodHandlerUPtr create (RequestContext)
 An example method that should be implemented in all subclasses. More...
 

Protected Member Functions

std::vector< ActionActionParamrequired_permission (const json &req) const override
 Return a list of "Action" / "ActionParam" that must pass before the request is processed. More...
 

Private Member Functions

virtual json process_impl (const json &req) override
 The API method implementation. More...
 

Additional Inherited Members

- Public Types inherited from Leosac::Module::WebSockAPI::MethodHandler
using Factory = MethodHandlerUPtr(*)(RequestContext)
 
- Protected Attributes inherited from Leosac::Module::WebSockAPI::MethodHandler
RequestContext ctx_
 

Detailed Description

Retrieve (part of) the logs generated Leosac.

In order for this call to work, database logging must be enabled.

Request:

  • p: The page number. Starts at 0.
  • ps: Page size: the number of item per page. Default to 20.
  • sort: Either 'asc' or 'desc'.

Response:

  • ...

Definition at line 44 of file LogGet.hpp.

Constructor & Destructor Documentation

◆ LogGet()

LogGet::LogGet ( RequestContext  ctx)

Definition at line 31 of file LogGet.cpp.

Member Function Documentation

◆ create()

MethodHandlerUPtr LogGet::create ( RequestContext  ctx)
static

Definition at line 36 of file LogGet.cpp.

◆ process_impl()

json LogGet::process_impl ( const json req)
overrideprivatevirtual

The API method implementation.

Returns
A json object that will be assigned to the content key in the JSON message sent to the client.

Implements Leosac::Module::WebSockAPI::MethodHandler.

Definition at line 41 of file LogGet.cpp.

◆ required_permission()

std::vector< ActionActionParam > LogGet::required_permission ( const json req) const
overrideprotectedvirtual

Return a list of "Action" / "ActionParam" that must pass before the request is processed.

Implements Leosac::Module::WebSockAPI::MethodHandler.

Definition at line 79 of file LogGet.cpp.


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