pharmacyservice

package
v0.0.0-...-ffefdcf Latest Latest
Warning

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

Go to latest
Published: May 22, 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 AddressRepo

type AddressRepo interface {
	CreateAddress(ctx context.Context, address entities.Address) (int, error)
}

type PharmacyRepo

type PharmacyRepo interface {
	CreatePharmacy(ctx context.Context, pharmacy entities.Pharmacy) error
	GetBatchOfPharmacies(ctx context.Context, lastPharmacyID int, limit int) ([]entities.Pharmacy, error)
	GetAvailablePharmacyProducts(ctx context.Context, pharmacyID int) ([]entities.PharmacyProductItem, error)
}

type Service

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

func NewPharmacyService

func NewPharmacyService(
	pharmacyRepo PharmacyRepo,
	addressRepo AddressRepo,
) *Service

func (*Service) CreatePharmacy

func (s *Service) CreatePharmacy(ctx context.Context, pharmacy entities.Pharmacy) error

func (*Service) GetBatchOfPharmacies

func (s *Service) GetBatchOfPharmacies(
	ctx context.Context,
	lastPharmacyID int,
	limit int,
) ([]entities.Pharmacy, error)

func (*Service) GetPharmacyProducts

func (s *Service) GetPharmacyProducts(ctx context.Context, pharmacyID int) ([]entities.PharmacyProductItem, error)

Jump to

Keyboard shortcuts

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