services

package
v0.0.0-...-7943344 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackSplitter

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

PackSplitter represents an instance of the package splitting algorithm

func NewPackSplitter

func NewPackSplitter(packSizes []int, order int) *PackSplitter

NewPackSplitter creates a new PackSplitter instance

func (*PackSplitter) SplitOrderIntoPacks

func (p *PackSplitter) SplitOrderIntoPacks() map[int]int

SplitOrderIntoPacks splits the order amount into packs using PackSplitter.packSizes

type ProductService

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

ProductService is a struct that contains references to the dependencies

func GetProductServiceDefaultInstance

func GetProductServiceDefaultInstance() *ProductService

GetProductServiceDefaultInstance returns the default instance of ProductService

func (*ProductService) CreatePackSizes

func (s *ProductService) CreatePackSizes(ctx context.Context, createPackSizes *payloads.ChangePackSizesPayload) ([]*models.PackSize, error)

CreatePackSizes creates a product order using the provided payload

func (*ProductService) CreateProductOrder

func (s *ProductService) CreateProductOrder(ctx context.Context, createProduct *payloads.CreateProductOrderPayload) ([]*payloads.CreatedPackOrderPayload, error)

CreateProductOrder creates a product order using the provided payload

Jump to

Keyboard shortcuts

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