This function must be present on each Redis module. It is used in order to * register the commands into the Redis server. */
| 64 | /* This function must be present on each Redis module. It is used in order to |
| 65 | * register the commands into the Redis server. */ |
| 66 | int RedisModule_OnLoad(RedisModuleCtx *ctx, RedisModuleString **argv, int argc) { |
| 67 | REDISMODULE_NOT_USED(argv); |
| 68 | REDISMODULE_NOT_USED(argc); |
| 69 | |
| 70 | if (RedisModule_Init(ctx,"testacl",1,REDISMODULE_APIVER_1) |
| 71 | == REDISMODULE_ERR) return REDISMODULE_ERR; |
| 72 | |
| 73 | if (RedisModule_CreateCommand(ctx,"auth.authrealuser", |
| 74 | Auth_AuthRealUser,"no-auth",0,0,0) == REDISMODULE_ERR) |
| 75 | return REDISMODULE_ERR; |
| 76 | |
| 77 | if (RedisModule_CreateCommand(ctx,"auth.createmoduleuser", |
| 78 | Auth_CreateModuleUser,"",0,0,0) == REDISMODULE_ERR) |
| 79 | return REDISMODULE_ERR; |
| 80 | |
| 81 | if (RedisModule_CreateCommand(ctx,"auth.authmoduleuser", |
| 82 | Auth_AuthModuleUser,"no-auth",0,0,0) == REDISMODULE_ERR) |
| 83 | return REDISMODULE_ERR; |
| 84 | |
| 85 | if (RedisModule_CreateCommand(ctx,"auth.changecount", |
| 86 | Auth_ChangeCount,"",0,0,0) == REDISMODULE_ERR) |
| 87 | return REDISMODULE_ERR; |
| 88 | |
| 89 | return REDISMODULE_OK; |
| 90 | } |
nothing calls this directly
no test coverage detected