50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
// Package consts ...
 | 
						|
//
 | 
						|
// Description : consts ...
 | 
						|
//
 | 
						|
// Author : go_developer@163.com<白茶清欢>
 | 
						|
//
 | 
						|
// 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
 | 
						|
}
 | 
						|
 | 
						|
func (rc RedisCmd) MarshalBinary() ([]byte, error) {
 | 
						|
	return []byte(rc.String()), nil
 | 
						|
}
 | 
						|
 | 
						|
const (
 | 
						|
	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"
 | 
						|
)
 |