Documentation ¶
Index ¶
- type AuthRepo
- type AuthService
- func (as *AuthService) AddUserTokenMapping(ctx context.Context, userID, accessToken string) (err error)
- func (as *AuthService) GetAdminUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error)
- func (as *AuthService) GetUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error)
- func (as *AuthService) RemoveAdminUserCacheInfo(ctx context.Context, accessToken string) (err error)
- func (as *AuthService) RemoveUserCacheInfo(ctx context.Context, accessToken string) (err error)
- func (as *AuthService) RemoveUserTokens(ctx context.Context, userID string)
- func (as *AuthService) SetAdminUserCacheInfo(ctx context.Context, accessToken string, userInfo *entity.UserCacheInfo) (err error)
- func (as *AuthService) SetUserCacheInfo(ctx context.Context, userInfo *entity.UserCacheInfo) (accessToken string, err error)
- func (as *AuthService) SetUserStatus(ctx context.Context, userInfo *entity.UserCacheInfo) (err error)
- func (as *AuthService) UpdateUserCacheInfo(ctx context.Context, token string, userInfo *entity.UserCacheInfo) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthRepo ¶
type AuthRepo interface { GetUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error) SetUserCacheInfo(ctx context.Context, accessToken string, userInfo *entity.UserCacheInfo) error RemoveUserCacheInfo(ctx context.Context, accessToken string) (err error) SetUserStatus(ctx context.Context, userID string, userInfo *entity.UserCacheInfo) (err error) GetUserStatus(ctx context.Context, userID string) (userInfo *entity.UserCacheInfo, err error) RemoveUserStatus(ctx context.Context, userID string) (err error) GetAdminUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error) SetAdminUserCacheInfo(ctx context.Context, accessToken string, userInfo *entity.UserCacheInfo) error RemoveAdminUserCacheInfo(ctx context.Context, accessToken string) (err error) AddUserTokenMapping(ctx context.Context, userID, accessToken string) (err error) RemoveUserTokens(ctx context.Context, userID string) }
AuthRepo auth repository
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService kit service
func NewAuthService ¶
func NewAuthService(authRepo AuthRepo) *AuthService
NewAuthService email service
func (*AuthService) AddUserTokenMapping ¶ added in v1.0.0
func (as *AuthService) AddUserTokenMapping(ctx context.Context, userID, accessToken string) (err error)
AddUserTokenMapping add user token mapping
func (*AuthService) GetAdminUserCacheInfo ¶ added in v1.0.1
func (as *AuthService) GetAdminUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error)
func (*AuthService) GetUserCacheInfo ¶
func (as *AuthService) GetUserCacheInfo(ctx context.Context, accessToken string) (userInfo *entity.UserCacheInfo, err error)
func (*AuthService) RemoveAdminUserCacheInfo ¶ added in v1.0.1
func (as *AuthService) RemoveAdminUserCacheInfo(ctx context.Context, accessToken string) (err error)
func (*AuthService) RemoveUserCacheInfo ¶
func (as *AuthService) RemoveUserCacheInfo(ctx context.Context, accessToken string) (err error)
func (*AuthService) RemoveUserTokens ¶ added in v1.0.8
func (as *AuthService) RemoveUserTokens(ctx context.Context, userID string)
RemoveUserTokens Log out all users under this user id
func (*AuthService) SetAdminUserCacheInfo ¶ added in v1.0.1
func (as *AuthService) SetAdminUserCacheInfo(ctx context.Context, accessToken string, userInfo *entity.UserCacheInfo) (err error)
func (*AuthService) SetUserCacheInfo ¶
func (as *AuthService) SetUserCacheInfo(ctx context.Context, userInfo *entity.UserCacheInfo) (accessToken string, err error)
func (*AuthService) SetUserStatus ¶ added in v0.4.0
func (as *AuthService) SetUserStatus(ctx context.Context, userInfo *entity.UserCacheInfo) (err error)
func (*AuthService) UpdateUserCacheInfo ¶
func (as *AuthService) UpdateUserCacheInfo(ctx context.Context, token string, userInfo *entity.UserCacheInfo) (err error)
Click to show internal directories.
Click to hide internal directories.