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/commands.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/commands.h (limited to 'src/commands.h') diff --git a/src/commands.h b/src/commands.h new file mode 100644 index 0000000..d04affc --- /dev/null +++ b/src/commands.h @@ -0,0 +1,33 @@ +#ifndef BOKF_COMMANDS_H +#define BOKF_COMMANDS_H + +#include + +#include "protocol.h" + +enum cmd_perm { + PERM_PUBLIC = 0, + PERM_READ, + PERM_WRITE, + PERM_OWNER, + PERM_ADMIN +}; + +struct command { + const char *name; + const char *summary; + enum cmd_perm perm; + int need_org; + int mutating; + int dry_run; + yyjson_mut_val *(*fn)(struct req *r); +}; + +extern const struct command g_commands[]; +extern const size_t g_commands_count; + +const struct command *command_find(const char *name); +const char *perm_name(enum cmd_perm p); +const char *perm_scope(enum cmd_perm p); + +#endif -- cgit v1.3