config

package
v0.0.0-...-d0dd730 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(cmd *cobra.Command) error

ReadConfig reads configuration from command

Types

type Config

type Config struct {
	AppName   string
	Port      int64
	GRPCPort  int64
	CORSHosts []string

	AdminDB       DBConfig
	CustomerDB    DBConfig
	StellarCoreDB DBConfig

	Services       ServicesConfig
	StellarNetwork StellarNetworkConfig
	Site           SiteConfig
	WebLinks       WebLinksConfig

	SQLMigrationDir string
	ApplicationDir  string
	IsDevSystem     bool
	ConnectToCoreDB bool

	Kyc   KycConfig
	Promo PromoConfig
}

Config for the app

var Cnf *Config

Cnf holds the application configuration

type DBConfig

type DBConfig struct {
	DBUser     string
	DBPassword string
	DBHost     string
	DBPort     int64
	DBName     string
}

DBConfig - database configuration

type KycConfig

type KycConfig struct {
	DocumentsPath string
}

KycConfig - kyc configuration

type PromoConfig

type PromoConfig struct {
	ImagesPath string
}

PromoConfig - promo configuration

type ServicesConfig

type ServicesConfig struct {
	MailSrvPort int64
	MailSrvHost string
}

ServicesConfig holds the config for all services

type SiteConfig

type SiteConfig struct {
	SiteName    string
	EmailSender string
}

SiteConfig globals that define the site behaviour

type StellarNetworkConfig

type StellarNetworkConfig struct {
	HorizonURL string
}

StellarNetworkConfig - stellar network config

type WebLinksConfig

type WebLinksConfig struct {
	LostTFA   string
	ImagesUrl string
}

WebLinksConfig links that are used in the clients (e.g. token confirm)

Jump to

Keyboard shortcuts

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