config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintUsage

func PrintUsage(w io.Writer) error

Types

type Config

type Config struct {
	// compile-time parameters
	GitCommit     string
	GitVersion    string
	EmbedFrontend bool

	Env    string     `yaml:"env" env:"APP_ENV" env-default:"production" env-description:"Environment [production, local, sandbox]"`
	Debug  bool       `yaml:"debug" env:"APP_DEBUG" env-default:"false" env-description:"Enables debug mode"`
	Logger log.Config `yaml:"logger"`

	Oxygen Oxygen `yaml:"oxygen"`
	KMS    KMS    `yaml:"kms"`

	Providers Providers `yaml:"providers"`

	Notifications Notifications `yaml:"notifications"`
}

func New

func New(gitCommit, gitVersion, configPath string, skipConfig, embedFrontend bool) (*Config, error)

type KMS

type KMS struct {
	// IsEmbedded indicates that app is running in 'all-in-one' mode.
	// Not suitable for safety reasons as KMS should operate in isolated environment in order to
	// keep private keys secure.
	IsEmbedded bool `yaml:"-"`

	Server http.Config `yaml:"server"`
	Bolt   bolt.Config `yaml:"store"`
}

type Notifications

type Notifications struct {
	SlackWebhookURL string `yaml:"slack_webhook_url" env:"NOTIFICATIONS_SLACK_WEBHOOK_URL" env-description:"Internal variable"`
}

type Oxygen

type Oxygen struct {
	Server     http.Config       `yaml:"server"`
	Auth       auth.Config       `yaml:"auth"`
	Postgres   pg.Config         `yaml:"postgres"`
	Processing processing.Config `yaml:"processing"`
}

type Providers

type Providers struct {
	Tatum     tatum.Config    `yaml:"tatum"`
	Trongrid  trongrid.Config `yaml:"trongrid"`
	KmsClient client.Config   `yaml:"kms"`
}

Jump to

Keyboard shortcuts

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