tradingpoint

package
v0.0.0-...-241bfea Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ProtoPlaceOfWorkTypeToString

func ProtoPlaceOfWorkTypeToString(t proto.PlaceOfWorkType) (string, error)

func ProtoReceiptingPointWithAccountingTypeToString

func ProtoReceiptingPointWithAccountingTypeToString(t proto.ReceiptingPointWithAccountingType) (string, error)

func ProtoTradingPointTypeToString

func ProtoTradingPointTypeToString(t proto.TradingPointType) (string, error)

func StringToProtoHallContainerType

func StringToProtoHallContainerType(t string) (proto.HallContainerType, error)

func StringToProtoPlaceOfWorkType

func StringToProtoPlaceOfWorkType(t string) (proto.PlaceOfWorkType, error)

func StringToProtoReceiptingPointWithAccountingType

func StringToProtoReceiptingPointWithAccountingType(t string) (proto.ReceiptingPointWithAccountingType, error)

func StringToProtoTradingPointType

func StringToProtoTradingPointType(t string) (proto.TradingPointType, error)

Types

type ProductProvider

type ProductProvider interface {
	ProductsContext(ctx context.Context, ids *[]int32) ([]*protoproduct.Product, error)
}

type Repository

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

func NewRepository

func NewRepository(database *postgres.Database, productProvider ProductProvider) *Repository

func (*Repository) AddHallContext

func (r *Repository) AddHallContext(
	ctx context.Context,
	hallContainerID int32,
	hallContainerType hall_container.Type,
	tradingPointID int32,
	tradingPointType trading_point.Type,
) (int32, error)

func (*Repository) AddSectionContext

func (r *Repository) AddSectionContext(
	ctx context.Context,
	departmentStoreID int32,
) (int32, error)

func (*Repository) DepartmentStoreContext

func (r *Repository) DepartmentStoreContext(ctx context.Context, id int32) (*proto.DepartmentStore, error)

func (*Repository) HallsContext

func (r *Repository) HallsContext(ctx context.Context, tradingPointID *int32, tradingPointType *proto.TradingPointType) ([]*proto.Hall, error)

func (*Repository) ProductTradingPointsContext

func (r *Repository) ProductTradingPointsContext(ctx context.Context, tradingPointID *int32, tradingPointType *proto.TradingPointType) ([]*proto.ProductTradingPoint, error)

func (*Repository) RegisterTradingPoint

func (r *Repository) RegisterTradingPoint(
	ctx context.Context,
	t trading_point.Type,
	areaPlot float64,
	rentalCharge core.Money,
	counterCount int32,
	address string,
) (int32, error)

func (*Repository) SectionsContext

func (r *Repository) SectionsContext(ctx context.Context, departmentStoreID *int32) ([]*proto.Section, error)

func (*Repository) TradingPointContext

func (r *Repository) TradingPointContext(ctx context.Context, id int32, t proto.TradingPointType) (*proto.TradingPoint, error)

func (*Repository) TradingPointsContext

func (r *Repository) TradingPointsContext(ctx context.Context) ([]trading_point.TradingPoint, error)

Jump to

Keyboard shortcuts

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