Documentation ¶
Index ¶
- Constants
- func ChangeName(redisCli *redis.Client, oldName, newName string) error
- func GetBasicInfo(redisCli *redis.Client, uids ...string) (map[string]*pb.ProfileBasic, error)
- func GetProfileStatus(redisCli *redis.Client, profileID ...string) map[string]int32
- func IsNameExist(redisCli *redis.Client, name string) (bool, error)
- func NewNameKey() (key.Key, error)
- func NewProfileBasicKey(uid string) (key.Key, error)
- func NewProfileStatusKey(uid string) (key.Key, error)
- func RandomName(redisCli *redis.Client, name string) (string, error)
- func SaveName(redisCli *redis.Client, name string) error
- func SetBasicInfo(redisCli *redis.Client, uid string, basic *pb.ProfileBasic) error
- func SetProfileStatus(redisCli *redis.Client, profileID string, status int) error
- func UpdateBasicWithProfile(redisCli *redis.Client, uid string, profile *pb.Profile) error
- type ProfileBasic
Constants ¶
View Source
const (
NameTryCount = 5
)
Variables ¶
This section is empty.
Functions ¶
func ChangeName ¶
func GetBasicInfo ¶
func GetBasicInfo(redisCli *redis.Client, uids ...string) (map[string]*pb.ProfileBasic, error)
func GetProfileStatus ¶
func IsNameExist ¶
func NewNameKey ¶
func RandomName ¶
func SetBasicInfo ¶
func SetBasicInfo(redisCli *redis.Client, uid string, basic *pb.ProfileBasic) error
func SetProfileStatus ¶
Types ¶
type ProfileBasic ¶
type ProfileBasic struct { Uid string `json:"uid" redis:"uid"` Nickname string `json:"nickname" redis:"nickname"` Avatar string `json:"avatar" redis:"avatar"` HeroId int32 `json:"hero_id" redis:"hero_id" ` HallUrl string `json:"hall_url" redis:"hall_url"` BattleUrl string `json:"battle_url" redis:"battle_url"` RoomId string `json:"room_id" redis:"room_id"` }
func (*ProfileBasic) MarshalBinary ¶
func (p *ProfileBasic) MarshalBinary() ([]byte, error)
func (*ProfileBasic) UnmarshalBinary ¶
func (p *ProfileBasic) UnmarshalBinary(data []byte) error
Click to show internal directories.
Click to hide internal directories.