service

package
v0.0.0-...-028896a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound     = errors.New("user already exists")
	ErrTokenDoesntExist = errors.New("token doesn't exist")
)

Functions

This section is empty.

Types

type Service

type Service interface {
	Register(id, username, password string) error
	Login(username, password string) (accessToken, refreshToken string, err error)
	RefreshToken(token string) (string, error)
	ValidateToken(token string) (string, error)
	Logout(token string) (bool, error)
}

func New

func New(repo repo.Repo, jwt jwt.JwtGenerator) Service

Jump to

Keyboard shortcuts

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