config

package
v0.0.0-...-3029119 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: AGPL-3.0 Imports: 7 Imported by: 17

Documentation

Index

Constants

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

Variables

View Source
var (
	DefaultGormConfig = &gorm.Config{
		Logger: logger.Default.LogMode(logger.Silent),
	}
)
View Source
var (
	ErrInvalidBinance = errors.New("invalid binance config")
)
View Source
var (
	ErrInvalidConfig = errors.New("invalid redis config")
)
View Source
var (
	ErrInvalidNATS = errors.New("invalid nats config")
)
View Source
var (
	ErrInvalidSQL = errors.New("invalid sql config")
)

Functions

This section is empty.

Types

type Binance

type Binance struct {
	ApiKey    string
	SecretKey string
}

func LoadBinance

func LoadBinance() (c Binance)

func (Binance) Validate

func (c Binance) 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

type Redis

type Redis struct {
	Address  string
	Password string
}

func LoadRedis

func LoadRedis() (c Redis)

func (Redis) Validate

func (c Redis) Validate() error

type SQL

type SQL struct {
	User     string
	Password string
	Host     string
	Port     int
	Database string
}

func LoadSQL

func LoadSQL() (c SQL)

func (SQL) URL

func (c SQL) URL() string

func (SQL) Validate

func (c SQL) Validate() error

Jump to

Keyboard shortcuts

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