service

package
v0.0.0-...-a167b32 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongPassword = errors.Errorf("wrong password")
)

Functions

This section is empty.

Types

type Service

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

Service has methods with business logic

func New

func New(
	storage *store.Storage,
) *Service

New creates new Service

func (*Service) RegisterUser

func (svc *Service) RegisterUser(
	ctx context.Context, userToReg *model.UserToRegister,
) (*model.User, error)

RegisterUser registers user

func (*Service) SignInUser

func (svc *Service) SignInUser(
	ctx context.Context, userToSignIn *model.UserToSignIn,
) (token string, err error)

SignInUser do user sign-in

Jump to

Keyboard shortcuts

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