From 380195f7cd5e57acf2c1cf2bc41069e6b0b979ed Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Thu, 17 Sep 2026 19:55:36 +0200 Subject: Initial commit: daemon, clients, docs, Docker deploy pipeline --- src/protocol.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/protocol.h (limited to 'src/protocol.h') diff --git a/src/protocol.h b/src/protocol.h new file mode 100644 index 0000000..de7cb3a --- /dev/null +++ b/src/protocol.h @@ -0,0 +1,30 @@ +#ifndef BOKF_PROTOCOL_H +#define BOKF_PROTOCOL_H + +#include +#include + +#include "sessions.h" +#include "yyjson.h" + +struct req { + sqlite3 *db; + yyjson_mut_doc *rdoc; + const char *id; + const char *cmd; + struct session *sess; + int64_t org_id; + int has_org; + int is_admin; + const char *role; + int dry_run; + yyjson_val *args; + const char *err_code; + char err_msg[512]; + yyjson_mut_val *err_details; +}; + +/* Returns a malloc'd response line (no trailing newline). */ +char *protocol_handle_line(sqlite3 *db, const char *line, size_t len); + +#endif -- cgit v1.3