Documentation ¶
Index ¶
- Constants
- func CacheDel(ctx context.Context, id int64)
- func CacheGet(ctx context.Context, id int64) (map[string]string, error)
- func CacheSet(ctx context.Context, id int64, m *User)
- type Server
- func (s *Server) UserDelete(ctx context.Context, in *user.UserID) (out *user.UserID, outerr error)
- func (s *Server) UserInfo(ctx context.Context, in *user.UserBase) (out *user.UserBase, outerr error)
- func (s *Server) UserQueryAll(ctx context.Context, in *user.UserAllOption) (*user.UserAll, error)
- func (s *Server) UserQueryOne(ctx context.Context, in *user.UserID) (out *user.UserBase, outerr error)
- type User
Constants ¶
View Source
const ( KeyMaxExpire = 500 // 秒 AgainGetStopTime = 100 * time.Millisecond )
View Source
const ( SexMan = 1 SexWoman = 2 SexOther = 3 )
性别
View Source
const (
CacheIDPrefix = "ucid"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
type Server struct {
user.UnimplementedUserServiceServer
}
func (*Server) UserDelete ¶
func (*Server) UserQueryAll ¶
type User ¶
type User struct { ID int64 `json:"id" db:"id" valid:"int~用户id类型为int"` UserName string `json:"user_name" db:"user_name" valid:"required~用户名称必须存在"` Password string `json:"password" db:"password" valid:"required~密码必须存在"` Iphone string `json:"iphone" db:"iphone" valid:"required~手机号码必须存在"` Sex int32 `json:"sex" db:"sex" valid:"required~性别必须存在"` IsUsable int32 `json:"-" db:"is_usable"` Page utils.Page `gorm:"-" json:"-"` gorm.Model `json:"-"` }
Click to show internal directories.
Click to hide internal directories.