config

package
v0.0.0-...-98cd694 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Unlicense 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

View Source
var (
	// Providers are what we provide to dependency injection.
	Providers = wire.NewSet(
		ProvideCapitalismImplementation,
	)
)

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.

Types

type Config

type Config struct {
	Stripe   *stripe.Config `json:"stripe"   toml:"stripe"`
	Provider string         `json:"provider" toml:"provider"`
	Enabled  bool           `json:"enabled"  toml:"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