#ifndef AMDUATD_CONCEPTS_H #define AMDUATD_CONCEPTS_H #include "amduat/asl/collection.h" #include "amduatd_space.h" #include "amduatd_ui.h" #include #include #ifdef __cplusplus extern "C" { #endif typedef struct { amduat_reference_t record_ref; amduat_reference_t src_ref; amduat_reference_t dst_ref; char *rel; } amduatd_edge_entry_t; typedef struct { amduatd_edge_entry_t *items; size_t len; size_t cap; } amduatd_edge_list_t; typedef struct amduatd_concepts_t { const char *root_path; char edges_path[1024]; char *edge_collection_name; amduat_reference_t rel_aliases_ref; amduat_reference_t rel_materializes_ref; amduat_reference_t rel_represents_ref; amduat_reference_t rel_requires_key_ref; amduat_reference_t rel_within_domain_ref; amduat_reference_t rel_computed_by_ref; amduat_reference_t rel_has_provenance_ref; amduat_asl_collection_store_t edge_collection; amduatd_edge_list_t edges; } amduatd_concepts_t; bool amduatd_concepts_init(amduatd_concepts_t *c, amduat_asl_store_t *store, const amduatd_space_t *space, const char *root_path, bool enable_migrations); void amduatd_concepts_free(amduatd_concepts_t *c); bool amduatd_concepts_refresh_edges(amduatd_ctx_t *ctx, size_t max_new_entries); bool amduatd_concepts_can_handle(const amduatd_http_req_t *req); bool amduatd_concepts_handle(amduatd_ctx_t *ctx, const amduatd_http_req_t *req, amduatd_http_resp_t *resp); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* AMDUATD_CONCEPTS_H */