| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#ifndef AWS_SDKUTILS_ENDPOINTS_EVAL_UTIL_H |
| 7 |
#define AWS_SDKUTILS_ENDPOINTS_EVAL_UTIL_H |
| 8 |
|
| 9 |
#include <aws/sdkutils/sdkutils.h> |
| 10 |
|
| 11 |
struct aws_string; |
| 12 |
struct aws_byte_buf; |
| 13 |
struct aws_json_value; |
| 14 |
|
| 15 |
|
| 16 |
struct aws_owning_cursor { |
| 17 |
struct aws_byte_cursor cur; |
| 18 |
struct aws_string *string; |
| 19 |
}; |
| 20 |
|
| 21 |
|
| 22 |
AWS_SDKUTILS_API struct aws_owning_cursor aws_endpoints_owning_cursor_create( |
| 23 |
struct aws_allocator *allocator, |
| 24 |
const struct aws_string *str); |
| 25 |
|
| 26 |
AWS_SDKUTILS_API struct aws_owning_cursor aws_endpoints_owning_cursor_from_string(struct aws_string *str); |
| 27 |
|
| 28 |
AWS_SDKUTILS_API struct aws_owning_cursor aws_endpoints_owning_cursor_from_cursor( |
| 29 |
struct aws_allocator *allocator, |
| 30 |
const struct aws_byte_cursor cur); |
| 31 |
|
| 32 |
AWS_SDKUTILS_API struct aws_owning_cursor aws_endpoints_non_owning_cursor_create(struct aws_byte_cursor cur); |
| 33 |
|
| 34 |
|
| 35 |
AWS_SDKUTILS_API void aws_owning_cursor_clean_up(struct aws_owning_cursor *cursor); |
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
AWS_SDKUTILS_API bool aws_is_valid_host_label(struct aws_byte_cursor label, bool allow_subdomains); |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
AWS_SDKUTILS_API int aws_byte_buf_init_from_normalized_uri_path( |
| 48 |
struct aws_allocator *allocator, |
| 49 |
struct aws_byte_cursor path, |
| 50 |
struct aws_byte_buf *out_normalized_path); |
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
AWS_SDKUTILS_API struct aws_string *aws_string_new_from_json( |
| 57 |
struct aws_allocator *allocator, |
| 58 |
const struct aws_json_value *value); |
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
AWS_SDKUTILS_API bool aws_endpoints_byte_cursor_eq(const void *a, const void *b); |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
typedef void(aws_array_callback_clean_up_fn)(void *value); |
| 71 |
AWS_SDKUTILS_API void aws_array_list_deep_clean_up( |
| 72 |
struct aws_array_list *array, |
| 73 |
aws_array_callback_clean_up_fn on_clean_up_element); |
| 74 |
|
| 75 |
|
| 76 |
typedef int(aws_endpoints_template_resolve_fn)( |
| 77 |
struct aws_byte_cursor template_cursor, |
| 78 |
void *user_data, |
| 79 |
struct aws_owning_cursor *out_resolved); |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
AWS_SDKUTILS_API int aws_byte_buf_init_from_resolved_templated_string( |
| 92 |
struct aws_allocator *allocator, |
| 93 |
struct aws_byte_buf *out_buf, |
| 94 |
struct aws_byte_cursor string, |
| 95 |
aws_endpoints_template_resolve_fn resolve_callback, |
| 96 |
void *user_data, |
| 97 |
bool is_json); |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
AWS_SDKUTILS_API int aws_path_through_json( |
| 112 |
struct aws_allocator *allocator, |
| 113 |
const struct aws_json_value *root, |
| 114 |
struct aws_byte_cursor path, |
| 115 |
const struct aws_json_value **out_value); |
| 116 |
|
| 117 |
#endif |