diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-07-05 18:44:43 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-07-05 18:44:43 +0300 |
commit | 842aa9ab46ec5e065ac55b1d186ef9ea81c14af4 (patch) | |
tree | b6504a70fa739bd082d1ae7a583b35e0a827baa4 /src/nxt_conf.h | |
parent | 4fe5d22dcc5d6e42c5faa6fe06dd076cde799324 (diff) | |
download | unit-842aa9ab46ec5e065ac55b1d186ef9ea81c14af4.tar.gz unit-842aa9ab46ec5e065ac55b1d186ef9ea81c14af4.tar.bz2 |
Configuration: basic validation of schema.
Diffstat (limited to 'src/nxt_conf.h')
-rw-r--r-- | src/nxt_conf.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/nxt_conf.h b/src/nxt_conf.h index 45d5ece4..64997b56 100644 --- a/src/nxt_conf.h +++ b/src/nxt_conf.h @@ -9,6 +9,15 @@ #define _NXT_CONF_INCLUDED_ +#define NXT_CONF_NULL 0x01 +#define NXT_CONF_BOOLEAN 0x02 +#define NXT_CONF_INTEGER 0x04 +#define NXT_CONF_NUMBER 0x08 +#define NXT_CONF_STRING 0x10 +#define NXT_CONF_ARRAY 0x20 +#define NXT_CONF_OBJECT 0x40 + + typedef struct nxt_conf_value_s nxt_conf_value_t; typedef struct nxt_conf_op_s nxt_conf_op_t; @@ -40,6 +49,8 @@ typedef struct { } nxt_conf_json_pretty_t; +nxt_uint_t nxt_conf_type(nxt_conf_value_t *value); + nxt_conf_value_t *nxt_conf_get_path(nxt_conf_value_t *value, nxt_str_t *path); nxt_conf_value_t *nxt_conf_get_object_member(nxt_conf_value_t *value, nxt_str_t *name, uint32_t *index); @@ -64,5 +75,7 @@ size_t nxt_conf_json_length(nxt_conf_value_t *value, u_char *nxt_conf_json_print(u_char *p, nxt_conf_value_t *value, nxt_conf_json_pretty_t *pretty); +nxt_int_t nxt_conf_validate(nxt_conf_value_t *value); + #endif /* _NXT_CONF_INCLUDED_ */ |