Documentation ¶
Index ¶
- func GetUserService(opts ...Option) (svc interfaces.UserService, err error)
- func NewUserService(opts ...Option) (svc2 interfaces.UserService, err error)
- func ProvideGetUserService(opts ...Option) func() (svr interfaces.UserService, err error)
- func ProvideUserService(opts ...Option) func() (svc interfaces.UserService, err error)
- type Option
- type Service
- func (svc *Service) ChangePassword(id primitive.ObjectID, password string, args ...interface{}) (err error)
- func (svc *Service) CheckToken(tokenStr string) (u interfaces.User, err error)
- func (svc *Service) Create(opts *interfaces.UserCreateOptions, args ...interface{}) (err error)
- func (svc *Service) GetCurrentUser(c *gin.Context) (user interfaces.User, err error)
- func (svc *Service) Init() (err error)
- func (svc *Service) Login(opts *interfaces.UserLoginOptions) (token string, u interfaces.User, err error)
- func (svc *Service) MakeToken(user interfaces.User) (tokenStr string, err error)
- func (svc *Service) SetJwtSecret(secret string)
- func (svc *Service) SetJwtSigningMethod(method jwt.SigningMethod)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserService ¶
func GetUserService(opts ...Option) (svc interfaces.UserService, err error)
func NewUserService ¶
func NewUserService(opts ...Option) (svc2 interfaces.UserService, err error)
func ProvideGetUserService ¶
func ProvideGetUserService(opts ...Option) func() (svr interfaces.UserService, err error)
func ProvideUserService ¶
func ProvideUserService(opts ...Option) func() (svc interfaces.UserService, err error)
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ChangePassword ¶
func (*Service) CheckToken ¶
func (svc *Service) CheckToken(tokenStr string) (u interfaces.User, err error)
func (*Service) Create ¶
func (svc *Service) Create(opts *interfaces.UserCreateOptions, args ...interface{}) (err error)
func (*Service) GetCurrentUser ¶
func (*Service) Login ¶
func (svc *Service) Login(opts *interfaces.UserLoginOptions) (token string, u interfaces.User, err error)
func (*Service) MakeToken ¶
func (svc *Service) MakeToken(user interfaces.User) (tokenStr string, err error)
func (*Service) SetJwtSecret ¶
func (*Service) SetJwtSigningMethod ¶
func (svc *Service) SetJwtSigningMethod(method jwt.SigningMethod)
Click to show internal directories.
Click to hide internal directories.