configs

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	DefaultTaskPageLimit  int `yaml:"defaultTaskPageLimit"`
	SystemSummaryInterval int `yaml:"systemSummaryInterval"`
	SystemSummaryTimeout  int `yaml:"systemSummaryTimeout"`
}

type AuthConfig

type AuthConfig struct {
	Secret string
	Exp    int
}

type Config

type Config struct {
	Env      string
	DB       DBConfig
	Auth     AuthConfig
	Server   ServerConfig
	Data     DataConfig
	Task     TaskConfig
	External ExternalConfig
	App      AppConfig
}

func ReadConfigs

func ReadConfigs(path string) (Config, error)

type DBConfig

type DBConfig struct {
	Driver string
	URI    string
}

type DataConfig

type DataConfig struct {
	Presets PresetsConfig
}

type ExternalConfig

type ExternalConfig struct {
	Telegram TelegramConfig
}

type PresetsConfig

type PresetsConfig struct {
	TaskPresetsPaths []string `yaml:"taskPresetsPaths"`
}

type ServerConfig

type ServerConfig struct {
	Port int
	Host string
}

func (*ServerConfig) GetAddress

func (s *ServerConfig) GetAddress() string

type TaskConfig

type TaskConfig struct {
	DefaultSchedule    string `yaml:"defaultSchedule"`
	DefaultRetryNumber int    `yaml:"defaultRetryNumber"`
	DefaultRetryDelay  string `yaml:"defaultRetryDelay"`
	MaxConcurrency     int    `yaml:"maxConcurrency"`
}

type TelegramConfig

type TelegramConfig struct {
	TelegramTo    int64  `yaml:"telegramTo"`
	TelegramToken string `yaml:"telegramToken"`
}

Jump to

Keyboard shortcuts

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