config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2022 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database database.Config `yaml:"database"`
	// TODO Create a redis and vault package
	Redis struct {
		Host     string `yaml:"host" env:"REDIS_HOST" env-description:"Redis Server host" env-default:"localhost"`
		Port     string `yaml:"port" env:"REDIS_PORT" env-description:"Redis Server port" env-default:"6379"`
		Password string `yaml:"port" env:"REDIS_PASSWORD" env-description:"Redis Server password"`
	} `yaml:"redis"`
	Port                string        `env:"APP_PORT" env-description:"Port for HTTP service" env-default:"6009"`
	MngAPI              mngapi.Config `yaml:"mngapi"`
	Vault               VaultConfig   `yaml:"vault"`
	DeploymentID        string        `yaml:"deploymentID" env:"DEPLOYMENT_ID"`
	Opendax             OpendaxConfig `yaml:"opendax"`
	MarketsBlacklist    string        `yaml:"markets_blacklist" env:"MARKETS_BLACKLIST"`
	CurrenciesBlacklist string        `yaml:"currencies_blacklist" env:"CURRENCIES_BLACKLIST"`
}

Config is the application configuration structure

type OpendaxConfig

type OpendaxConfig struct {
	Addr string `yaml:"addr" env:"OPENDAX_ADDR" env-description:"Opendax API endpoint" env-default:"http://opendax:6969"`
}

OpendaxConfig is the configuration for opendax cloud

type Runtime

type Runtime struct {
	Conf    Config
	DB      *gorm.DB
	Srv     *gin.Engine
	Version string
}

Runtime configuration of the application

type VaultConfig

type VaultConfig struct {
	Addr  string `yaml:"addr" env:"VAULT_ADDR" env-default:"http://localhost:8200"`
	Token string `yaml:"token" env:"VAULT_TOKEN"`
}

VaultConfig contains Vault-related configuration

Jump to

Keyboard shortcuts

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