Leosac
0.8.0
Open Source Access Control
CRUDHandler.hpp
Go to the documentation of this file.
1
/*
2
Copyright (C) 2014-2017 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 "
modules/websock-api/api/CRUDResourceHandler.hpp
"
23
24
namespace
Leosac
25
{
26
namespace
Module
27
{
28
namespace
Wiegand
29
{
30
class
CRUDHandler
:
public
WebSockAPI::CRUDResourceHandler
31
{
32
public
:
33
explicit
CRUDHandler
(
const
WebSockAPI::RequestContext
&ctx);
34
35
static
WebSockAPI::CRUDResourceHandlerUPtr
36
instanciate
(
WebSockAPI::RequestContext
);
37
38
std::vector<ActionActionParam>
39
required_permission
(
Verb
verb,
const
WebSockAPI::json
&req)
const override
;
40
41
boost::optional<WebSockAPI::json>
42
create_impl
(
const
WebSockAPI::json
&req)
override
;
43
44
boost::optional<WebSockAPI::json>
45
read_impl
(
const
WebSockAPI::json
&req)
override
;
46
47
boost::optional<WebSockAPI::json>
48
update_impl
(
const
WebSockAPI::json
&req)
override
;
49
50
boost::optional<WebSockAPI::json>
51
delete_impl
(
const
WebSockAPI::json
&req)
override
;
52
};
53
}
54
}
55
}
Leosac::Module::Wiegand::CRUDHandler::delete_impl
boost::optional< WebSockAPI::json > delete_impl(const WebSockAPI::json &req) override
Definition:
CRUDHandler.cpp:157
Leosac::Module::Wiegand::CRUDHandler::read_impl
boost::optional< WebSockAPI::json > read_impl(const WebSockAPI::json &req) override
Definition:
CRUDHandler.cpp:102
Leosac::Module::Wiegand::CRUDHandler::CRUDHandler
CRUDHandler(const WebSockAPI::RequestContext &ctx)
Definition:
CRUDHandler.cpp:170
Leosac::Module::Wiegand::CRUDHandler::update_impl
boost::optional< WebSockAPI::json > update_impl(const WebSockAPI::json &req) override
Definition:
CRUDHandler.cpp:139
CRUDResourceHandler.hpp
Leosac::Module::Wiegand::CRUDHandler::required_permission
std::vector< ActionActionParam > required_permission(Verb verb, const WebSockAPI::json &req) const override
Definition:
CRUDHandler.cpp:37
Leosac::Module::WebSockAPI::CRUDResourceHandlerUPtr
std::unique_ptr< CRUDResourceHandler > CRUDResourceHandlerUPtr
Definition:
WebSockFwd.hpp:39
Leosac::Module::WebSockAPI::CRUDResourceHandler
Base CRUD handler for use within the websocket module.
Definition:
CRUDResourceHandler.hpp:84
Leosac::Module::Wiegand::CRUDHandler::instanciate
static WebSockAPI::CRUDResourceHandlerUPtr instanciate(WebSockAPI::RequestContext)
Definition:
CRUDHandler.cpp:176
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition:
APIStatusCode.hpp:22
Leosac::Module::Wiegand::CRUDHandler::create_impl
boost::optional< WebSockAPI::json > create_impl(const WebSockAPI::json &req) override
Definition:
CRUDHandler.cpp:75
Leosac::Module::Wiegand::CRUDHandler
Definition:
CRUDHandler.hpp:30
Leosac::Module::WebSockAPI::json
nlohmann::json json
Definition:
AccessOverview.hpp:30
Leosac::Module::WebSockAPI::RequestContext
Holds valuable pointer to provide context to a request.
Definition:
RequestContext.hpp:36
Leosac::Module::WebSockAPI::ICRUDResourceHandler::Verb
Verb
Definition:
CRUDResourceHandler.hpp:43
src
modules
wiegand
ws
CRUDHandler.hpp
Generated on Tue Mar 22 2022 10:48:24 for Leosac by
1.8.17