config

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	FileDirectory      string `yaml:"file_directory"`
	SQLiteDbFile       string `yaml:"store_db"`
	MaxTextMessageSize int    `yaml:"max_text_message_size"`
	MailCheckTimeout   int    `yaml:"mail_check_timeout"`
}

type Config

type Config struct {
	App      App      `yaml:"app"`
	Imap     []Imap   `yaml:"imap"`
	Telegram Telegram `yaml:"telegram"`
}

func NewConfig

func NewConfig(configFile string) (*Config, error)

type Imap

type Imap struct {
	ImapServer string `yaml:"imap_server"`
	Login      string `yaml:"login"`
	Password   string `yaml:"password"`
}

type Telegram

type Telegram struct {
	BotToken string         `yaml:"bot_token"`
	Users    []TelegramUser `yaml:"users"`
}

type TelegramUser

type TelegramUser struct {
	UserId    int64    `yaml:"user_id"`
	ImapLogin []string `yaml:"imap_login"`
}

Jump to

Keyboard shortcuts

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