更新枚举类型定义
This commit is contained in:
58
redis.go
58
redis.go
@ -7,29 +7,39 @@
|
||||
// Date : 2024-10-08 16:32
|
||||
package consts
|
||||
|
||||
type RedisCmd string
|
||||
|
||||
func (rc RedisCmd) String() string {
|
||||
return string(rc)
|
||||
}
|
||||
|
||||
func (rc RedisCmd) MarshalJSON() ([]byte, error) {
|
||||
return []byte(rc.String()), nil
|
||||
}
|
||||
|
||||
const (
|
||||
RedisCommandExists = "EXISTS"
|
||||
RedisCommandTTL = "TTL"
|
||||
RedisCommandSet = "SET"
|
||||
RedisCommandDel = "DEL"
|
||||
RedisCommandGet = "GET"
|
||||
RedisCommandHget = "HGET"
|
||||
RedisCommandHset = "HSET"
|
||||
RedisCommandHdel = "HDEL"
|
||||
RedisCommandMGet = "MGET"
|
||||
RedisCommandMSet = "MSET"
|
||||
RedisCommandLpush = "LPUSH"
|
||||
RedisCommandLpop = "LPOP"
|
||||
RedisCommandRpush = "RPUSH"
|
||||
RedisCommandRpop = "RPOP"
|
||||
RedisCommandSadd = "SADD"
|
||||
RedisCommandSunionstore = "SUNIONSTORE"
|
||||
RedisCommandZadd = "ZADD"
|
||||
RedisCommandZincrby = "ZINCRBY"
|
||||
RedisCommandPsubScribe = "PSUBSCRIBE"
|
||||
RedisCommandPubsub = "PUBSUB"
|
||||
RedisCommandPublish = "PUBLISH"
|
||||
RedisCommandPunsubScribe = "PUNSUBSCRIBE"
|
||||
RedisCommandSubscribe = "SUBSCRIBE"
|
||||
RedisCommandUnsubscribe = "UNSUBSCRIBE"
|
||||
RedisCommandExists RedisCmd = "EXISTS"
|
||||
RedisCommandTTL RedisCmd = "TTL"
|
||||
RedisCommandSet RedisCmd = "SET"
|
||||
RedisCommandDel RedisCmd = "DEL"
|
||||
RedisCommandGet RedisCmd = "GET"
|
||||
RedisCommandHget RedisCmd = "HGET"
|
||||
RedisCommandHset RedisCmd = "HSET"
|
||||
RedisCommandHdel RedisCmd = "HDEL"
|
||||
RedisCommandMGet RedisCmd = "MGET"
|
||||
RedisCommandMSet RedisCmd = "MSET"
|
||||
RedisCommandLpush RedisCmd = "LPUSH"
|
||||
RedisCommandLpop RedisCmd = "LPOP"
|
||||
RedisCommandRpush RedisCmd = "RPUSH"
|
||||
RedisCommandRpop RedisCmd = "RPOP"
|
||||
RedisCommandSadd RedisCmd = "SADD"
|
||||
RedisCommandSunionstore RedisCmd = "SUNIONSTORE"
|
||||
RedisCommandZadd RedisCmd = "ZADD"
|
||||
RedisCommandZincrby RedisCmd = "ZINCRBY"
|
||||
RedisCommandPsubScribe RedisCmd = "PSUBSCRIBE"
|
||||
RedisCommandPubsub RedisCmd = "PUBSUB"
|
||||
RedisCommandPublish RedisCmd = "PUBLISH"
|
||||
RedisCommandPunsubScribe RedisCmd = "PUNSUBSCRIBE"
|
||||
RedisCommandSubscribe RedisCmd = "SUBSCRIBE"
|
||||
RedisCommandUnsubscribe RedisCmd = "UNSUBSCRIBE"
|
||||
)
|
||||
|
Reference in New Issue
Block a user