service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 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 Repository added in v0.3.0

type Repository interface {
	FindUser(ctx context.Context, id string) (model.User, error)
	CreateUser(ctx context.Context, user model.User) (string, error)
	UpdateUser(ctx context.Context, user model.User) error
	DeleteUser(ctx context.Context, id string) error
}

Repository abstracts the data access layer.

type Service

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

Service represents the user domain service layer.

func New added in v0.3.1

func New(repo Repository) *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) UpdateUser added in v0.2.0

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

Jump to

Keyboard shortcuts

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