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 
21 
22 namespace Leosac
23 {
24 namespace Module
25 {
26 namespace Piface
27 {
35 {
36  public:
38 
41 
42  std::vector<ActionActionParam>
43  required_permission(Verb verb, const WebSockAPI::json &req) const override;
44 
45  boost::optional<WebSockAPI::json>
46  create_impl(const WebSockAPI::json &req) override;
47 
48  boost::optional<WebSockAPI::json>
49  read_impl(const WebSockAPI::json &req) override;
50 
51  boost::optional<WebSockAPI::json>
52  update_impl(const WebSockAPI::json &req) override;
53 
54  boost::optional<WebSockAPI::json>
55  delete_impl(const WebSockAPI::json &req) override;
56 };
57 }
58 }
59 }
Leosac::Module::Piface::CRUDHandler::instanciate
static WebSockAPI::CRUDResourceHandlerUPtr instanciate(WebSockAPI::RequestContext)
Definition: CRUDHandler.cpp:170
CRUDResourceHandler.hpp
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::Piface::CRUDHandler
CRUD Handler for GPIO backed by Piface module.
Definition: CRUDHandler.hpp:34
Leosac::Module::Piface::CRUDHandler::CRUDHandler
CRUDHandler(const WebSockAPI::RequestContext &ctx)
Definition: CRUDHandler.cpp:164
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Module::Piface::CRUDHandler::update_impl
boost::optional< WebSockAPI::json > update_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:135
Leosac::Module::Piface::CRUDHandler::read_impl
boost::optional< WebSockAPI::json > read_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:99
Leosac::Module::Piface::CRUDHandler::required_permission
std::vector< ActionActionParam > required_permission(Verb verb, const WebSockAPI::json &req) const override
Definition: CRUDHandler.cpp:37
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::Piface::CRUDHandler::delete_impl
boost::optional< WebSockAPI::json > delete_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:151
Leosac::Module::Piface::CRUDHandler::create_impl
boost::optional< WebSockAPI::json > create_impl(const WebSockAPI::json &req) override
Definition: CRUDHandler.cpp:73
Leosac::Module::WebSockAPI::ICRUDResourceHandler::Verb
Verb
Definition: CRUDResourceHandler.hpp:43