summaryrefslogtreecommitdiff
path: root/src/config.h
blob: 41d8c411e9c6213b5599d17fe7ddc924a6e382cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef BOKF_CONFIG_H
#define BOKF_CONFIG_H

#include <stddef.h>

struct config {
    char *socket_path;
    char *db_path;
    char *backup_dir;
    char *export_dir;
    char *tcp_addr;
    int tcp_enabled;
    char *tls_addr;
    int tls_enabled;
    char *tls_cert;
    char *tls_key;
    int log_level;
    int allow_org_create;
    int audit_reads;
    char *synchronous;
    char *chart_k2_file;
    char *chart_k3_file;
    long session_ttl;
    long max_line_bytes;
    long max_attachment_bytes;
};

extern struct config g_cfg;

void config_defaults(void);
int config_load_file(const char *path, char **err);
void config_apply_env(void);
void config_free(void);

#endif