config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnv

func GetEnv(key, fallback string) string

Types

type Config

type Config struct {
	HTTPHost string
	HTTPPort int

	PrivateKeyBytes []byte

	NuklaiRPC             string
	Amount                uint64
	StartDifficulty       uint16
	SolutionsPerSalt      int
	TargetDurationPerSalt int64 // seconds

	AdminToken string

	// PostgreSQL configuration
	PostgresHost     string
	PostgresPort     int
	PostgresUser     string
	PostgresPassword string
	PostgresDBName   string
	PostgresSSLMode  string
}

func LoadConfigFromEnv

func LoadConfigFromEnv() (*Config, error)

func (*Config) Address

func (c *Config) Address() codec.Address

func (*Config) AddressBech32

func (c *Config) AddressBech32() string

func (*Config) PrivateKey

func (c *Config) PrivateKey() ed25519.PrivateKey

Jump to

Keyboard shortcuts

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