services

package
v0.0.0-...-a655b0a Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type OrderCoordinatorService

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

func NewOrderCoordinatorService

func NewOrderCoordinatorService() *OrderCoordinatorService

type OrderService

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

func NewOrderService

func NewOrderService(
	orderRepo repos.OrderRepo,
) *OrderService

func (*OrderService) AddOrder

func (o *OrderService) AddOrder(req *http.Request) (*entities.Order, error)

func (*OrderService) UpdateOrderStatus

func (o *OrderService) UpdateOrderStatus(req *http.Request) (*entities.Order, error)

type ProductCtlMockService

type ProductCtlMockService struct{}

func NewProductCtlHandler

func NewProductCtlHandler() *ProductCtlMockService

func (*ProductCtlMockService) GetProduct

func (p *ProductCtlMockService) GetProduct(
	ctx context.Context,
	id int64,
) (*entities.Product, error)

func (*ProductCtlMockService) ListProducts

func (p *ProductCtlMockService) ListProducts(
	ctx context.Context,
	page int,
	limit int) (
	[]*entities.Product, error,
)

type ProductCtlServices

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

func NewProductCtlServices

func NewProductCtlServices(
	repo *mysql.ProductMysqlRepo,
) *ProductCtlServices

func (*ProductCtlServices) AddProduct

func (p *ProductCtlServices) AddProduct(
	ctx context.Context,
	req *http.Request,
) (*entities.Product, error)

func (*ProductCtlServices) GetProduct

func (p *ProductCtlServices) GetProduct(
	ctx context.Context,
	req *http.Request,
) (*entities.Product, error)

func (*ProductCtlServices) ListProducts

func (p *ProductCtlServices) ListProducts(
	ctx context.Context,
	req *http.Request,
) ([]*entities.Product, error)

type UpdateBody

type UpdateBody struct {
	Id     int `json:"id,omitempty"`
	Status int `json:"status,omitempty"`
}

Jump to

Keyboard shortcuts

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