config

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StripeProvider is the key that indicates Stripe should be used for payments.
	StripeProvider = "stripe"
)

Variables

This section is empty.

Functions

func ProvideCapitalismImplementation

func ProvideCapitalismImplementation(logger logging.Logger, tracerProvider tracing.TracerProvider, cfg *Config) (capitalism.PaymentManager, error)

ProvideCapitalismImplementation provides a capitalism.PaymentManager implementation based on the config.

func RegisterPaymentManager

func RegisterPaymentManager(i do.Injector)

RegisterPaymentManager registers a capitalism.PaymentManager with the injector.

Types

type Config

type Config struct {
	Stripe   *stripe.Config `env:"init"     envPrefix:"STRIPE_" json:"stripe"`
	Provider string         `env:"PROVIDER" json:"provider"`
	Enabled  bool           `env:"ENABLED"  json:"enabled"`
}

Config allows for the configuration of this package and its subpackages.

func (*Config) ValidateWithContext

func (cfg *Config) ValidateWithContext(ctx context.Context) error

ValidateWithContext validates a StripeConfig struct.

Jump to

Keyboard shortcuts

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