service

package
v0.0.0-...-34e87ae Latest Latest
Warning

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

Go to latest
Published: May 5, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNameMustNotBeEmpty = errors.New("Name must not be empty.")
	ErrIdMustNotBeEmpty   = errors.New("Id must not be empty.")
)

Functions

This section is empty.

Types

type ReceptionService

type ReceptionService interface {
	GetConfiguration() *configuration.Configuration

	AddOrder(entities.Order) ([]byte, error)
	FindOrder([]byte) (entities.Order, error)
	FindOrderByCustomerName(string) (entities.Order, error)
	FindAllOrders() ([]entities.Order, error)
	UpdateOrder([]byte, entities.OrderStatus) error

	AddCustomer(entities.Customer) (uint, error)
	FindAllCustomers() ([]entities.Customer, error)
	FindCustomer(uint) (entities.Customer, error)
}

func NewReceptionService

func NewReceptionService(
	orderRepository repositories.OrderRepository,
	customerRepository repositories.CustomerRepository,
	configuration *configuration.Configuration) ReceptionService

type ReceptionServiceImpl

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

func (*ReceptionServiceImpl) AddCustomer

func (receptionServiceImpl *ReceptionServiceImpl) AddCustomer(customer entities.Customer) (uint, error)

func (*ReceptionServiceImpl) AddOrder

func (receptionServiceImpl *ReceptionServiceImpl) AddOrder(order entities.Order) ([]byte, error)

func (*ReceptionServiceImpl) FindAllCustomers

func (receptionServiceImpl *ReceptionServiceImpl) FindAllCustomers() ([]entities.Customer, error)

func (*ReceptionServiceImpl) FindAllOrders

func (receptionServiceImpl *ReceptionServiceImpl) FindAllOrders() ([]entities.Order, error)

func (*ReceptionServiceImpl) FindCustomer

func (receptionServiceImpl *ReceptionServiceImpl) FindCustomer(id uint) (entities.Customer, error)

func (*ReceptionServiceImpl) FindOrder

func (receptionServiceImpl *ReceptionServiceImpl) FindOrder(id []byte) (entities.Order, error)

func (*ReceptionServiceImpl) FindOrderByCustomerName

func (receptionServiceImpl *ReceptionServiceImpl) FindOrderByCustomerName(customername string) (entities.Order, error)

func (*ReceptionServiceImpl) GetConfiguration

func (receptionServiceImpl *ReceptionServiceImpl) GetConfiguration() *configuration.Configuration

func (*ReceptionServiceImpl) UpdateOrder

func (receptionServiceImpl *ReceptionServiceImpl) UpdateOrder(objectId []byte, status entities.OrderStatus) error

Jump to

Keyboard shortcuts

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