Documentation ¶
Index ¶
- Constants
- func Ask(param *string, query string, hide bool) error
- func SetDefaultConfigValues(cfg *Config) error
- type Backup
- type BackupConfig
- type Config
- type DotFiler
- type DotFilesConfig
- type Proxy
- type ProxyConfig
- type ProxyForwardConfig
- type ProxyForwardType
- type ReposConfig
- type Rsync
- type Sync
- type SyncConfig
- type SyncInfo
- type Updater
Constants ¶
const ( // DefaultProxyPort is default ssh port DefaultProxyPort int = 22 // LocalForward is local forwarding LocalForward ProxyForwardType = "local" // RemoteForward is remote forwarding RemoteForward ProxyForwardType = "remote" // DynamicForward is dynamic forwarding DynamicForward ProxyForwardType = "dynamic" )
Variables ¶
This section is empty.
Functions ¶
func SetDefaultConfigValues ¶
SetDefaultConfigValues set default values if omitted
Types ¶
type Backup ¶
type Backup struct {
// contains filtered or unexported fields
}
Backup is client for backup
type BackupConfig ¶
type BackupConfig struct { Destinations []string `yaml:"destinations"` Includes []string `yaml:"includes"` Excludes []string `yaml:"excludes,omitempty"` BackupPrefix string `yaml:"prefix,omitempty"` }
BackupConfig is backup: config
type Config ¶
type Config struct { Sync SyncConfig `yaml:"sync,omitempty"` Backup BackupConfig `yaml:"backup,omitempty"` Repos ReposConfig `yaml:"repos,omitempty"` DotFiles DotFilesConfig `yaml:"dotfiles,omitempty"` Proxy []ProxyConfig `yaml:"proxy,omitempty"` }
type DotFiler ¶
type DotFiler struct {
// contains filtered or unexported fields
}
DotFiler is client for dotfiles management
func NewDotFiler ¶
func NewDotFiler(cfg *DotFilesConfig) (*DotFiler, error)
NewDotFiler returns DotFiler with given home directory
func (*DotFiler) MakeSymlinks ¶
MakeSymlinks makes symlinks to the home directory
type DotFilesConfig ¶
type DotFilesConfig struct { Dir string `yaml:"dir,omitempty"` Hosts []string `yaml:"hosts"` Files []string `yaml:"files"` }
DotFilesConfig is dotfiles: config
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
Proxy is client for proxy
type ProxyConfig ¶
type ProxyConfig struct { Name string `yaml:"name"` User string `yaml:"user,omitempty"` Address string `yaml:"address"` Port int `yaml:"port,omitempty"` PrivateKey string `yaml:"private_key"` Forward []ProxyForwardConfig `yaml:"forward"` }
ProxyConfig is proxy: config
type ProxyForwardConfig ¶
type ProxyForwardConfig struct { Type ProxyForwardType `yaml:"type"` BindAddress string `yaml:"bind_address,omitempty"` BindPort int `yaml:"bind_port"` RemoteAddress string `yaml:"remote_address,omitempty"` RemotePort int `yaml:"remote_port,omitempty"` }
ProxyForwardConfig is forward: config in proxy;
type ReposConfig ¶
type ReposConfig struct {
Root string `yaml:"root"`
}
ReposConfig is repos: config
type Rsync ¶
type Rsync interface { // Do runs rsync command Do(ctx context.Context) error // contains filtered or unexported methods }
Rsync is rsync interface
func NewBackup ¶
func NewBackup(cfg *BackupConfig, rsyncFlags string) Rsync
NewBackup returns Syncer
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
Sync is client for sync pull
type SyncConfig ¶
type SyncConfig struct { Pull []SyncInfo `yaml:"pull,omitempty"` Push []SyncInfo `yaml:"push,omitempty"` }
SyncConfig is sync: config
type SyncInfo ¶
type SyncInfo struct { Name string `yaml:"name"` Source string `yaml:"source"` Destination string `yaml:"destination"` Excludes []string `yaml:"excludes,omitempty"` DisableSudo bool `yaml:"disable_sudo,omitempty"` }
SyncInfo is path information for synchronize directories
type Updater ¶
type Updater struct {
// contains filtered or unexported fields
}
Updater is client for repos update
func NewUpdater ¶
NewUpdater returns Updater with given root directory
func (*Updater) FindRepositories ¶
FindRepositories traverses given directory and return git repositories