conf

package
v0.0.0-...-6a448fc Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 1 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 {
	WebConfig        *WebConfig        `yaml:"web"`
	DBConfig         *DBConfig         `yaml:"db"`
	SubscriberConfig *SubscriberConfig `yaml:"subscriber"`
}

func ReadConfig

func ReadConfig(content []byte) (*Config, error)

type DBConfig

type DBConfig struct {
	DSN    string     `yaml:"dsn"`
	Driver DriverType `yaml:"driver"`
}

type DownloaderConfig

type DownloaderConfig struct {
	Enable                  bool         `yaml:"enable"`
	ProxyConfig             *ProxyConfig `yaml:"proxy"`
	BasePath                string       `yaml:"base_path"`
	YtDlpLink               string       `yaml:"yt_dlp_link"`
	DownloadIntervalSeconds int          `yaml:"download_interval_seconds"`
}

type DriverType

type DriverType string
const (
	MySQLDriver  DriverType = "mysql"
	SQLiteDriver DriverType = "sqlite"
)

type FetcherConfig

type FetcherConfig struct {
	Enable                bool         `yaml:"enable"`
	ProxyConfig           *ProxyConfig `yaml:"proxy"`
	FetcheIntervalSeconds int          `yaml:"fetch_interval_seconds"`
}

type ProxyConfig

type ProxyConfig struct {
	Proxies []string `yaml:"proxies"`
}

type SubscriberConfig

type SubscriberConfig struct {
	FetcherConfig    *FetcherConfig    `yaml:"fetcher"`
	DownloaderConfig *DownloaderConfig `yaml:"downloader"`
}

type WebConfig

type WebConfig struct {
	Port int    `yaml:"port"`
	Host string `yaml:"host"`
}

Jump to

Keyboard shortcuts

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