config

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NatsHostEnvName = "NATS_HOST"
	NatsPortEnvName = "NATS_PORT"
)

Variables

View Source
var (
	ErrInvalidBinance = errors.New("invalid binance config")
)
View Source
var (
	ErrInvalidMongoConfig = errors.New("invalid mongo config")
)
View Source
var (
	ErrInvalidNATS = errors.New("invalid nats config")
)

Functions

This section is empty.

Types

type Binance

type Binance struct {
	ApiKey    string
	SecretKey string
}

func LoadBinance

func LoadBinance(defaultValues *Binance, additionalEnvFilePaths ...string) (c Binance)

func LoadBinanceTest

func LoadBinanceTest() Binance

func (Binance) Validate

func (c Binance) Validate() error

type Mongo

type Mongo struct {
	ConnectionString string
	Database         string
}

func LoadMongo

func LoadMongo(defaultValues *Mongo) (c Mongo)

func (Mongo) Validate

func (c Mongo) Validate() error

type NATS

type NATS struct {
	Host string
	Port int
}

func LoadNATS

func LoadNATS() (c NATS)

func (NATS) URL

func (c NATS) URL() string

func (NATS) Validate

func (c NATS) Validate() error

Jump to

Keyboard shortcuts

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