Documentation
¶
Index ¶
- func ConfigFile() string
- func GistInventoryFile() string
- func LockFile() string
- func LogFile() string
- func MirrorsStateFile() string
- func ReadConfig(cfg *Config) error
- func ReadToken() (string, error)
- func RepositoryInventoryFile() string
- func StateDir() string
- func TempDir() string
- func TokenFile() string
- func Write(path string, cfg Config) error
- type Config
- type GitHubConfig
- type HealthConfig
- type SnapshotConfig
- type StorageConfig
- type SyncConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigFile ¶ added in v0.5.0
func ConfigFile() string
func GistInventoryFile ¶ added in v0.5.0
func GistInventoryFile() string
func MirrorsStateFile ¶ added in v0.5.0
func MirrorsStateFile() string
func ReadConfig ¶ added in v0.4.7
func RepositoryInventoryFile ¶ added in v0.5.0
func RepositoryInventoryFile() string
Types ¶
type Config ¶
type Config struct {
GitHub GitHubConfig
Storage StorageConfig
Sync SyncConfig
Snapshot SnapshotConfig
Health HealthConfig
}
func (*Config) EnsureRuntimeDirectories ¶ added in v0.5.0
EnsureRuntimeDirectories creates all runtime directories required by GitBack.
Missing directories are treated as a recoverable condition. This allows commands such as:
gitback sync
to work even if:
~/.local/share/gitback/mirrors ~/.local/share/gitback/state ~/.local/share/gitback/tmp ~/.local/share/gitback/snapshots
were accidentally removed.
type GitHubConfig ¶ added in v0.5.0
type GitHubConfig struct {
BackupGists bool `mapstructure:"backup_gists"`
}
type HealthConfig ¶ added in v0.5.0
type HealthConfig struct {
MinimumFreeDiskPercent int `mapstructure:"minimum_free_disk_percent"`
}
type SnapshotConfig ¶ added in v0.5.0
type StorageConfig ¶ added in v0.5.0
type StorageConfig struct {
MirrorRoot string `mapstructure:"mirror_root"`
}
type SyncConfig ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.