config

package
v0.0.0-...-701c789 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup(app *AppConfig)

func UnmarshalBase

func UnmarshalBase(b *BaseConfig)

Types

type AppConfig

type AppConfig struct {
	BaseConfig
	ClientId   string `mapstructure:"COGNITO_APP_CLIENT_ID"`
	UserPoolId string `mapstructure:"COGNITO_USER_POOL_ID"`

	OrderGrpcPort    string `mapstructure:"ORDER_GRPC_PORT"`
	OrderRouteId     string `mapstructure:"ORDER_MGR_ROUTE_ID"`
	OrderMgrHostname string `mapstructure:"ORDER_MGR_HOSTNAME"`

	UserGrpcPort    string `mapstructure:"USER_GRPC_PORT"`
	UserMgrHostname string `mapstructure:"USER_MGR_HOSTNAME"`
	UserRouteId     string `mapstructure:"USER_MGR_ROUTE_ID"`

	DatabaseEndpoint  string `mapstructure:"DB_ENDPOINT"`
	BalanceTableName  string `mapstructure:"BALANCE_TABLE"`
	AssetTableName    string `mapstructure:"ASSET_TABLE"`
	ActivityTableName string `mapstructure:"ACTIVITY_TABLE"`

	RedisEndpoint string `mapstructure:"REDIS_ENDPOINT_ADDRESS"`
	RedisPort     string `mapstructure:"REDIS_ENDPOINT_PORT"`

	ExternalHostName    string `mapstructure:"EXTERNAL_HOST_NAME"`
	ExternalApiHostName string `mapstructure:"EXTERNAL_API_HOST_NAME"`
}

func (AppConfig) IsLocalEnv

func (a AppConfig) IsLocalEnv() bool

type BaseConfig

type BaseConfig struct {
	Env       string `mapstructure:"ENV_NAME"`
	LogLevel  string `mapstructure:"LOG_LEVEL"`
	LogToFile string `mapstructure:"LOG_TO_FILE"`
	Region    string `mapstructure:"REGION"`
	Port      string `mapstructure:"PORT"`
	GrpcPort  string `mapstructure:"GRPC_PORT"`
}

TODO move to util pkg

Jump to

Keyboard shortcuts

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