Leosac  0.8.0
Open Source Access Control
IWSAPICall.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 
22 #include "IAuditEntry.hpp"
23 #include "core/APIStatusCode.hpp"
24 #include "tools/db/db_fwd.hpp"
25 
26 namespace Leosac
27 {
28 namespace Audit
29 {
39 class IWSAPICall : virtual public IAuditEntry
40 {
41  public:
46  virtual void method(const std::string &) = 0;
47 
48  virtual const std::string &method() const = 0;
49 
53  virtual void uuid(const std::string &) = 0;
54 
55  virtual const std::string &uuid() const = 0;
56 
60  virtual void status_code(APIStatusCode) = 0;
61 
62  virtual APIStatusCode status_code() const = 0;
63 
67  virtual void status_string(const std::string &) = 0;
68 
69  virtual const std::string &status_string() const = 0;
70 
74  virtual void source_endpoint(const std::string &) = 0;
75 
76  virtual const std::string &source_endpoint() const = 0;
77 
81  virtual void request_content(const std::string &) = 0;
82 
83  /*
84  * The (JSON) content of the response.
85  */
86  virtual void response_content(const std::string &) = 0;
87 
91  virtual void database_operations(uint16_t nb_operation) = 0;
92 };
93 }
94 }
Leosac::Audit::IWSAPICall::response_content
virtual void response_content(const std::string &)=0
Leosac::Audit::IWSAPICall::status_code
virtual APIStatusCode status_code() const =0
Leosac::Audit::IWSAPICall::MAKE_VISITABLE
MAKE_VISITABLE()
Leosac::Audit::IWSAPICall::source_endpoint
virtual const std::string & source_endpoint() const =0
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Audit::IWSAPICall::database_operations
virtual void database_operations(uint16_t nb_operation)=0
The number of database queries.
Leosac::Audit::IWSAPICall::request_content
virtual void request_content(const std::string &)=0
The (JSON) content of the request.
APIStatusCode.hpp
Leosac::Audit::IWSAPICall::status_string
virtual const std::string & status_string() const =0
Leosac::APIStatusCode
APIStatusCode
Those are the Leosac API status code.
Definition: APIStatusCode.hpp:31
Leosac::Audit::IAuditEntry
Base interface to Audit object.
Definition: IAuditEntry.hpp:47
db_fwd.hpp
IAuditEntry.hpp
Leosac::Audit::IWSAPICall::uuid
virtual const std::string & uuid() const =0
Leosac::Audit::IWSAPICall::method
virtual const std::string & method() const =0
Leosac::Audit::IWSAPICall
An audit entry dedicated to tracing API call.
Definition: IWSAPICall.hpp:39