service

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: Apache-2.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

View Source
const MaxBatchesPerRelease = 2000

MaxBatchesPerRelease bounds one release, independently of the per-campaign cap.

Thirteen SKUs at 500 lots each is a production run no supervisor can work, and it is far more likely to be a misconfigured lot size than a real week.

Variables

This section is empty.

Functions

func GenerateStatementOfAccount

func GenerateStatementOfAccount(receivables []domain.ReceivableEntry, openCredits []domain.OpenCredit) ([]byte, error)

GenerateStatementOfAccount generates an Excel workbook containing a statement of account with aging buckets for the given receivable invoices and open credits.

func NewAccountGroupSvc

func NewAccountGroupSvc(config *AccountGroupSvcConfig) domain.AccountGroupSvc

func NewAccountPriceSvc

func NewAccountPriceSvc(config *AccountPriceSvcConfig) domain.AccountPriceSvc

func NewAccountStatusSvc

func NewAccountStatusSvc(config *AccountStatusSvcConfig) domain.AccountStatusSvc

func NewAccountSvc

func NewAccountSvc(config *AccountSvcConfig) domain.AccountSvc

func NewAccountUserSvc

func NewAccountUserSvc(config *AccountUserSvcConfig) domain.AccountUserSvc

func NewAddressSvc

func NewAddressSvc(config *AddressSvcConfig) domain.AddressSvc

func NewAdjustmentTypeSvc

func NewAdjustmentTypeSvc(config *AdjustmentTypeSvcConfig) domain.AdjustmentTypeSvc

func NewAnalyticsSvc

func NewAnalyticsSvc(config *AnalyticsSvcConfig) domain.AnalyticsSvc

func NewAttributeSvc

func NewAttributeSvc(config *AttributeSvcConfig) domain.AttributeSvc

func NewBatchSvc

func NewBatchSvc(config *BatchSvcConfig) domain.BatchSvc

func NewCarrierSvc

func NewCarrierSvc(config *CarrierSvcConfig) domain.CarrierSvc

func NewCatalogSvc

func NewCatalogSvc(config *CatalogSvcConfig) domain.CatalogSvc

func NewChildAccountSvc

func NewChildAccountSvc(config *ChildAccountSvcConfig) domain.ChildAccountSvc

func NewConsumptionSvc

func NewConsumptionSvc(config *ConsumptionSvcConfig) domain.ConsumptionSvc

func NewCustomerSvc

func NewCustomerSvc(config *CustomerSvcConfig) domain.CustomerSvc

func NewDeliverySvc

func NewDeliverySvc(config *DeliverySvcConfig) domain.DeliverySvc

func NewDemandOverrideSvc

func NewDemandOverrideSvc(config *DemandOverrideSvcConfig) domain.DemandOverrideSvc

func NewDepartmentSvc

func NewDepartmentSvc(config *DepartmentSvcConfig) domain.DepartmentSvc

func NewEDISvc

func NewEDISvc(config *EDISvcConfig) domain.EDISvc

func NewEmailLogSvc

func NewEmailLogSvc(config *EmailLogSvcConfig) domain.EmailLogSvc

func NewExportSvc

func NewExportSvc(config *ExportSvcConfig) domain.ExportSvc

func NewHubspotSyncSvc

func NewHubspotSyncSvc(config *HubspotSyncSvcConfig) domain.HubspotSyncSvc

func NewInvoiceSvc

func NewInvoiceSvc(config *InvoiceSvcConfig) domain.InvoiceSvc

func NewItemCategorySvc

func NewItemCategorySvc(config *ItemCategorySvcConfig) domain.ItemCategorySvc

func NewItemSvc

func NewItemSvc(config *ItemSvcConfig) domain.ItemSvc

func NewJobSvc

func NewJobSvc(config *JobSvcConfig) domain.JobSvc

func NewJobSvcFactory

func NewJobSvcFactory() domain.JobSvcFactory

NewJobSvcFactory builds job services on demand for a caller's repository factory. A service that raises or runs jobs takes this rather than a JobSvc directly: the factory it holds is transactional inside a transaction and the root one outside, so the same call binds to whichever the caller is in.

