opsick
config.h
Go to the documentation of this file.
1/*
2 Copyright 2020 Raphael Beck
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15*/
16
17#ifndef OPSICK_CONFIG_H
18#define OPSICK_CONFIG_H
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24#include <stdint.h>
25#include "opsick/constants.h"
26
40
45{
51 uint8_t log;
52
57 uint16_t port;
58
63 uint8_t threads;
64
69 uint64_t max_clients;
70
76
81 uint64_t max_body_size;
82};
83
90
91// ---------------------------------------------------------------------------------------------------
92
97{
103 uint64_t max_users;
104
115
123
129
134
139
144
149
155 uint8_t api_key_public[32];
156
163};
164
171
172#ifdef __cplusplus
173} // extern "C"
174#endif
175
176#endif // OPSICK_CONFIG_H
int opsick_config_load()
int opsick_config_get_hostsettings(struct opsick_config_hostsettings *out)
int opsick_config_get_adminsettings(struct opsick_config_adminsettings *out)
Opsick constants (pre-processor #defines).
#define OPSICK_MAX_USER_CREATION_PASSWORD_LENGTH
Definition: constants.h:53
Definition: config.h:97
uint8_t use_index_html
Definition: config.h:114
char user_registration_password[OPSICK_MAX_USER_CREATION_PASSWORD_LENGTH]
Definition: config.h:128
uint8_t api_key_algo
Definition: config.h:148
uint64_t max_users
Definition: config.h:103
uint32_t argon2_parallelism
Definition: config.h:143
uint8_t api_key_public[32]
Definition: config.h:155
uint32_t argon2_memory_cost_kib
Definition: config.h:138
char api_key_public_hexstr[64+1]
Definition: config.h:162
uint32_t argon2_time_cost
Definition: config.h:133
uint64_t key_refresh_interval_hours
Definition: config.h:122
Definition: config.h:45
uint64_t max_clients
Definition: config.h:69
uint8_t log
Definition: config.h:51
uint8_t threads
Definition: config.h:63
uint64_t max_header_size
Definition: config.h:75
uint16_t port
Definition: config.h:57
uint64_t max_body_size
Definition: config.h:81