Documentation
¶
Index ¶
- Constants
- func Reg(s *G.Server)
- type UserService
- func (s *UserService) Config() interface{}
- func (s *UserService) GetInfoDB(uid string) string
- func (s *UserService) GetUserDB() string
- func (s *UserService) Name() string
- func (s *UserService) NewID() string
- func (s *UserService) NewPassword() string
- func (s *UserService) OnInit(ctx micro.Context) error
- func (s *UserService) OnValid(ctx micro.Context) error
- func (s *UserService) Recycle()
- func (s *UserService) SecPassword(p string) string
Constants ¶
View Source
const ( SERVICE_LRUCACHE = "lrucache" SERVICE_REDIS = "redis" SERVICE_OSS = "oss" SERVICE_MONGODB = "mongodb" SERVICE_USER = "uv-user" )
View Source
const ( ERRNO_OK = 200 ERRNO_NOT_FOUND = 404 ERRNO_INTERNAL_SERVER = 500 ERRNO_INPUT_DATA = 400 ERRNO_INDEX_VALUE = 600 ERRNO_LOGIN = 601 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UserService ¶
type UserService struct { Prefix string `json:"prefix"` BasePath string `json:"basePath"` Aid int64 `json:"aid"` //区域ID Nid int64 `json:"nid"` //节点ID Expires int64 `json:"expires"` //过期秒数 Db string `json:"db"` // mongodb db Secret string `json:"secret"` // secret IID *iid.IID `json:"-"` // contains filtered or unexported fields }
func GetUserService ¶
func GetUserService(ctx micro.Context, name string) (*UserService, error)
func (*UserService) GetInfoDB ¶
func (s *UserService) GetInfoDB(uid string) string
func (*UserService) GetUserDB ¶
func (s *UserService) GetUserDB() string
func (*UserService) NewID ¶
func (s *UserService) NewID() string
func (*UserService) NewPassword ¶
func (s *UserService) NewPassword() string
func (*UserService) Recycle ¶
func (s *UserService) Recycle()
func (*UserService) SecPassword ¶
func (s *UserService) SecPassword(p string) string
Click to show internal directories.
Click to hide internal directories.