user

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUsernameToShort  = errors.New("username_to_short")
	ErrUserAlreadyExist = errors.New("user_already_exists")
	ErrPasswordTooWeak  = errors.New("password_too_weak")
	ErrPasswordTooShort = errors.New("password_too_short")
)
View Source
var ErrInvalidUserOrPassword = errors.New("invalid_user_or_password")

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(db *bun.DB) *Service

NewService returns new Service.

func (*Service) Login

func (s *Service) Login(ctx context.Context, form *tpl.LoginForm) (*model.User, error)

func (*Service) Register

func (s *Service) Register(ctx context.Context, form *tpl.RegisterForm) (*model.User, error)

Jump to

Keyboard shortcuts

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