conf

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Backup = Mode("backup")
View Source
const Restore = Mode("restore")
View Source
const Store = Mode("store")
View Source
const UnStore = Mode("unstore")
View Source
const Unknown = Mode("unknown")

Variables

View Source
var Debug bool

Functions

func Generate

func Generate(target io.Writer)

Types

type ConfigYAML

type ConfigYAML struct {
	Mode              string             `yaml:"mode"`
	StoreFile         string             `yaml:"storeFile"`
	Services          ServiceYAML        `yaml:"services"`
	Net               NetYAML            `yaml:"net"`
	Security          SecurityYAML       `yaml:"security"`
	ExcludeProtection ExcludeProtectYAML `yaml:"excludeProtection"`
	TriggerReboot     bool               `yaml:"triggerReboot"`
	RebootCommand     []string           `yaml:"rebootCommand"`
	RSyncCommand      []string           `yaml:"rsyncCommand"`
	TarCommand        []string           `yaml:"tarCommand"`
	UnTarCommand      []string           `yaml:"unTarCommand"`
	TarBufferSize     uint32             `yaml:"tarBufferSize"`
}

func (ConfigYAML) GetMode

func (c ConfigYAML) GetMode() Mode

func (ConfigYAML) GetStoreFile

func (c ConfigYAML) GetStoreFile() string

func (ConfigYAML) GetTarBufferSize

func (c ConfigYAML) GetTarBufferSize() uint32

type ExcludeProtectYAML

type ExcludeProtectYAML struct {
	ProtectCommand    []string `yaml:"protectCommand"`
	UnProtectCommand  []string `yaml:"unProtectCommand"`
	StdOutBuffStdInOn bool     `yaml:"stdOutBuffStdInOn"`
}

type Mode

type Mode string

func ModeFromInt

func ModeFromInt(i int) Mode

func (Mode) ToInt

func (m Mode) ToInt() int

type NetYAML

type NetYAML struct {
	TargetAddr         string        `yaml:"targetAddress"`
	TargetPort         uint16        `yaml:"targetPort"`
	TargetExpectedName string        `yaml:"targetExpectedName"`
	ListeningAddr      string        `yaml:"listeningAddress"`
	ListeningPort      uint16        `yaml:"listeningPort"`
	RemoteAllowedNames []string      `yaml:"remoteAllowedNames"`
	ProxyLocalAddr     string        `yaml:"rsyncLocalAddr"`
	ProxyLocalPort     uint16        `yaml:"rsyncLocalPort"`
	ProxyBufferSize    uint32        `yaml:"proxyBufferSize"`
	KeepAliveTime      time.Duration `yaml:"keepAliveTime"`
}

func (NetYAML) GetProxyBufferSize

func (c NetYAML) GetProxyBufferSize() uint32

func (NetYAML) GetProxyLocalAddr

func (c NetYAML) GetProxyLocalAddr() string

func (NetYAML) GetProxyLocalPort

func (c NetYAML) GetProxyLocalPort() uint16

func (NetYAML) GetTargetExpectedName

func (c NetYAML) GetTargetExpectedName() string

type SecurityYAML

type SecurityYAML struct {
	PublicCert    string `yaml:"publicCert"`
	PrivateKey    string `yaml:"privateKey"`
	CACert        string `yaml:"caCert"`
	CACertDir     string `yaml:"caCertDirectory"`
	RSyncPassword string `yaml:"rsyncPassword"`
	NoSystemCerts bool   `yaml:"noSystemCerts"`
}

func (SecurityYAML) GetCert

func (c SecurityYAML) GetCert() *tls.Certificate

func (SecurityYAML) GetCertPool

func (c SecurityYAML) GetCertPool() *x509.CertPool

type ServiceYAML

type ServiceYAML struct {
	List          []string `yaml:"list"`
	Stop          bool     `yaml:"stop"`
	Restore       bool     `yaml:"restore"`
	StartNew      bool     `yaml:"startNew"`
	ReloadCommand []string `yaml:"reloadCommand"`
	StopCommand   []string `yaml:"stopCommand"`
	StartCommand  []string `yaml:"startCommand"`
	StatusCommand []string `yaml:"statusCommand"`
	ManageRSync   bool     `yaml:"manageRSync"`
}

Jump to

Keyboard shortcuts

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