func NewLocationSvc

func NewLocationSvc(config *LocationSvcConfig) domain.LocationSvc

func NewMachineStatusSvc

func NewMachineStatusSvc(config *MachineStatusSvcConfig) domain.MachineStatusSvc

func NewMachineSvc

func NewMachineSvc(config *MachineSvcConfig) domain.MachineSvc

func NewMaterialSvc

func NewMaterialSvc(config *MaterialSvcConfig) domain.MaterialSvc

func NewMeasureSvc

func NewMeasureSvc(config *MeasureSvcConfig) domain.MeasureSvc

func NewOrderDiscountSvc

func NewOrderDiscountSvc(config *OrderDiscountSvcConfig) domain.OrderDiscountSvc

func NewPartSvc

func NewPartSvc(config *PartSvcConfig) domain.PartSvc

func NewPaymentTermSvc

func NewPaymentTermSvc(config *PaymentTermSvcConfig) domain.PaymentTermSvc

func NewPickLineSvc

func NewPickLineSvc(config *PickLineSvcConfig) domain.PickLineSvc

func NewPickSvc

func NewPickSvc(config *PickSvcConfig) domain.PickSvc

func NewPortalDomainSvc

func NewPortalDomainSvc(config *PortalDomainSvcConfig) domain.PortalDomainSvc

func NewPrioritySvc

func NewPrioritySvc(config *PrioritySvcConfig) domain.PrioritySvc

func NewProductLineSvc

func NewProductLineSvc(config *ProductLineSvcConfig) domain.ProductLineSvc

func NewProductSvc

func NewProductSvc(config *ProductSvcConfig) domain.ProductSvc

func NewProductTypeSvc

func NewProductTypeSvc(config *ProductTypeSvcConfig) domain.ProductTypeSvc

func NewProductionFlowSvc

func NewProductionFlowSvc(config *ProductionFlowSvcConfig) domain.ProductionFlowSvc

func NewProductionRunSvc

func NewProductionRunSvc(config *ProductionRunSvcConfig) domain.ProductionRunSvc

func NewProductionScheduleScheduler

func NewProductionScheduleScheduler(config *ProductionScheduleSchedulerConfig) *productionScheduleScheduler

func NewProductionStepSvc

func NewProductionStepSvc(config *ProductionStepSvcConfig) domain.ProductionStepSvc

func NewProductionSvc

func NewProductionSvc(config *ProductionSvcConfig) domain.ProductionSvc

func NewPropertySvc

func NewPropertySvc(config *PropertySvcConfig) domain.PropertySvc

func NewPurchaseOrderSvc

func NewPurchaseOrderSvc(config *PurchaseOrderSvcConfig) domain.PurchaseOrderSvc

func NewReceivableSvc

func NewReceivableSvc(config *ReceivableSvcConfig) domain.ReceivableSvc

NewReceivableSvc creates a new receivable service with the given configuration.

func NewReceivingOrderSvc

func NewReceivingOrderSvc(config *ReceivingOrderSvcConfig) domain.ReceivingOrderSvc

func NewRoleSvc

func NewRoleSvc(config *RoleSvcConfig) domain.RoleSvc

func NewSalesOrderLineSvc

func NewSalesOrderLineSvc(config *SalesOrderLineSvcConfig) domain.SalesOrderLineSvc

func NewSalesOrderSvc

func NewSalesOrderSvc(config *SalesOrderSvcConfig) domain.SalesOrderSvc

func NewSalesTargetSvc

func NewSalesTargetSvc(config *SalesTargetSvcConfig) domain.SalesTargetSvc

func NewSandboxSvc

func NewSandboxSvc(config *SandboxSvcConfig) domain.SandboxSvc

func NewServiceLevelSvc

func NewServiceLevelSvc(config *ServiceLevelSvcConfig) domain.ServiceLevelSvc

func NewSettlementSvc

func NewSettlementSvc(config *SettlementSvcConfig) domain.SettlementSvc

func NewShipmentLineSvc

func NewShipmentLineSvc(config *ShipmentLineSvcConfig) domain.ShipmentLineSvc

func NewShipmentSvc

