drive

package
v1.2.0-RC2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package drive provides the definitions for the low-level pfs storage drivers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPermissionError added in v1.1.0

func IsPermissionError(err error) bool

IsPermissionError returns true if a given error is a permission error.

Types

type Driver

type Driver interface {
	CreateRepo(repo *pfs.Repo, provenance []*pfs.Repo) error
	InspectRepo(repo *pfs.Repo) (*pfs.RepoInfo, error)
	ListRepo(provenance []*pfs.Repo) ([]*pfs.RepoInfo, error)
	DeleteRepo(repo *pfs.Repo, force bool) error

	StartCommit(parent *pfs.Commit, provenance []*pfs.Commit) (*pfs.Commit, error)
	ForkCommit(parent *pfs.Commit, branch string, provenance []*pfs.Commit) (*pfs.Commit, error)
	FinishCommit(commit *pfs.Commit, cancel bool) error
	// Squash merges the content of fromCommits into toCommit, which should be an // open commit.
	SquashCommit(fromCommits []*pfs.Commit, toCommit *pfs.Commit) error
	// Replay replays fromCommits onto toBranch
	ReplayCommit(fromCommits []*pfs.Commit, toBranch string) ([]*pfs.Commit, error)
	ArchiveCommit(commit []*pfs.Commit) error
	InspectCommit(commit *pfs.Commit) (*pfs.CommitInfo, error)
	ListCommit(fromCommits []*pfs.Commit, provenance []*pfs.Commit, commitType pfs.CommitType, status pfs.CommitStatus, block bool) ([]*pfs.CommitInfo, error)
	FlushCommit(fromCommits []*pfs.Commit, toRepos []*pfs.Repo) ([]*pfs.CommitInfo, error)
	ListBranch(repo *pfs.Repo, status pfs.CommitStatus) ([]string, error)
	DeleteCommit(commit *pfs.Commit) error

	PutFile(file *pfs.File, delimiter pfs.Delimiter, reader io.Reader) error
	MakeDirectory(file *pfs.File) error
	GetFile(file *pfs.File, filterShard *pfs.Shard, offset int64,
		size int64, diffMethod *pfs.DiffMethod) (io.ReadCloser, error)
	InspectFile(file *pfs.File, filterShard *pfs.Shard, diffMethod *pfs.DiffMethod) (*pfs.FileInfo, error)
	ListFile(file *pfs.File, filterShard *pfs.Shard, diffMethod *pfs.DiffMethod, recurse bool) ([]*pfs.FileInfo, error)
	DeleteFile(file *pfs.File) error

	DeleteAll() error
	ArchiveAll() error

	Dump()
}

Driver represents a low-level pfs storage driver.

Jump to

Keyboard shortcuts

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