controller

package
v0.0.0-...-9d843bf Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OfferControllerImpl

type OfferControllerImpl struct {
	Config      *config.Conf
	Logger      *slog.Logger
	UUID        uuid.Provider
	DbClient    *mongo.Client
	StoreStorer store_s.StoreStorer
	OfferStorer domain.OfferStorer
	UserStorer  user_s.UserStorer
}

func (*OfferControllerImpl) DeleteByID

func (impl *OfferControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error

func (*OfferControllerImpl) GetByID

func (*OfferControllerImpl) GetByServiceType

func (c *OfferControllerImpl) GetByServiceType(ctx context.Context, serviceType int8) (*domain.Offer, error)

func (*OfferControllerImpl) ListAsSelectOptionByFilter

func (*OfferControllerImpl) UpdateByID

func (impl *OfferControllerImpl) UpdateByID(ctx context.Context, ns *domain.Offer) (*domain.Offer, error)

type Offerontroller

type Offerontroller interface {
	// Create(ctx context.Context, m *domain.Offer) (*domain.Offer, error)
	GetByID(ctx context.Context, id primitive.ObjectID) (*domain.Offer, error)
	GetByServiceType(ctx context.Context, serviceType int8) (*domain.Offer, error)
	UpdateByID(ctx context.Context, m *domain.Offer) (*domain.Offer, error)
	ListByFilter(ctx context.Context, f *domain.OfferPaginationListFilter) (*domain.OfferPaginationListResult, error)
	ListAsSelectOptionByFilter(ctx context.Context, f *domain.OfferPaginationListFilter) ([]*domain.OfferAsSelectOption, error)
}

Offerontroller Interface for store business logic controller.

func NewController

func NewController(
	appCfg *config.Conf,
	loggerp *slog.Logger,
	uuidp uuid.Provider,
	client *mongo.Client,
	org_storer store_s.StoreStorer,
	sub_storer domain.OfferStorer,
	usr_storer user_s.UserStorer,
) Offerontroller

Jump to

Keyboard shortcuts

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