Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
GitHub GitHubConfig
Storage StorageConfig
Sync SyncConfig
Snapshot SnapshotConfig
Health HealthConfig
}
func Default ¶
Default returns the default configuration, given a resolved Layout so that default mirror/snapshot paths sit alongside GitBack's other data.
func Load ¶
Load reads and validates configuration using the given Layout to locate config.toml. It never falls back to defaults — a missing config file is a hard error, since GitBack shouldn't silently run on unconfigured defaults. Run `gitback init` to create one.
func (Config) GistMirrorRoot ¶ added in v0.5.4
func (Config) QuarantineDir ¶ added in v0.5.4
func (Config) RepositoryMirrorRoot ¶ added in v0.5.4
RepositoryMirrorRoot, GistMirrorRoot, and QuarantineDir are DERIVED from the user-configured MirrorRoot.
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 uint8 `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.