conf

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binance

type Binance struct {
	APIKey string `env:"BINANCE_API_KEY,required"`
	Secret string `env:"BINANCE_SECRET,required"`
	Debug  bool   `env:"BINANCE_DEBUG" envDefault:"true"`
}

type Bot

type Bot struct {
	AdminID     int    `env:"ADMIN_TELEGRAM_ID,required"`
	Token       string `env:"BOT_TOKEN,required"`
	PrettyPrint bool   `env:"PRETTY_LOGS" envDefault:"false"`
	IsTest      bool   `env:"TEST_MODE" envDefault:"false"`
}

type Chatex added in v0.3.0

type Chatex struct {
	RefreshToken string `env:"CHATEX_REFRESH_TOKEN"`
	URL          string `env:"CHATEX_API" envDefault:"https://api.chatex.com/v1"`
}

type Redis added in v0.3.0

type Redis struct {
	Password string `env:"REDIS_PASSWORD"`
	Addr     string `env:"REDIS_ADDR"`
}

type Struct

type Struct struct {
	Bot     Bot
	Binance Binance
	Chatex  Chatex
	Redis   Redis
}

func ParseEnv

func ParseEnv() (*Struct, error)

Jump to

Keyboard shortcuts

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