app

package
v0.0.0-...-5d322a5 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidEmail = fmt.Errorf("invalid email")
)

Functions

func NewAuth

func NewAuth(authStorage CustomerStorage, sessStorage SessStorage) auth

Types

type CustomerStorage

type CustomerStorage interface {
	Create(ctx context.Context, email, passwordHash string) error
	Find(ctx context.Context, email string) (adapter.Customer, error)
}

type SessStorage

type SessStorage interface {
	Store(ctx context.Context, sess *domain.Session) error
	Find(ctx context.Context, token string) (*domain.Session, error)
}

Jump to

Keyboard shortcuts

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