service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents the user domain service layer.

func NewService

func NewService(repo UserRepo) *Service

func (*Service) CreateUser added in v0.2.0

func (s *Service) CreateUser(ctx context.Context, user model.User) (model.User, error)

func (*Service) DeleteUser added in v0.2.0

func (s *Service) DeleteUser(ctx context.Context, id string) error

func (*Service) FindUser added in v0.2.0

func (s *Service) FindUser(ctx context.Context, id string) (model.User, error)

func (*Service) GetUserByEmail

func (s *Service) GetUserByEmail(ctx context.Context, email string) (model.User, error)

func (*Service) UpdateUser added in v0.2.0

func (s *Service) UpdateUser(ctx context.Context, user model.User) error

type UserRepo

type UserRepo interface {
	GetUserByEmail(ctx context.Context, email string) (model.User, error)
}

UserRepo abstracts the data access layer.

Jump to

Keyboard shortcuts

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