Documentation
¶
Index ¶
- Variables
- type ITokenService
- type TokenService
- func (ts *TokenService) Create() (models.Token, error)
- func (ts *TokenService) DisableTokenByID(id string) (models.Token, error)
- func (ts *TokenService) GetAll() ([]models.Token, error)
- func (ts *TokenService) GetByID(id string) (models.Token, error)
- func (ts *TokenService) InvalidateToken(days int) error
- func (ts *TokenService) ValidateToken(token string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( fx.Provide(NewTokenService), )
Functions ¶
This section is empty.
Types ¶
type ITokenService ¶
type ITokenService interface { Create() (models.Token, error) GetAll() ([]models.Token, error) GetByID(string) (models.Token, error) DisableTokenByID(id string) (models.Token, error) ValidateToken(token string) (bool, error) InvalidateToken(days int) error }
func NewTokenService ¶
func NewTokenService(repo repository.ITokenRepository, textgenerator text.Generator) ITokenService
type TokenService ¶
type TokenService struct {
// contains filtered or unexported fields
}
func (*TokenService) DisableTokenByID ¶
func (ts *TokenService) DisableTokenByID(id string) (models.Token, error)
func (*TokenService) InvalidateToken ¶
func (ts *TokenService) InvalidateToken(days int) error
func (*TokenService) ValidateToken ¶
func (ts *TokenService) ValidateToken(token string) (bool, error)
Click to show internal directories.
Click to hide internal directories.