config

package
v0.0.0-...-a82784a Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Database string         `toml:"database"`
	Port     int            `toml:"port" default:"6446"`
	Telegram TelegramConfig `toml:"telegram"`
	LogLevel slog.Level
}

func LoadFile

func LoadFile(filename string) (*Config, error)

func LoadFromEnv

func LoadFromEnv() (*Config, error)

type TelegramConfig

type TelegramConfig struct {
	Name   string `toml:"name"`
	Domain string `toml:"domain"`
	Token  string `toml:"token"`
	ApiKey string `toml:"apikey"`
}

Jump to

Keyboard shortcuts

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