29 #ifndef SRC_DOCKER_UTIL_H_
30 #define SRC_DOCKER_UTIL_H_
37 #define _CRT_SECURE_NO_WARNINGS
39 #include <json-c/json_object.h>
100 MODULE_API
void add_filter_str(json_object* filters,
const char* name,
const char* value);
109 MODULE_API
void add_filter_int(json_object* filters,
const char* name,
int value);
128 MODULE_API
char*
str_clone(
const char* from);
138 MODULE_API
char*
get_attr_str(json_object* obj,
const char* name);
157 MODULE_API
int get_attr_int(json_object* obj,
const char* name);
195 MODULE_API
long get_attr_long(json_object* obj,
const char* name);
252 MODULE_API time_t
get_attr_time(json_object* obj,
const char* name);
292 MODULE_API json_type
get_attr_type(json_object* obj,
const char* name);
313 MODULE_API
void add_array_str(json_object* obj,
const char* name,
const char* value);
322 MODULE_API
void add_array_int(json_object* obj,
const char* name,
int value);
enum _config_error d_err_t
Definition: docker_result.h:60
json_object * get_attr_json_object(json_object *obj, const char *name)
Definition: docker_util.c:194
void parse_docker_stats_readtime(char *date_str, struct tm *tm)
Parse the docker stats read time from the given string.
Definition: docker_util.c:314
d_err_t set_attr_long(json_object *obj, const char *name, long val)
Definition: docker_util.c:120
int get_attr_boolean(json_object *obj, const char *name)
Definition: docker_util.c:62
int get_attr_int(json_object *obj, const char *name)
Definition: docker_util.c:89
d_err_t set_attr_boolean(json_object *obj, const char *name, int val)
Definition: docker_util.c:77
void add_array_int(json_object *obj, const char *name, int value)
Definition: docker_util.c:283
d_err_t set_attr_unsigned_long(json_object *obj, const char *name, unsigned long val)
Definition: docker_util.c:141
long long get_attr_long_long(json_object *obj, const char *name)
Definition: docker_util.c:153
void add_filter_int(json_object *filters, const char *name, int value)
Definition: docker_util.c:259
json_type get_attr_type(json_object *obj, const char *name)
Definition: docker_util.c:204
d_err_t make_pair(pair **p, char *key, char *value)
Definition: docker_util.c:219
char * get_attr_str(json_object *obj, const char *name)
Definition: docker_util.c:41
char * calculate_size(uint64_t size)
Definition: docker_util.c:338
d_err_t set_attr_str(json_object *obj, const char *name, const char *val)
Definition: docker_util.c:50
void add_filter_str(json_object *filters, const char *name, const char *value)
Definition: docker_util.c:249
d_err_t set_attr_long_long(json_object *obj, const char *name, long long val)
Definition: docker_util.c:162
d_err_t set_attr_json_object(json_object *obj, const char *name, json_object *val)
Definition: docker_util.c:200
time_t get_attr_time(json_object *obj, const char *name)
Definition: docker_util.c:174
char * get_key(pair *p)
Definition: docker_util.c:234
const char * filters_to_str(json_object *filters)
Definition: docker_util.c:269
char * str_clone(const char *from)
Definition: docker_util.c:30
d_err_t set_attr_time(json_object *obj, const char *name, time_t val)
Definition: docker_util.c:182
json_object * make_filters()
Definition: docker_util.c:245
long get_attr_long(json_object *obj, const char *name)
Definition: docker_util.c:111
char * get_value(pair *p)
Definition: docker_util.c:230
void free_pair(pair *p)
Definition: docker_util.c:238
void add_array_str(json_object *obj, const char *name, const char *value)
Definition: docker_util.c:273
void parse_iso_datetime(char *date_str, struct tm *tm)
Parse the iso date time from given string.
Definition: docker_util.c:295
const char * get_json_string(json_object *obj)
Definition: docker_util.c:215
unsigned long get_attr_unsigned_long(json_object *obj, const char *name)
Definition: docker_util.c:132
d_err_t set_attr_int(json_object *obj, const char *name, int val)
Definition: docker_util.c:99
Definition: docker_util.h:46
char * key
Definition: docker_util.h:47
char * value
Definition: docker_util.h:48