config

package
v1.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: Apache-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 {
	Telegram TelegramConfig `yaml:":telegram"`
	XMPP     XMPPConfig     `yaml:":xmpp"`
}

Config is for top-level struct for config

func ReadConfig

func ReadConfig(path string, schemaPath string) (Config, error)

ReadConfig reads the specified config file, validates it and returns a struct

type TelegramConfig

type TelegramConfig struct {
	Loglevel  string                `yaml:":loglevel"`
	Content   TelegramContentConfig `yaml:":content"`
	Verbosity uint8                 `yaml:":tdlib_verbosity"`
	Tdlib     TelegramTdlibConfig   `yaml:":tdlib"`
}

TelegramConfig is for :telegram: subtree

type TelegramContentConfig

type TelegramContentConfig struct {
	Path   string `yaml:":path"`
	Link   string `yaml:":link"`
	Upload string `yaml:":upload"`
	User   string `yaml:":user"`
	Quota  string `yaml:":quota"`
}

TelegramContentConfig is for :content: subtree

type TelegramTdlibClientConfig

type TelegramTdlibClientConfig struct {
	APIID               string `yaml:":api_id"`
	APIHash             string `yaml:":api_hash"`
	DeviceModel         string `yaml:":device_model"`
	ApplicationVersion  string `yaml:":application_version"`
	UseChatInfoDatabase bool   `yaml:":use_chat_info_database"`
	UseSecretChats      bool   `yaml:":use_secret_chats"`
	CatchTimeout        int64  `yaml:":catch_timeout"`
}

TelegramTdlibClientConfig is for :client: subtree

type TelegramTdlibConfig

type TelegramTdlibConfig struct {
	Datadir string                    `yaml:":datadir"`
	Client  TelegramTdlibClientConfig `yaml:":client"`
}

TelegramTdlibConfig is for :tdlib: subtree

type XMPPConfig

type XMPPConfig struct {
	Loglevel string `yaml:":loglevel"`
	Jid      string `yaml:":jid"`
	Host     string `yaml:":host"`
	Port     string `yaml:":port"`
	Password string `yaml:":password"`
	Db       string `yaml:":db"`
}

XMPPConfig is for :xmpp: subtree

Jump to

Keyboard shortcuts

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