vfsutils

package
v0.10.19 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CodeMountingError = func(err error) error {
		return errors.Wrapf(err, "error mounting code")
	}

	ReadFileError = func(err error, path string) error {
		return errors.Wrapf(err, "error reading file %s", path)
	}

	ListFilesError = func(err error, path string) error {
		return errors.Wrapf(err, "error listing files of %s", path)
	}

	InvalidDefinitionError = func(msg string) error {
		return errors.New(msg)
	}
)

Functions

func MountCode

func MountCode(fs afero.Fs, ctx context.Context, client *github.Client, owner, repo, ref string) (dir string, err error)

func MountTar

func MountTar(fs afero.Fs, tarUrl string) (dir string, err error)

Types

type MountedRepo

type MountedRepo interface {
	GetOwner() string
	GetRepo() string
	GetSha() string
	GetFileContents(ctx context.Context, path string) ([]byte, error)
	ListFiles(ctx context.Context, path string) ([]os.FileInfo, error)
}

func NewLazilyMountedRepo

func NewLazilyMountedRepo(client *github.Client, owner, repo, sha string) MountedRepo

func NewLocalMountedRepoForFs added in v0.10.16

func NewLocalMountedRepoForFs(fs afero.Fs, repoRootPath, owner, repo string) (MountedRepo, error)

Creates a mounted repo for a local filesystem

Jump to

Keyboard shortcuts

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