service

package
v0.0.0-...-f040671 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultUserService

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

DefaultUserService is the default implementation of the user service

func NewUserService

func NewUserService(repo domain.UserRepository) *DefaultUserService

func (*DefaultUserService) GetAllUsers

func (s *DefaultUserService) GetAllUsers() ([]*domain.User, error)

func (*DefaultUserService) GetUser

func (s *DefaultUserService) GetUser(id int) (*domain.User, error)

type UserService

type UserService interface {
	GetUser(id int) (*domain.User, error)
	GetAllUsers() ([]*domain.User, error)
	AddUser(user *domain.User) error
	AddUsers(users ...*domain.User) error
	DelUser(id int) error
}

Jump to

Keyboard shortcuts

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