config

package
v0.0.0-...-3d48b77 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionStatusPending  = "PENDING"
	TransactionStatusFilled   = "FILLED"
	TransactionStatusCanceled = "CANCELED"
	TransactionStatusFailed   = "FAILED"

	// Used to map Entry Postgres UUIDs
	VenueFeeSenderEntryKey    = "venueFeeSenderEntry"
	VenueFeeReceiverEntryKey  = "venueFeeReceiverEntry"
	RetailFeeSenderEntryKey   = "retailFeeSenderEntry"
	RetailFeeReceiverEntryKey = "retailFeeReceiverEntry"
	SenderEntryKey            = "senderEntry"
	ReceiverEntryKey          = "receiverEntry"

	Debit  = "DEBIT"
	Credit = "CREDIT"
	Buy    = "BUY"
	Sell   = "SELL"

	// QLDB Table Names
	AccountsTable = "Accounts"
	LedgerTable   = "Ledger"
)

Variables

This section is empty.

Functions

func LogInit

func LogInit(app AppConfig) *logrus.Entry

func Setup

func Setup(app *AppConfig)

func ValidateConfig

func ValidateConfig(a AppConfig, l *log.Entry)

Types

type AppConfig

type AppConfig struct {
	Port                 string `mapstructure:"PORT"`
	DbCreds              string `mapstructure:"DB_CREDENTIALS"`
	DbPort               string `mapstructure:"DB_PORT"`
	DbHostname           string `mapstructure:"DB_HOSTNAME"`
	Env                  string `mapstructure:"ENV_NAME"`
	LogLevel             string `mapstructure:"LOG_LEVEL"`
	NetworkName          string `mapstructure:"INTERNAL_API_HOSTNAME"`
	CoinbaseUserId       string `mapstructure:"COINBASE_USER_ID"`
	NeoworksUserId       string `mapstructure:"NEOWORKS_USER_ID"`
	CoinbaseUsdAccountId string `mapstructure:"COINBASE_USD_ACCOUNT_ID"`
	NeoworksUsdAccountId string `mapstructure:"NEOWORKS_USD_ACCOUNT_ID"`
	DevRegion            string `mapstructure:"DEV_REGION"`
	QldbName             string `mapstructure:"QLDB_NAME"`
	QueueUrl             string `mapstructure:"QUEUE_URL"`
	LocalStackUrl        string `mapstructure:"LOCAL_STACK_URL"`
	DevProfile           string `mapstructure:"DEV_PROFILE"`
}

func (AppConfig) GenerateAwsConfig

func (app AppConfig) GenerateAwsConfig(l *log.Entry) aws.Config

func (AppConfig) IsLocalEnv

func (a AppConfig) IsLocalEnv() bool

Jump to

Keyboard shortcuts

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