config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

ConfigDir returns the config directory path.

func ConfigPath

func ConfigPath() string

ConfigPath returns the config file path.

func Save

func Save(cfg *Config) error

Save writes the config to disk.

Types

type Config

type Config struct {
	SyncDir      string                  `yaml:"sync_dir"`
	Destinations []Destination           `yaml:"destinations"`
	Devices      map[string]DeviceConfig `yaml:"devices,omitempty"`
	MediaPaths   []string                `yaml:"media_paths"`
	AdbPath      string                  `yaml:"adb_path,omitempty"`
	RclonePath   string                  `yaml:"rclone_path,omitempty"`
}

Config is the top-level configuration.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a config with sensible defaults.

func Load

func Load() (*Config, error)

Load reads the config file, returning defaults if it doesn't exist.

func (*Config) ExpandSyncDir

func (c *Config) ExpandSyncDir() string

ExpandSyncDir expands ~ in the sync dir path.

type Destination

type Destination struct {
	Name         string `yaml:"name"`
	RcloneRemote string `yaml:"rclone_remote"`
}

Destination represents an rclone sync destination.

type DeviceConfig

type DeviceConfig struct {
	Nickname string `yaml:"nickname,omitempty"`
	WiFiIP   string `yaml:"wifi_ip,omitempty"`
}

DeviceConfig stores per-device settings.

Jump to

Keyboard shortcuts

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