func NewShipmentSvc(config *ShipmentSvcConfig) domain.ShipmentSvc

func NewShippingCaseSvc

func NewShippingCaseSvc(config *ShippingCaseSvcConfig) domain.ShippingCaseSvc

func NewShippingTermSvc

func NewShippingTermSvc(config *ShippingTermSvcConfig) domain.ShippingTermSvc

func NewSupplierSvc

func NewSupplierSvc(config *SupplierSvcConfig) domain.SupplierSvc

func NewSysPropertySvc

func NewSysPropertySvc(config *SysPropertySvcConfig) domain.SysPropertySvc

func NewTenancySvc

func NewTenancySvc(config *TenancySvcConfig) domain.TenancySvc

func NewTerritorySvc

func NewTerritorySvc(config *TerritorySvcConfig) domain.TerritorySvc

func NewTransactionSvc

func NewTransactionSvc(config *TransactionSvcConfig) domain.TransactionSvc

func NewUnitGroupSvc

func NewUnitGroupSvc(config *UnitGroupSvcConfig) domain.UnitGroupSvc

func NewUnitSvc

func NewUnitSvc(config *UnitSvcConfig) domain.UnitSvc

func NewUserSvc

func NewUserSvc(config *UserSvcConfig) domain.UserSvc

func NewUtilsSvc

func NewUtilsSvc(config *UtilsSvcConfig) domain.UtilsSvc

NewUtilsSvc creates a new utils service with the given configuration.

func NewVolumeDiscountSvc

func NewVolumeDiscountSvc(config *VolumeDiscountSvcConfig) domain.VolumeDiscountSvc

func SetAccountMarketingBlurbs

func SetAccountMarketingBlurbs(m map[string]string)

SetAccountMarketingBlurbs installs the account-to-footer-blurb map. Call once from main before serving; later calls race with in-flight renders.

func ValidateCostRateUnits

func ValidateCostRateUnits(ctx context.Context, repo domain.UnitRepo, numeratorUnitID, denominatorUnitID, fieldName string) *apierror.APIError

ValidateCostRateUnits ensures the unit IDs on each side of a cost-typed rate match the conventional shape of money/quantity:

  • numerator must be a currency unit (the "$" in "$5/ea")
  • denominator must NOT be a currency unit (the "ea" in "$5/ea")

Both unit IDs are looked up in a single round trip via UnitRepo. The repo is taken as a parameter so callers can pass a transactional repo when the validation runs inside a transaction (consistent with how InsertRate is used).

fieldName is the request-body field this validation belongs to (e.g., "unit_cost", "labor_rate") and is surfaced in the error so clients can pin the failure to the right input.

Types

type AccountGroupProductLineAccessSvcConfig

type AccountGroupProductLineAccessSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type AccountGroupSvcConfig

type AccountGroupSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type AccountIntegrationSvcConfig

type AccountIntegrationSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// EncryptionKey (required) encrypts sensitive fields at rest.
	EncryptionKey []byte

	// EncryptionKeyID (required) identifies the active encryption key version.
	EncryptionKeyID string

	// PlatformMode is the deployment mode. In development it relaxes the live-key requirement for Stripe credentials so local, production-type accounts can integrate against Stripe's test environment.
	PlatformMode constants.PlatformMode
}

type AccountPriceSvcConfig

type AccountPriceSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async price-list export records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// Branding (optional) reads the merchant logo onto the price list's title page. Omitted, the document prints a text-only letterhead.
	Branding BrandingAssets
}

type AccountStatusSvcConfig

type AccountStatusSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type AccountSvcConfig

type AccountSvcConfig struct {
	// RepoFactory (required) is the repository factory.
	RepoFactory domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// S3Client (required) is the object store client used for file storage.
	S3Client s3client.ObjectStore

	// AccountPhotosBucket (optional; default: "") is the S3 bucket for account photos. It is not validated at construction.
	AccountPhotosBucket string
}

type AccountUserSvcConfig

type AccountUserSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// NotificationPublisher (required) publishes notification messages to the outbox.
	NotificationPublisher domain.NotificationPublisher

	// BillingPublisher (required) publishes billing messages to the outbox.
	BillingPublisher domain.BillingPublisher

	// S3Client (required) is the object store client used for file storage.
	S3Client s3client.ObjectStore

	// UserPhotosBucket (required outside test mode) is the S3 bucket for user photos. Validation skips this requirement when PlatformMode is test.
	UserPhotosBucket string

	// Branding (optional) resolves the merchant logo for the branded portal welcome email. Omitted, the email renders unbranded.
	Branding BrandingAssets

	// PlatformMode (required) gates test-only relaxations; in test mode UserPhotosBucket is not required.
	PlatformMode constants.PlatformMode
}

type AddressSvcConfig

type AddressSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type AddressValidationSvcConfig

type AddressValidationSvcConfig struct {
	// GoogleMapsAPIKey (optional; default: "") is the Google Maps Platform API key used for Places autocomplete and address validation. When empty, the address-validation endpoints return an internal "not configured" error.
	GoogleMapsAPIKey string
}

type AdjustmentTypeSvcConfig

type AdjustmentTypeSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type AnalyticsSvcConfig

type AnalyticsSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory
}

type AttributeSvcConfig

type AttributeSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type BatchSvcConfig

type BatchSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type BrandingAssets

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

BrandingAssets reads an account's branding images. The zero value resolves absolute URLs and nothing else, which is what a service that was never wired an object store can honestly do.

func NewBrandingAssets

func NewBrandingAssets(store s3client.ObjectStore, bucket string) BrandingAssets

NewBrandingAssets binds the object store to the account-photos bucket.

func (BrandingAssets) LogoImage

func (b BrandingAssets) LogoImage(ctx context.Context, stored string) (imageType string, data []byte)

LogoImage reads a stored branding logo reference and normalizes it to PNG bytes for embedding in a PDF. It decodes any supported source format — PNG, JPEG, GIF, or WEBP (account logos are commonly .webp, which fpdf cannot embed directly) — and re-encodes to PNG. Best-effort: any failure (missing object, network, timeout, undecodable) returns ("", nil) and the document falls back to a text-only letterhead.

func (BrandingAssets) LogoURL

func (b BrandingAssets) LogoURL(ctx context.Context, stored string) string

LogoURL turns a stored branding logo reference into a URL a mail client can load. Best-effort: an unresolvable reference yields "" and the caller renders without a logo rather than with a broken one.

type BulkWriteResult

type BulkWriteResult struct {
	Results    []domain.RowResult
	Errors     []apierror.RowError
	WrittenIDs []string
}

BulkWriteResult is what an entity's Write returns: the rows that succeeded and, separately, the rows that failed, plus the flat list of written ids for AfterCommit. The two are merged into the job's single row-indexed result list by the engine. Both are domain values — encoding them is the repository's job, so nothing here serializes. Errors is nil when every row succeeded; Results is empty-but-non-nil when the write ran and nothing succeeded, which is how that is distinguished from a job that has recorded no results at all.

type CarrierSvcConfig

type CarrierSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// ShippoFactory (required) builds Shippo shipping clients.
	ShippoFactory domain.ShippoClientFactory

	// EncryptionKey (optional; default: nil) encrypts sensitive fields at rest. It is not validated at construction.
	EncryptionKey []byte

	// AccountSvc (required) is the account service dependency.
	AccountSvc domain.AccountSvc
}

type CatalogSvcConfig

type CatalogSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory
}

type ChildAccountSvcConfig

type ChildAccountSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ConsumptionSvcConfig

type ConsumptionSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type CustomerProductLineAccessSvcConfig

type CustomerProductLineAccessSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type CustomerSvcConfig

type CustomerSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type DeliverySvcConfig

type DeliverySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type DemandOverrideSvcConfig

type DemandOverrideSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type DepartmentSvcConfig

type DepartmentSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type EDISvcConfig

type EDISvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type EmailLogSvcConfig

type EmailLogSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type ExportDelivery

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

carries a rendered export to object storage and hands back links to it. Bound to one bucket so callers never repeat it.

func NewExportDelivery

func NewExportDelivery(store s3client.ObjectStore, bucket string) ExportDelivery

binds the object store to the exports bucket.

