Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
ConfigDir string
ConfigFile string
DataDir string
StateDir string
LogDir string
LogFile string
TokenFile string
LockFile string
TempDir string
MirrorsStateFile string
RepositoryInventoryFile string
GistInventoryFile string
}
Layout is the complete, fixed filesystem geography for GitBack. None of these paths are user-configurable — they exist regardless of what a user puts in config.toml. Anything a user CAN configure (mirror root, snapshot output dir, workers, etc.) lives in config.Config instead.
func NewWithRoot ¶
NewWithRoot builds a Layout rooted under a custom directory instead of the real $HOME. Intended for tests: pass t.TempDir().
func (Layout) EnsureDirs ¶
EnsureDirs creates every directory this Layout needs. Missing directories are treated as recoverable — commands like `gitback sync` should work again even if state/gitback dirs were deleted out from under GitBack.
Click to show internal directories.
Click to hide internal directories.