config

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 7 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 {
	Worker      WorkerConfig      `mapstructure:"worker"`
	QBittorrent QBittorrentConfig `mapstructure:"qbittorrent"`
	Transfer    TransferConfig    `mapstructure:"transfer"`
	Pesto       PestoConfig       `mapstructure:"pesto"`
	GoNZB       GoNZBConfig       `mapstructure:"gonzb"`
}

func Load

func Load(filename string) (*Config, error)

func (*Config) GoNZBTimeout

func (c *Config) GoNZBTimeout() time.Duration

func (*Config) PollInterval

func (c *Config) PollInterval() time.Duration

func (*Config) QBittorrentTimeout

func (c *Config) QBittorrentTimeout() time.Duration

func (*Config) Validate

func (c *Config) Validate() error

type GoNZBConfig

type GoNZBConfig struct {
	URL         string `mapstructure:"url"`
	APIToken    string `mapstructure:"api_token"`
	TimeoutSecs int    `mapstructure:"timeout_seconds"`
}

type PestoConfig

type PestoConfig struct {
	Binary      string   `mapstructure:"binary"`
	ConfigPath  string   `mapstructure:"config_path"`
	Compression string   `mapstructure:"compression"`
	Encryption  bool     `mapstructure:"encryption"`
	Obfuscation string   `mapstructure:"obfuscation"`
	PAR2Percent int      `mapstructure:"par2_percent"`
	ExtraArgs   []string `mapstructure:"extra_args"`
}

type QBittorrentConfig

type QBittorrentConfig struct {
	URL               string `mapstructure:"url"`
	Username          string `mapstructure:"username"`
	Password          string `mapstructure:"password"`
	HTTPBasicUsername string `mapstructure:"http_basic_username"`
	HTTPBasicPassword string `mapstructure:"http_basic_password"`
	CandidateTag      string `mapstructure:"candidate_tag"`
	TimeoutSecs       int    `mapstructure:"timeout_seconds"`
}

type TransferConfig

type TransferConfig struct {
	Type          string   `mapstructure:"type"`
	RsyncBinary   string   `mapstructure:"rsync_binary"`
	SSHFSBinary   string   `mapstructure:"sshfs_binary"`
	UnmountBinary string   `mapstructure:"unmount_binary"`
	SSHHost       string   `mapstructure:"ssh_host"`
	SSHUser       string   `mapstructure:"ssh_user"`
	SSHPort       int      `mapstructure:"ssh_port"`
	SSHKey        string   `mapstructure:"ssh_key"`
	SourceRoot    string   `mapstructure:"source_root"`
	MountPath     string   `mapstructure:"mount_path"`
	ManageMount   bool     `mapstructure:"manage_mount"`
	UnmountOnExit bool     `mapstructure:"unmount_on_exit"`
	ExtraArgs     []string `mapstructure:"extra_args"`
	SSHFSOptions  []string `mapstructure:"sshfs_options"`
}

type WorkerConfig

type WorkerConfig struct {
	DataDir             string  `mapstructure:"data_dir"`
	NodeID              string  `mapstructure:"node_id"`
	PollIntervalSeconds int     `mapstructure:"poll_interval_seconds"`
	MinFreeSpaceGB      float64 `mapstructure:"min_free_space_gb"`
	WorkspaceMultiplier float64 `mapstructure:"workspace_multiplier"`
	CleanupOnSuccess    bool    `mapstructure:"cleanup_on_success"`
}

Jump to

Keyboard shortcuts

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