runtime

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

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 New

func New() (Layout, error)

New resolves Layout from the OS home directory (XDG-style conventions).

func NewWithRoot

func NewWithRoot(root string) Layout

NewWithRoot builds a Layout rooted under a custom directory instead of the real $HOME. Intended for tests: pass t.TempDir().

func (Layout) EnsureDirs

func (l Layout) EnsureDirs() error

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.

Jump to

Keyboard shortcuts

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