service

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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) Create

func (ts *TokenService) Create() (models.Token, error)

func (*TokenService) DisableTokenByID

func (ts *TokenService) DisableTokenByID(id string) (models.Token, error)

func (*TokenService) GetAll

func (ts *TokenService) GetAll() ([]models.Token, error)

func (*TokenService) GetByID

func (ts *TokenService) GetByID(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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL