config

package
v0.0.0-...-84c8b29 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

config handles the configuration of the program.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TelegramBot struct {
		Token    string `yaml:"token" envconfig:"BOT_TOKEN"`
		AdminIDs string `yaml:"admin_ids" envconfig:"BOT_ADMINIDS"`
	} `yaml:"telegram-bot"`
	Rclone struct {
		BaseURL  string `yaml:"host" envconfig:"RCLONE_HOST"`
		User     string `yaml:"user" envconfig:"RCLONE_USER"`
		Password string `yaml:"password" envconfig:"RCLONE_PASSWORD"`
	} `yaml:"rclone"`
	TempPath struct {
		Download string `yaml:"download" envconfig:"TEMP_DOWNLOAD_DIR_ROOT"`
	} `yaml:"temp-path"`
}

Config is the configuration of the program.

func (*Config) ReadAll

func (cfg *Config) ReadAll()

ReadAll reads the config file and the environment variables.

func (*Config) ReadEnv

func (cfg *Config) ReadEnv()

ReadEnv reads the environment variables.

func (*Config) ReadFile

func (cfg *Config) ReadFile()

ReadFile reads the config file.

func (*Config) WriteFile

func (cfg *Config) WriteFile()

WriteFile writes the config file.

Jump to

Keyboard shortcuts

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