
I have validated that these settings closely match the existing coding style with one major exception on `BreakBeforeBraces`, which will be `Attach` going forward. The mixed `BreakBeforeBraces` styles in the current codebase are hard to imitate and also very odd IMHO - see below ``` if (a == 1) { /*Attach */ } ``` ``` if (a == 1 || b == 2) { /* Why? */ } ``` Please do NOT merge just yet. Will add the github action next once the style is reviewed/approved. --------- Signed-off-by: Ping Xie <pingxie@google.com>
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
#ifndef VALKEY_COMMANDS_H
|
|
#define VALKEY_COMMANDS_H
|
|
|
|
/* Must be synced with ARG_TYPE_STR and generate-command-code.py */
|
|
typedef enum {
|
|
ARG_TYPE_STRING,
|
|
ARG_TYPE_INTEGER,
|
|
ARG_TYPE_DOUBLE,
|
|
ARG_TYPE_KEY, /* A string, but represents a keyname */
|
|
ARG_TYPE_PATTERN,
|
|
ARG_TYPE_UNIX_TIME,
|
|
ARG_TYPE_PURE_TOKEN,
|
|
ARG_TYPE_ONEOF, /* Has subargs */
|
|
ARG_TYPE_BLOCK /* Has subargs */
|
|
} serverCommandArgType;
|
|
|
|
#define CMD_ARG_NONE (0)
|
|
#define CMD_ARG_OPTIONAL (1 << 0)
|
|
#define CMD_ARG_MULTIPLE (1 << 1)
|
|
#define CMD_ARG_MULTIPLE_TOKEN (1 << 2)
|
|
|
|
/* Must be compatible with RedisModuleCommandArg. See moduleCopyCommandArgs. */
|
|
typedef struct serverCommandArg {
|
|
const char *name;
|
|
serverCommandArgType type;
|
|
int key_spec_index;
|
|
const char *token;
|
|
const char *summary;
|
|
const char *since;
|
|
int flags;
|
|
const char *deprecated_since;
|
|
int num_args;
|
|
struct serverCommandArg *subargs;
|
|
const char *display_text;
|
|
} serverCommandArg;
|
|
|
|
/* Returns the command group name by group number. */
|
|
const char *commandGroupStr(int index);
|
|
|
|
#endif
|