config

package
v0.0.0-...-21db788 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config loads configuration from environment variables.

Index

Constants

This section is empty.

Variables

View Source
var (
	SingleLine string = "--------------------------------------------------"
	DoubleLine string = "=================================================="
)

Functions

This section is empty.

Types

type Config

type Config struct {
	APIName              string `env:"MB_API_NAME"`
	APIVersion           string `env:"MB_API_VERSION"`
	APIUrl               string `env:"MB_API_URL"`
	ServerPort           string `env:"MB_API_SERVER_PORT"`
	ServerLogLevel       string `env:"MB_API_SERVER_LOG_LEVEL"`
	PostgresDsn          string `env:"MB_API_PG_DSN"`
	PostgresSchema       string `env:"MB_API_PG_SCHEMA"`
	PostgresLogLevel     string `env:"MB_API_PG_LOG_LEVEL"`
	RedisHost            string `env:"MB_API_REDIS_HOST"`
	RedisPort            string `env:"MB_API_REDIS_PORT"`
	RedisPassword        string `env:"MB_API_REDIS_PASSWORD"`
	TelegramBotToken     string `env:"MB_API_TELEGRAM_BOT_TOKEN"`
	TelegramChatID       string `env:"MB_API_TELEGRAM_CHAT_ID"`
	KitetickerUserID     string `env:"MB_API_KITETICKER_USER_ID"`
	KitetickerPassword   string `env:"MB_API_KITETICKER_PASSWORD"`
	KitetickerTotpSecret string `env:"MB_API_KITETICKER_TOTP_SECRET"`
}

Config represents the application configuration

func Get

func Get() (*Config, error)

Get returns the application configuration

func (*Config) String

func (c *Config) String() string

String returns the configuration as a string

Jump to

Keyboard shortcuts

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