2016-11-02 18:09:38 +00:00
|
|
|
#ifndef gateway_h
|
|
|
|
#define gateway_h
|
|
|
|
|
|
|
|
struct HTTPHeader {
|
|
|
|
char* header;
|
|
|
|
char* value;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct HTTPHeaders {
|
|
|
|
struct HTTPHeader** headers;
|
|
|
|
int num_elements;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct PathPrefixes {
|
|
|
|
int num_elements;
|
|
|
|
char** prefixes;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Gateway {
|
|
|
|
char* root_redirect;
|
|
|
|
int writable;
|
|
|
|
struct PathPrefixes path_prefixes;
|
2016-11-28 13:09:00 +00:00
|
|
|
struct HTTPHeaders* http_headers;
|
2016-11-02 18:09:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int repo_config_gateway_http_header_init(struct HTTPHeaders* http_headers, char** headers, char** values, int num_elements);
|
|
|
|
|
2016-11-28 13:09:00 +00:00
|
|
|
int repo_config_gateway_new(struct Gateway** gateway);
|
|
|
|
|
|
|
|
int repo_config_gateway_free(struct Gateway* gateway);
|
|
|
|
|
2016-11-02 18:09:38 +00:00
|
|
|
#endif /* gateway_h */
|