config

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultUser is the default SSH username
	DefaultUser = "admin"
	// DefaultPort is the default SSH port
	DefaultPort = 22
	// DefaultVolumePath is the default volume path on Synology
	DefaultVolumePath = "/volume1/docker"
	// DefaultNetwork is the default Docker network
	DefaultNetwork = "bridge"
	// ConfigDir is the configuration directory name
	ConfigDir = ".syno-docker"
	// ConfigFile is the configuration file name
	ConfigFile = "config.yaml"
)

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() (string, error)

GetConfigPath returns the path to the configuration file

Types

type Config

type Config struct {
	Host       string `yaml:"host"`
	Port       int    `yaml:"port,omitempty"`
	User       string `yaml:"user"`
	SSHKeyPath string `yaml:"ssh_key_path"`

	Defaults struct {
		VolumePath string `yaml:"volume_path"`
		Network    string `yaml:"network,omitempty"`
	} `yaml:"defaults"`
}

Config represents the syno-docker configuration

func Load

func Load() (*Config, error)

Load loads the configuration from the config file

func New

func New() *Config

New creates a new Config with default values

func (*Config) Save

func (c *Config) Save() error

Save saves the configuration to the config file

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the configuration values

Jump to

Keyboard shortcuts

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