config

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Centrifugo added in v1.1.0

type Centrifugo struct {
	ApiSecret string `required:"true"`
	URL       string `default:"http://127.0.0.1:8000"`
}

type Config

type Config struct {
	BrokerAddress string `envconfig:"BROKER_ADDRESS" default:"amqp://127.0.0.1:5672"`
	RedisHost     string `envconfig:"REDIS_HOST" default:"127.0.0.1:6379"`
	RedisPassword string `envconfig:"REDIS_PASSWORD" default:""`

	CentrifugoPaymentForm            *Centrifugo `envconfig:"CENTRIFUGO_PAYMENT_FORM"`
	CentrifugoDashboard              *Centrifugo `envconfig:"CENTRIFUGO_DASHBOARD"`
	CentrifugoUserChannel            string      `envconfig:"CENTRIFUGO_USER_CHANNEL" default:"paysuper:order#%s"`
	CentrifugoAdminChannel           string      `envconfig:"CENTRIFUGO_ADMIN_CHANNEL" default:"paysuper:admin"`
	CentrifugoMerchantTestingChannel string      `envconfig:"CENTRIFUGO_MERCHANT_CHANNEL" default:"paysuper:merchant:order_testing#%s"`

	Selector               string `envconfig:"MICRO_SELECTOR"`
	BillingVersion         string `envconfig:"MICRO_BILLING_VERSION"`
	BillingVersionFallback string `envconfig:"MICRO_BILLING_VERSION_FALLBACK" default:"latest"`

	MetricsPort              string `envconfig:"METRICS_PORT" default:"8087"`
	MetricsReadTimeout       int    `envconfig:"METRICS_READ_TIMEOUT" default:"60"`
	MetricsReadHeaderTimeout int    `envconfig:"METRICS_READ_HEADER_TIMEOUT" default:"60"`

	SlackWebHookUrl   string `envconfig:"SLACK_WEBHOOK_URL" required:"true"`
	SlackNotifierName string `envconfig:"SLACK_NOTIFIER_NAME" default:"WebHook Notifier"`
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) GetCustomerCentrifugoChannelName added in v1.3.0

func (m *Config) GetCustomerCentrifugoChannelName(order *billingpb.Order) string

func (*Config) GetWebhookTestingCentrifugoChannelName added in v1.3.0

func (m *Config) GetWebhookTestingCentrifugoChannelName(order *billingpb.Order) string

Jump to

Keyboard shortcuts

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