Documentation ¶
Index ¶
- Constants
- type Token
- func (t *Token[T]) ClearAllLogin(prefix string) error
- func (t *Token[T]) CreateToken(data interface{}, expiration time.Duration, roleId ...string) (string, error)
- func (t *Token[T]) DeleteToken(key ...string) error
- func (t *Token[T]) GetDataFromToken(token string) (T, error)
- func (t *Token[T]) GetDataListFromRoleId(roleId string) ([]T, error)
- func (t *Token[T]) GetTokenByRoleId(roleId string) ([]string, error)
- func (t *Token[T]) UpdateTokenWithoutRefreshExpireTime(key string, data interface{}) error
Constants ¶
View Source
const (
Prefix = "Auth:"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token[T any] struct { // contains filtered or unexported fields }
func NewTokenService ¶
func (*Token[T]) ClearAllLogin ¶
func (*Token[T]) CreateToken ¶
func (*Token[T]) DeleteToken ¶
func (*Token[T]) GetDataFromToken ¶
func (*Token[T]) GetDataListFromRoleId ¶
func (*Token[T]) GetTokenByRoleId ¶
func (*Token[T]) UpdateTokenWithoutRefreshExpireTime ¶
Click to show internal directories.
Click to hide internal directories.