cli

package
v0.0.0-...-acc130e Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() map[string]any

DefaultConfig returns the default configuration.

func Execute

func Execute(version string) error

Execute runs the CLI with the given version string.

Types

type BuildInfo

type BuildInfo struct {
	Version   string
	GoVersion string
	OS        string
	Arch      string
	Commit    string
	BuildTime string
}

BuildInfo holds version and build information.

func GetBuildInfo

func GetBuildInfo(version string) BuildInfo

GetBuildInfo returns the current build information.

type DiffEntry

type DiffEntry struct {
	Repo       string `json:"repo"`
	Type       string `json:"type"`
	Status     string `json:"status"` // "missing", "outdated", "extra"
	LocalSize  int64  `json:"local_size,omitempty"`
	RemoteSize int64  `json:"remote_size,omitempty"`
}

DiffEntry represents a difference between source and target.

type ListEntry

type ListEntry struct {
	Type       string `json:"type"`
	Repo       string `json:"repo"`
	Branch     string `json:"branch"`
	Commit     string `json:"commit"`
	Files      int    `json:"files"`
	Size       int64  `json:"size"`
	SizeHuman  string `json:"size_human"`
	Downloaded string `json:"downloaded"`
	Path       string `json:"path"`
}

ListEntry represents a single repo in the list output.

type RepoFileInfo

type RepoFileInfo struct {
	Name      string `json:"name"`
	Size      int64  `json:"size"`
	SizeHuman string `json:"size_human"`
	LFS       bool   `json:"lfs"`
	BlobPath  string `json:"blob_path"`
}

RepoFileInfo represents a file in the repo.

type RepoInfo

type RepoInfo struct {
	Type           string         `json:"type"`
	Repo           string         `json:"repo"`
	Branch         string         `json:"branch"`
	Commit         string         `json:"commit"`
	TotalFiles     int            `json:"total_files"`
	TotalSize      int64          `json:"total_size"`
	TotalSizeHuman string         `json:"total_size_human"`
	StartedAt      string         `json:"started_at"`
	CompletedAt    string         `json:"completed_at"`
	Command        string         `json:"command"`
	FriendlyPath   string         `json:"friendly_path"`
	CachePath      string         `json:"cache_path"`
	Files          []RepoFileInfo `json:"files"`
}

RepoInfo represents detailed info about a downloaded repo.

type RepoIntegrity

type RepoIntegrity struct {
	Complete     bool     `json:"complete"`
	HasRefs      bool     `json:"has_refs"`
	HasBlobs     bool     `json:"has_blobs"`
	HasSnapshots bool     `json:"has_snapshots"`
	BlobCount    int      `json:"blob_count"`
	MissingBlobs []string `json:"missing_blobs,omitempty"`
	Errors       []string `json:"errors,omitempty"`
}

RepoIntegrity represents the integrity status of a repo.

type RootOpts

type RootOpts struct {
	Token    string
	JSONOut  bool
	Quiet    bool
	Verbose  bool
	Config   string
	LogFile  string
	LogLevel string
}

RootOpts holds global CLI options.

type SyncOutput

type SyncOutput struct {
	ReposScanned    int      `json:"repos_scanned"`
	SymlinksCreated int      `json:"symlinks_created"`
	SymlinksUpdated int      `json:"symlinks_updated"`
	OrphansRemoved  int      `json:"orphans_removed,omitempty"`
	Errors          []string `json:"errors,omitempty"`
}

SyncOutput is the JSON output format for sync results.

Jump to

Keyboard shortcuts

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