]> git.ipfire.org Git - thirdparty/pdns.git/blob - pdns/ws-api.hh
Merge pull request #3412 from pieterlexis/dnsdist-check-config
[thirdparty/pdns.git] / pdns / ws-api.hh
1 /*
2 PowerDNS Versatile Database Driven Nameserver
3 Copyright (C) 2002 - 2014 PowerDNS.COM BV
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License version 2
7 as published by the Free Software Foundation
8
9 Additionally, the license of this program contains a special
10 exception which allows to distribute the program in binary form when
11 it is linked against OpenSSL.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22 #ifndef PDNS_WSAPI_HH
23 #define PDNS_WSAPI_HH
24
25 #include <map>
26 #include "webserver.hh"
27
28 void apiServer(HttpRequest* req, HttpResponse* resp);
29 void apiServerDetail(HttpRequest* req, HttpResponse* resp);
30 void apiServerConfig(HttpRequest* req, HttpResponse* resp);
31 void apiServerSearchLog(HttpRequest* req, HttpResponse* resp);
32 void apiServerStatistics(HttpRequest* req, HttpResponse* resp);
33
34 // helpers
35 DNSName apiZoneIdToName(const string& id);
36 string apiZoneNameToId(const DNSName& name);
37 void apiCheckNameAllowedCharacters(const string& name);
38 void apiCheckQNameAllowedCharacters(const string& name);
39 DNSName apiNameToDNSName(const string& name);
40
41 // To be provided by product code.
42 void productServerStatisticsFetch(std::map<string,string>& out);
43
44 #endif /* PDNS_WSAPI_HH */