runtime

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: GPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runtime loads example and CLI configuration from environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	StorageDriver   string
	DatabaseURL     string
	PGAutoSchema    bool
	MigrationsStore string
	MigrationsFile  string
}

CLI contains storage and migration command settings.

type Config

type Config struct {
	AppName string
	Logging logging.Config
	TG      Telegram
	VK      VK
	Discord Discord
	CLI     CLI
}

Config groups application, platform and CLI settings.

func Load

func Load() Config

Load reads .env when present and then resolves configuration from the environment.

func (Config) ValidatePlatforms

func (c Config) ValidatePlatforms() error

ValidatePlatforms checks that at least one usable platform is configured.

type Discord added in v2.0.1

type Discord struct {
	Token string
}

Discord contains Discord adapter settings.

type Telegram

type Telegram struct {
	Token            string
	ServerURL        string
	ProxyURL         string
	CheckInitTimeout time.Duration
	PollTimeout      time.Duration
	RequestTimeout   time.Duration
	SkipGetMe        bool
}

Telegram contains Telegram adapter settings.

type VK

type VK struct {
	Token   string
	GroupID int
	Debug   bool
}

VK contains VK adapter settings.

Jump to

Keyboard shortcuts

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