testutils

package
v1.0.0-beta.228 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Client *entdb.Client
	Logger *slog.Logger

	BillingService     billing.Service
	FeatureService     feature.FeatureConnector
	StreamingConnector streaming.Connector
	RecognizerService  recognizer.Service

	FlatFeeHandler        flatfee.Handler
	CreditPurchaseHandler creditpurchase.Handler
	UsageBasedHandler     usagebased.Handler
}

func (Config) Validate

func (c Config) Validate() error

type MockHandlers

type MockHandlers struct {
	FlatFee        flatfee.Handler
	CreditPurchase creditpurchase.Handler
	UsageBased     usagebased.Handler
}

func NewMockHandlers

func NewMockHandlers() MockHandlers

type Services

type Services struct {
	ChargesService        charges.Service
	UsageBasedService     usagebased.Service
	FlatFeeService        flatfee.Service
	CreditPurchaseService creditpurchase.Service
}

func NewServices

func NewServices(t testing.TB, config Config) (*Services, error)

NewServices constructs the charges stack from external dependencies and handlers.

Jump to

Keyboard shortcuts

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