service

package
v0.0.0-...-9845e40 Latest Latest
Warning

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

Go to latest
Published: May 4, 2020 License: MIT Imports: 12 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 {
	AddOrder(entities.Order) ([]byte, error)
	FindOrder([]byte) (entities.Order, error)
	FindOrderByCustomerName(string) (entities.Order, error)
	FindAllOrders() ([]entities.Order, 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) IsMyOrderDone

func (receptionServiceImpl *ReceptionServiceImpl) IsMyOrderDone(orderId []byte) (bool, error)

Jump to

Keyboard shortcuts

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