gitrepo

package
v0.2.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteSourceRepoURLs

func WriteSourceRepoURLs(path, repoRoot string) error

WriteSourceRepoURLs writes source-repo aliases for a materialized tree. This lets archived git revision snapshots resolve self-referential GitRepository URLs.

func WriteSourceRepoURLsContext

func WriteSourceRepoURLsContext(ctx context.Context, path, repoRoot string) error

WriteSourceRepoURLsContext writes source aliases while honoring cancellation during Git discovery. Like WriteSourceRepoURLs, non-Git paths have no aliases.

Types

type Expander

type Expander struct {
	// contains filtered or unexported fields
}

Expander discovers GitRepository resources, clones external repos to temp directories, and makes their paths available for the expansion loop.

func NewExpander

func NewExpander(log logr.Logger) (*Expander, error)

NewExpander creates a GitRepository expander. Close must be called when done to remove cloned repositories.

func NewLocalExpander

func NewLocalExpander(root string, log logr.Logger) *Expander

NewLocalExpander resolves only local sources, without allocating a clone directory.

func (*Expander) Cleanup

func (e *Expander) Cleanup()

Cleanup removes all cloned repositories.

func (*Expander) Close

func (e *Expander) Close() error

Close removes cloned repositories once, after all rendering has stopped.

func (*Expander) Expand

Expand implements expander.Expander.

func (*Expander) ResolvePath

func (e *Expander) ResolvePath(namespace, name string) (string, bool)

ResolvePath returns the local filesystem path for a GitRepository source. Returns ("", false) if the repository hasn't been cloned.

func (*Expander) SetLocalOnly

func (e *Expander) SetLocalOnly()

SetLocalOnly disables cloning and scopes local sources to the current root.

func (*Expander) WithSourceRoot

func (e *Expander) WithSourceRoot(path string) *Expander

WithSourceRoot returns a copy of the expander scoped to one source root. External clones remain shared, while local path aliases are per invocation.

Jump to

Keyboard shortcuts

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