git

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

type Resolver struct {
	URL               string
	Branch            string
	SHA               string
	OperatorDirectory string
	// contains filtered or unexported fields
}

Resolver resolves operator packages from a Git repository.

func NewResolver

func NewResolver(url, branch, sha string, operatorDirectory string) Resolver

NewResolver creates a new Resolver for a Git repository at the specified URL.

func (Resolver) Resolve

func (r Resolver) Resolve(ctx context.Context) (afero.Fs, func() error, error)

Resolve clones a specific branch of a git repository and returns a file system pointing at the operator directory. The repository is cloned into a temporary directory. Callers are responsible for removing this directory by running the returned remover function.

Jump to

Keyboard shortcuts

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