fs

package
v0.0.0-...-ecdd255 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGitilesConfigFSRoot

func NewGitilesConfigFSRoot(c *cache.Cache, service *gitiles.RepoService, options *GitilesOptions) nodefs.Node

NewGitilesConfigFSRoot returns a root node for a filesystem that lazily instantiates a repository if you access any subdirectory named by a 40-byte hex SHA1.

func NewGitilesRoot

func NewGitilesRoot(c *cache.Cache, tree *gitiles.Tree, service *gitiles.RepoService, options GitilesRevisionOptions) nodefs.Node

NewGitilesRoot returns the root node for a file system.

func NewHostFS

func NewHostFS(cache *cache.Cache, service *gitiles.Service, cloneOptions []CloneOption) (*hostFS, error)

func NewManifestFS

func NewManifestFS(service *gitiles.Service, cache *cache.Cache, opts ManifestOptions) (nodefs.Node, error)

NewManifestFS creates a Manifest FS root node.

func NewMultiManifestFS

func NewMultiManifestFS(service *gitiles.Service, c *cache.Cache, options MultiManifestFSOptions) *multiManifestFSRoot

func ReadConfig

func ReadConfig(contents []byte) (repo []CloneOption, file []CloneOption, err error)

ReadConfig reads a JSON file containing clone options

Types

type CloneOption

type CloneOption struct {
	RE    *regexp.Regexp
	Clone bool
}

CloneOption configures for which files we should trigger a git clone.

type GitilesOptions

type GitilesOptions struct {
	// If set, clone the repo on reads from here.
	CloneURL string

	// List of filename options. We use the first matching option
	CloneOption []CloneOption
}

GitilesOptions sets options for NewGitilesConfigRoot.

type GitilesRevisionOptions

type GitilesRevisionOptions struct {
	Revision string

	GitilesOptions
}

GitilesOptions configures the Gitiles filesystem (ie. Gitiles backed FS) at a certain revision.

type ManifestOptions

type ManifestOptions struct {
	Manifest *manifest.Manifest

	// RepoCloneOption matches against the Path field of the
	// repository within a manifest.
	RepoCloneOption []CloneOption
	FileCloneOption []CloneOption
}

ManifestOptions holds options for a Manifest file system.

type MultiFSOptions

type MultiFSOptions struct {
	// RepoCloneOption matches against the Path field of the
	// repository within a manifest.
	RepoCloneOption []CloneOption
	FileCloneOption []CloneOption
}

MultiFSOptions holds cloning options for a set of Git repos.

type MultiManifestFSOptions

type MultiManifestFSOptions struct {
	// ManifestDir stores configured manifest files.
	ManifestDir string

	MultiFSOptions
}

MultiManifestFSOptions holds options for a file system with multiple manifests.

Jump to

Keyboard shortcuts

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