func (ExportDelivery) PresignedURL

func (d ExportDelivery) PresignedURL(ctx context.Context, key string) (string, *apierror.APIError)

signs a link to an already-uploaded export. Signing is local, so this makes no network call and a fresh link costs nothing.

func (ExportDelivery) Upload

func (d ExportDelivery) Upload(ctx context.Context, key string, body []byte, contentType string) *apierror.APIError

type ExportRunner

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

runs every accepted export. One instance serves all thirteen: the resource is on the job, so the only per-export variance is which builder to call.

func NewExportRunner

func NewExportRunner(config *ExportRunnerConfig) *ExportRunner

func (*ExportRunner) Render

renders an accepted export, uploads it, and settles the job. The inbox de-dupes redeliveries; the terminal guard covers a replay that outlives its record.

type ExportRunnerConfig

type ExportRunnerConfig struct {
	// Repos (required) is the repository factory the render reads through.
	Repos domain.RepoFactory
	// JobSvcFactory (required) settles the job the export is tracked by.
	JobSvcFactory domain.JobSvcFactory
	// Delivery (required) uploads the rendered file.
	Delivery ExportDelivery
	// Builders (required) render one resource each, keyed by its slug.
	Builders map[string]domain.ExportBuilder
}

type ExportSvcConfig

type ExportSvcConfig struct {
	// Delivery (required) signs the link to a rendered export.
	Delivery ExportDelivery
}

type HubspotSyncSvcConfig

type HubspotSyncSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
	// MediatorFactory (required) builds the idempotency mediator that gives mutations recovery-point semantics.
	MediatorFactory domain.MediatorFactory
	// JobSvcFactory (required) builds the job service the async bulk-resolve and export operations record their work on.
	JobSvcFactory domain.JobSvcFactory
	// TxManager (required) opens the transactions that commit a job/review mutation atomically with its outbox command and audit event.
	TxManager TransactionManager
	// Publisher (required) writes the preview/execute commands to the outbox.
	Publisher domain.HubspotSyncPublisher
}

HubspotSyncSvcConfig configures the HubSpot backfill application service.

type InventoryChangeLogSvcConfig

type InventoryChangeLogSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type InvoiceSvcConfig

type InvoiceSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ItemCategorySvcConfig

type ItemCategorySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ItemSvcConfig

type ItemSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type JobSvcConfig

type JobSvcConfig struct {
	// Repos (required) is the repository factory. It is the only dependency: the
	// job service opens no transaction of its own, so it acts inside whichever one
	// this factory belongs to.
	Repos domain.RepoFactory
}

type LocationSvcConfig

type LocationSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type MachineDowntimeSvcConfig

type MachineDowntimeSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type MachineStatusSvcConfig

type MachineStatusSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type MachineSvcConfig

type MachineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type MaterialSvcConfig

type MaterialSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type MeasureSvcConfig

type MeasureSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type OperatingCalendarSvcConfig

type OperatingCalendarSvcConfig struct {
	Repos domain.RepoFactory
}

type OrderDiscountSvcConfig

type OrderDiscountSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PartSvcConfig

type PartSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PaymentTermSvcConfig

type PaymentTermSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PermissionGroupSvcConfig

type PermissionGroupSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type PickLineSvcConfig

type PickLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PickSvcConfig

type PickSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// (required) Builds the job service the async pack records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PortalDomainSvcConfig

type PortalDomainSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// Provider (required) is the serving/TLS provider for portal custom domains.
	Provider domain.PortalDomainProvider
}

type PortalRegistrationSessionSvcConfig

type PortalRegistrationSessionSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
	// Registrar (required) registers the buyer as a customer on completion (the registration-flow service).
	Registrar domain.CustomerRegistrar
}

type PrioritySvcConfig

type PrioritySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type ProductLineSvcConfig

type ProductLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductSvcConfig

type ProductSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductTypeSvcConfig

type ProductTypeSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductionFlowSvcConfig

type ProductionFlowSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductionRunSvcConfig

type ProductionRunSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service used to raise and settle the
	// jobs behind this service's asynchronous operations.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductionScheduleSchedulerConfig

type ProductionScheduleSchedulerConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// Lease (required) serializes the tick across pods.
	Lease *lease.Lease

	// Svc (required) performs the transactional enqueue. The tick never solves in process; it reserves a version and queues the work.
	Svc domain.ProductionScheduleSvc

	// PollInterval (optional; default: 1m) overrides the tick interval, for tests. Zero or negative values are treated as unset.
	PollInterval time.Duration
}

ProductionScheduleSchedulerConfig configures the generation cadence.

func (*ProductionScheduleSchedulerConfig) WithDefaults

WithDefaults returns the config with default values applied where unset.

type ProductionScheduleSvcConfig

type ProductionScheduleSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps the multi-table schedule write.
	TxManager TransactionManager

	// Enqueuer (optional; default: nil) queues cadence-driven generations. Nil disables the cadence, which is how a deployment without messaging still serves every read path.
	Enqueuer domain.ProductionScheduleEnqueuer
}

type ProductionStepSvcConfig

type ProductionStepSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service used to raise and settle the
	// jobs behind the async bulk upsert.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ProductionSvcConfig

type ProductionSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PropertySvcConfig

type PropertySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk operations settle through.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PurchaseOrderLineSvcConfig

type PurchaseOrderLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type PurchaseOrderSvcConfig

type PurchaseOrderSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// NotificationPublisher (optional; default: nil) publishes notification messages to the outbox. When nil, status-change emails (e.g. purchase-order submission on issue) are skipped. It is not validated at construction.
	NotificationPublisher domain.NotificationPublisher
}

type ReceivableSvcConfig

type ReceivableSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// NotificationPublisher (required) publishes notification messages to the outbox.
	NotificationPublisher domain.NotificationPublisher
}

ReceivableSvcConfig holds the dependencies for the receivable service.

type ReceivingOrderLineSvcConfig

type ReceivingOrderLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ReceivingOrderSvcConfig

type ReceivingOrderSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type RegistrationFlowSvcConfig

type RegistrationFlowSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type RoleSvcConfig

type RoleSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SalesOrderLineSvcConfig

type SalesOrderLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SalesOrderStatusSvcConfig

type SalesOrderStatusSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory
}

type SalesOrderSvcConfig

type SalesOrderSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// CheckoutClientFactory (optional; default: nil) builds Stripe checkout clients. It is not validated at construction; checkout code paths panic at runtime if it is unset.
	CheckoutClientFactory domain.StripeCheckoutClientFactory

	// NotificationPublisher (optional; default: nil) publishes notification messages to the outbox. It is not validated at construction.
	NotificationPublisher domain.NotificationPublisher

	// SalesOrderPublisher (optional; default: nil) publishes sales-order domain events to the outbox. When nil, the sales-order-created event is skipped. It is not validated at construction.
	SalesOrderPublisher domain.SalesOrderEventPublisher

	// ShippoFactory (optional; default: nil) builds Shippo clients for live shipping-rate estimation on create. When nil, the synthesized shipping line falls back to rate 0 (after honoring all freight-exemption / flat-rate / minimum-order rules).
	ShippoFactory domain.ShippoClientFactory

	// EncryptionKey (optional; default: nil) encrypts sensitive fields at rest. It is not validated at construction.
	EncryptionKey []byte

	// FrontendURL (optional; default: "") is the dashboard base URL used in links. It is not validated at construction.
	FrontendURL string

	// Branding (optional) resolves the merchant logo for the acknowledgement email and PDF letterhead. Omitted, both fall back to a text-only letterhead.
	Branding BrandingAssets
}

type SalesTargetSvcConfig

type SalesTargetSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SandboxSvcConfig

type SandboxSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ScanningStationSvcConfig

type ScanningStationSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ServiceLevelSvcConfig

type ServiceLevelSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SettlementSvcConfig

type SettlementSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ShipmentLineSvcConfig

type ShipmentLineSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type ShipmentSvcConfig

type ShipmentSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// ShippoFactory (optional; default: nil) builds Shippo shipping clients. It is not validated at construction; shipping code paths panic at runtime if it is unset.
	ShippoFactory domain.ShippoClientFactory

	// EncryptionKey (optional; default: nil) decrypts stored integration credentials (e.g. the Shippo API key). It is not validated at construction; live-rate code paths fail at runtime if it is unset while a Shippo integration is configured.
	EncryptionKey []byte

	// NotificationPub (optional; default: nil) publishes notification messages to the outbox. It is not validated
	// at construction.
	NotificationPub domain.NotificationPublisher

	// Meters the invoice a ship creates (optional; default: nil). Not validated; a nil publisher skips
	// metering rather than failing the ship.
	BillingPub domain.BillingPublisher

	// Stores a shipped label and removes a voided one (optional; default: nil). Not validated; a nil client skips both.
	S3Client s3client.ObjectStore

	// Names the S3 bucket holding shipping labels (optional; default: ""). Not validated; an empty bucket skips both.
	ShippingLabelsBucket string

	// FrontendURL (optional; default: "") is the dashboard base URL behind the invoice email's
	// order-online link. Not validated; an empty URL drops the link.
	FrontendURL string

	// Branding (optional) resolves the merchant logo for the invoice PDF letterhead. Omitted, it falls back to a text-only letterhead.
	Branding BrandingAssets
}

type ShippingCaseSvcConfig

type ShippingCaseSvcConfig struct {
	// RepoFactory (required) is the repository factory.
	RepoFactory domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// S3Client (required) is the object store client used for file storage.
	S3Client s3client.ObjectStore

	// ShippingLabelsBucket (optional; default: "") is the S3 bucket for shipping labels. It is not validated at construction.
	ShippingLabelsBucket string
}

type ShippingTermSvcConfig

type ShippingTermSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SupplierMaterialSvcConfig

type SupplierMaterialSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SupplierSvcConfig

type SupplierSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type SysPropertySvcConfig

type SysPropertySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type TenancySvcConfig

type TenancySvcConfig struct {
	// RepoFactory (required) is the repository factory.
	RepoFactory domain.RepoFactory

	// AuthClient (required) is the auth-service client.
	AuthClient domain.CoreAuthClient

	// S3Client (required) is the object store client used for file storage.
	S3Client s3client.ObjectStore

	// UserPhotosBucket (optional; default: "") is the S3 bucket for user photos. It is not validated at construction.
	UserPhotosBucket string
}

type TerritorySvcConfig

type TerritorySvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type TransactionAllocationSvcConfig

type TransactionAllocationSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type TransactionManager

type TransactionManager = db.TransactionManager[*sqlc.Queries, domain.RepoFactory]

func NewTransactionManager

func NewTransactionManager(sqlDB *sql.DB, queries *sqlc.Queries) TransactionManager

type TransactionSvcConfig

type TransactionSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type UnitGroupSvcConfig

type UnitGroupSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type UnitSvcConfig

type UnitSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// JobSvcFactory (required) builds the job service the async bulk upsert records on.
	JobSvcFactory domain.JobSvcFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

type UserSvcConfig

type UserSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// S3Client (required) is the object store client used for file storage.
	S3Client s3client.ObjectStore

	// UserPhotosBucket (optional; default: "") is the S3 bucket for user photos. It is not validated at construction.
	UserPhotosBucket string
}

type UtilsSvcConfig

type UtilsSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager

	// NotificationPublisher (required) publishes notification messages to the outbox.
	NotificationPublisher domain.NotificationPublisher

	// FrontendURL (optional; default: "") is the dashboard base URL used in links. It is not validated at construction.
	FrontendURL string

	// Branding (optional) resolves the merchant logo for the acknowledgement email and PDF letterhead. Omitted, both fall back to a text-only letterhead.
	Branding BrandingAssets
}

UtilsSvcConfig holds the dependencies for the utils service.

type VolumeDiscountSvcConfig

type VolumeDiscountSvcConfig struct {
	// Repos (required) is the repository factory.
	Repos domain.RepoFactory

	// MediatorFactory (required) builds the mediators used by this service.
	MediatorFactory domain.MediatorFactory

	// TxManager (required) wraps multi-step operations in database transactions.
	TxManager TransactionManager
}

Source Files

Jump to

Keyboard shortcuts

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