config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateGroupName

func GenerateGroupName(subgroup string) string

Types

type Analytics

type Analytics struct {
	AnalyticsAddress string `env:"ANALYTICS_API_ADDRESS" envDefault:"localhost:11077"`
}

type App

type App struct {
	LogLevel   string `env:"LOG_LEVEL" envDefault:"info"`
	Prometheus Prometheus
	Health     Health
	REST       REST
	Core       Core
	Inbox      Inbox
	Analytics  Analytics
	Nats       Nats
	Chain      Chain

	SiweTTL time.Duration `env:"SIWE_TTL" envDefault:"1h"`
}

type Chain

type Chain struct {
	Eth    ChainInstance `envPrefix:"CHAIN_ETH_"`
	Gnosis ChainInstance `envPrefix:"CHAIN_GNOSIS_"`
}

type ChainInstance

type ChainInstance struct {
	ID             uint   `env:"ID"`
	InternalName   string `env:"INTERNAL_NAME"`
	PublicName     string `env:"PUBLIC_NAME"`
	Symbol         string `env:"SYMBOL"`
	PublicNode     string `env:"PUBLIC_NODE"`
	Decimals       uint   `env:"DECIMALS"`
	TxScanTemplate string `env:"TX_SCAN_TEMPLATE"`
}

type Core

type Core struct {
	CoreURL string `env:"CORE_URL" envDefault:""`
}

type Health

type Health struct {
	Listen string `env:"HEALTH_LISTEN" envDefault:":3000"`
}

type Inbox

type Inbox struct {
	StorageAddress string `env:"INBOX_API_STORAGE_ADDRESS" envDefault:"localhost:11055"`
	FeedAddress    string `env:"INBOX_API_FEED_ADDRESS" envDefault:"localhost:11066"`
}

type Nats

type Nats struct {
	URL              string        `env:"NATS_URL" envDefault:"nats://127.0.0.1:4222"`
	MaxReconnects    int           `env:"NATS_MAX_RECONNECTS" envDefault:"10"`
	ReconnectTimeout time.Duration `env:"NATS_RECONNECT_TIMEOUT" envDefault:"1s"`
}

type Prometheus

type Prometheus struct {
	Listen string `env:"PROMETHEUS_LISTEN" envDefault:":2112"`
}

type REST

type REST struct {
	Listen  string        `env:"REST_LISTEN" envDefault:":8080"`
	Timeout time.Duration `env:"REST_TIMEOUT" envDefault:"30s"`
}

Jump to

Keyboard shortcuts

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