config

package
v0.0.0-...-5882973 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RPCChainName    string
	RPCURL          string `env:"RPC_URL,default=http://localhost:8545"`
	RPCWSURL        string `env:"RPC_WS_URL,default=ws://localhost:8545"`
	SentryURL       string `env:"SENTRY_URL"`
	PinataBaseURL   string `env:"PINATA_BASE_URL"`
	PinataAPIKey    string `env:"PINATA_API_KEY"`
	PinataAPISecret string `env:"PINATA_API_SECRET"`
	DiscordURL      string `env:"DISCORD_URL,required"`
	DBSecret        string `env:"DB_SECRET,required"`
}

func New

func New(ctx context.Context, envpath, confpath string) (*Config, error)

type DBConfig

type DBConfig struct {
	DBUser       string `env:"DB_USER,required"`
	DBPassword   string `env:"DB_PASSWORD,required"`
	DBName       string `env:"DB_NAME,required"`
	DBHost       string `env:"DB_HOST,required"`
	DBReaderHost string `env:"DB_READER_HOST,required"`
	DBSecret     string `env:"DB_SECRET,required"`
}

func NewDBConfig

func NewDBConfig(ctx context.Context, envpath string) (*DBConfig, error)

Jump to

Keyboard shortcuts

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