diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:54:23 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-24 09:54:44 +0000 |
commit | 836b47cb7e99a977c5a23b059ca1d0b5065d310e (patch) | |
tree | 1604da8f482d02effa033c94a84be42bc0c848c3 /web/api/web_api.h | |
parent | Releasing debian version 1.44.3-2. (diff) | |
download | netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.tar.xz netdata-836b47cb7e99a977c5a23b059ca1d0b5065d310e.zip |
Merging upstream version 1.46.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web/api/web_api.h')
-rw-r--r-- | web/api/web_api.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/web/api/web_api.h b/web/api/web_api.h deleted file mode 100644 index a6b3716b7..000000000 --- a/web/api/web_api.h +++ /dev/null @@ -1,57 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-or-later - -#ifndef NETDATA_WEB_API_H -#define NETDATA_WEB_API_H 1 - -#include "daemon/common.h" -#include "web/api/badges/web_buffer_svg.h" -#include "web/api/ilove/ilove.h" -#include "web/api/formatters/rrd2json.h" -#include "web/api/health/health_cmdapi.h" -#include "web/api/queries/weights.h" - -extern bool netdata_is_protected_by_bearer; -extern DICTIONARY *netdata_authorized_bearers; -typedef enum __attribute__((packed)) { - BEARER_STATUS_NO_BEARER_IN_HEADERS, - BEARER_STATUS_BEARER_DOES_NOT_FIT, - BEARER_STATUS_NOT_PARSABLE, - BEARER_STATUS_EXTRACTED_FROM_HEADER, - BEARER_STATUS_NO_BEARERS_DICTIONARY, - BEARER_STATUS_NOT_FOUND_IN_DICTIONARY, - BEARER_STATUS_EXPIRED, - BEARER_STATUS_AVAILABLE_AND_VALIDATED, -} BEARER_STATUS; - -BEARER_STATUS api_check_bearer_token(struct web_client *w); -BEARER_STATUS extract_bearer_token_from_request(struct web_client *w, char *dst, size_t dst_len); - -struct web_api_command { - const char *command; - uint32_t hash; - WEB_CLIENT_ACL acl; - int (*callback)(RRDHOST *host, struct web_client *w, char *url); - unsigned int allow_subpaths; -}; - -struct web_client; - -int web_client_api_request_vX(RRDHOST *host, struct web_client *w, char *url_path_endpoint, struct web_api_command *api_commands); - -static inline void fix_google_param(char *s) { - if(unlikely(!s || !*s)) return; - - for( ; *s ;s++) { - if(!isalnum(*s) && *s != '.' && *s != '_' && *s != '-') - *s = '_'; - } -} - -int web_client_api_request_weights(RRDHOST *host, struct web_client *w, char *url, WEIGHTS_METHOD method, WEIGHTS_FORMAT format, size_t api_version); - -bool web_client_interrupt_callback(void *data); - -#include "web_api_v1.h" -#include "web_api_v2.h" - -#endif //NETDATA_WEB_API_H |