service

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExpired = fmt.Errorf("token expired")
	ErrReused  = fmt.Errorf("token reused")
	ErrInvalid = fmt.Errorf("token invalid")
)

Functions

func Module

func Module(c *di.Container)

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(repo db_onetime.Repository) *Service

func (*Service) CreateToken

func (s *Service) CreateToken(ctx context.Context, userID string) (*onetime.Token, error)

func (*Service) Resolve

func (s *Service) Resolve(ctx context.Context, user *users.User, key string) (*onetime.Token, error)

Jump to

Keyboard shortcuts

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