Documentation ¶
Index ¶
- Constants
- Variables
- func IsAmbiguousCommitErr(err error) bool
- func IsBaseCommitNotFinishedErr(err error) bool
- func IsBranchNotFoundErr(err error) bool
- func IsCommitDeletedErr(err error) bool
- func IsCommitErrorErr(err error) bool
- func IsCommitFinishedErr(err error) bool
- func IsCommitNotFinishedErr(err error) bool
- func IsCommitNotFoundErr(err error) bool
- func IsCommitOnOutputBranchErr(err error) bool
- func IsCommitSetNotFoundErr(err error) bool
- func IsDropWithChildrenErr(err error) bool
- func IsFileNotFoundErr(err error) bool
- func IsInconsistentCommitErr(err error) bool
- func IsInvalidBranchStructureErr(err error) bool
- func IsOutputCommitNotFinishedErr(err error) bool
- func IsRepoExistsErr(err error) bool
- func IsRepoNotFoundErr(err error) bool
- func IsSquashWithSuvenanceErr(err error) bool
- func IsSquashWithoutChildrenErr(err error) bool
- func ValidateSQLDatabaseEgress(sql *pfs.SQLDatabaseEgress) error
- type APIServer
- type ErrBaseCommitNotFinished
- type ErrBranchExists
- type ErrBranchNotFound
- type ErrCommitDeleted
- type ErrCommitError
- type ErrCommitExists
- type ErrCommitFinished
- type ErrCommitNotFinished
- type ErrCommitNotFound
- type ErrCommitOnOutputBranch
- type ErrCommitSetNotFound
- type ErrDropWithChildren
- type ErrFileNotFound
- type ErrInconsistentCommit
- type ErrInvalidProvenanceStructure
- type ErrOutputCommitNotFinished
- type ErrParentCommitNotFound
- type ErrProjectExists
- type ErrProjectNotFound
- type ErrRepoExists
- type ErrRepoNotFound
- type ErrSquashWithSubvenance
- type ErrSquashWithoutChildren
Constants ¶
const GetFileTARSuggestion = "Use GetFileTAR instead"
Variables ¶
var ( ErrMatchedNonFile = fmt.Errorf("cannot get directory or non-regular file. %s", GetFileTARSuggestion) ErrMatchedMultipleFiles = fmt.Errorf("matched multiple files. %s", GetFileTARSuggestion) )
Functions ¶
func IsAmbiguousCommitErr ¶
IsAmbiguousCommitErr returns true if the err is due to attempting to resolve a commit without specifying a branch when it is required to uniquely identify the commit.
func IsBranchNotFoundErr ¶
IsBranchNotFoundErr returns true if 'err' is an error message about a branch not being found
func IsCommitDeletedErr ¶
IsCommitDeletedErr returns true if 'err' has an error message that matches ErrCommitDeleted
func IsCommitErrorErr ¶
IsCommitError returns true of 'err' has an error message that matches ErrCommitError
func IsCommitFinishedErr ¶
IsCommitFinishedErr returns true of 'err' has an error message that matches ErrCommitFinished
func IsCommitNotFinishedErr ¶
IsCommitNotFinishedErr returns true if the err is due to an attempt at performing an operation that only applies to finished commits on an unfinished commit.
func IsCommitNotFoundErr ¶
IsCommitNotFoundErr returns true if 'err' has an error message that matches ErrCommitNotFound
func IsCommitOnOutputBranchErr ¶
IsCommitOnOutputBranchErr returns true if the err is due to an attempt to start a commit on an output branch.
func IsCommitSetNotFoundErr ¶
IsCommitSetNotFoundErr returns true if 'err' has an error message that matches ErrCommitSetNotFound
func IsDropWithChildrenErr ¶
func IsFileNotFoundErr ¶
IsFileNotFoundErr returns true if 'err' is an error message about a PFS file not being found
func IsInconsistentCommitErr ¶
IsInconsistentCommitErr returns true if the err is due to an attempt to have multiple commits in a single branch within a transaction.
func IsOutputCommitNotFinishedErr ¶
IsOutputCommitNotFinishedErr returns true if the err is due to an operation that cannot be performed on an unfinished output commit
func IsRepoExistsErr ¶
IsRepoExistsErr returns true if 'err' is an error message about a repo existing
func IsRepoNotFoundErr ¶
IsRepoNotFoundErr returns true if 'err' is an error message about a repo not being found
func ValidateSQLDatabaseEgress ¶
func ValidateSQLDatabaseEgress(sql *pfs.SQLDatabaseEgress) error
Types ¶
type APIServer ¶
type APIServer interface { pfs_client.APIServer NewPropagater(*txncontext.TransactionContext) txncontext.PfsPropagater CreateRepoInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.CreateRepoRequest) error InspectRepoInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.InspectRepoRequest) (*pfs_client.RepoInfo, error) DeleteRepoInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.DeleteRepoRequest) (bool, error) DeleteReposInTransaction(context.Context, *txncontext.TransactionContext, []*pfs_client.Repo, bool) error StartCommitInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.StartCommitRequest) (*pfs_client.Commit, error) FinishCommitInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.FinishCommitRequest) error InspectCommitInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.InspectCommitRequest) (*pfs_client.CommitInfo, error) InspectCommitSetInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.CommitSet, bool) ([]*pfs_client.CommitInfo, error) SquashCommitSetInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.SquashCommitSetRequest) error CreateBranchInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.CreateBranchRequest) error InspectBranchInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.InspectBranchRequest) (*pfs_client.BranchInfo, error) DeleteBranchInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.DeleteBranchRequest) error AddFileSetInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.AddFileSetRequest) error ActivateAuthInTransaction(context.Context, *txncontext.TransactionContext, *pfs_client.ActivateAuthRequest) (*pfs_client.ActivateAuthResponse, error) }
APIServer is the internal interface for other services to call this one. This includes all the public RPC methods and additional internal-only methods for use within pachd. These methods *do not* check that a user is authorized unless otherwise noted.
type ErrBaseCommitNotFinished ¶
ErrBaseCommitNotFinished represents an error where a base commit has not been finished.
func (ErrBaseCommitNotFinished) Error ¶
func (e ErrBaseCommitNotFinished) Error() string
type ErrBranchExists ¶
ErrBranchExists represents a branch-exists error.
func (ErrBranchExists) Error ¶
func (e ErrBranchExists) Error() string
func (ErrBranchExists) GRPCStatus ¶
func (e ErrBranchExists) GRPCStatus() *status.Status
type ErrBranchNotFound ¶
ErrBranchNotFound represents a branch-not-found error.
func (ErrBranchNotFound) Error ¶
func (e ErrBranchNotFound) Error() string
func (ErrBranchNotFound) GRPCStatus ¶
func (e ErrBranchNotFound) GRPCStatus() *status.Status
type ErrCommitDeleted ¶
ErrCommitDeleted represents an error where the commit has been deleted (e.g. from InspectCommit)
func (ErrCommitDeleted) Error ¶
func (e ErrCommitDeleted) Error() string
type ErrCommitError ¶
ErrCommitError represents an error where the commit has been finished with an error.
func (ErrCommitError) Error ¶
func (e ErrCommitError) Error() string
type ErrCommitExists ¶
ErrCommitExists represents an error where the commit already exists.
func (ErrCommitExists) Error ¶
func (e ErrCommitExists) Error() string
func (ErrCommitExists) GRPCStatus ¶
func (e ErrCommitExists) GRPCStatus() *status.Status
type ErrCommitFinished ¶
ErrCommitFinished represents an error where the commit has been finished (e.g from PutFile or DeleteFile)
func (ErrCommitFinished) Error ¶
func (e ErrCommitFinished) Error() string
type ErrCommitNotFinished ¶
ErrCommitNotFinished represents an error where the commit has not been finished.
func (ErrCommitNotFinished) Error ¶
func (e ErrCommitNotFinished) Error() string
func (ErrCommitNotFinished) GRPCStatus ¶ added in v2.7.0
func (err ErrCommitNotFinished) GRPCStatus() *status.Status
type ErrCommitNotFound ¶
ErrCommitNotFound represents a commit-not-found error.
func (ErrCommitNotFound) Error ¶
func (e ErrCommitNotFound) Error() string
func (ErrCommitNotFound) GRPCStatus ¶
func (e ErrCommitNotFound) GRPCStatus() *status.Status
type ErrCommitOnOutputBranch ¶
ErrCommitOnOutputBranch represents an error where an attempt was made to start a commit on an output branch (a branch that is provenant on other branches). Users should not manually try to start a commit in an output branch, this should only be done internally in PFS.
func (ErrCommitOnOutputBranch) Error ¶
func (e ErrCommitOnOutputBranch) Error() string
type ErrCommitSetNotFound ¶
ErrCommitSetNotFound represents a commitset-not-found error.
func (ErrCommitSetNotFound) Error ¶
func (e ErrCommitSetNotFound) Error() string
func (ErrCommitSetNotFound) GRPCStatus ¶
func (e ErrCommitSetNotFound) GRPCStatus() *status.Status
type ErrDropWithChildren ¶
ErrDropWithChildren represents an error when attempting to drop a commit that has children. Because proper datum removal semantics have not been implemented in the middle of a commit chain, this operation is unsupported. However, a drop is still allowed for a commit with no children as there is no cleanup needed for child commits.
func (ErrDropWithChildren) Error ¶
func (e ErrDropWithChildren) Error() string
type ErrFileNotFound ¶
ErrFileNotFound represents a file-not-found error.
func (ErrFileNotFound) Error ¶
func (e ErrFileNotFound) Error() string
func (ErrFileNotFound) GRPCStatus ¶
func (e ErrFileNotFound) GRPCStatus() *status.Status
type ErrInconsistentCommit ¶
ErrInconsistentCommit represents an error where a transaction attempts to create a CommitSet with multiple commits in the same branch, which would result in inconsistent data dependencies.
func (ErrInconsistentCommit) Error ¶
func (e ErrInconsistentCommit) Error() string
func (ErrInconsistentCommit) Is ¶
func (e ErrInconsistentCommit) Is(other error) bool
type ErrInvalidProvenanceStructure ¶
ErrInvalidProvenanceStructure represents an error where more than one branch from a repo is reachable in a DAG. Such a DAG structure is unsupported.
func (ErrInvalidProvenanceStructure) Error ¶
func (e ErrInvalidProvenanceStructure) Error() string
type ErrOutputCommitNotFinished ¶
ErrOutputCommitNotFinished represents an error where the commit has not been finished
func (ErrOutputCommitNotFinished) Error ¶
func (e ErrOutputCommitNotFinished) Error() string
type ErrParentCommitNotFound ¶
ErrParentCommitNotFound represents a parent-commit-not-found error.
func (ErrParentCommitNotFound) Error ¶
func (e ErrParentCommitNotFound) Error() string
func (ErrParentCommitNotFound) GRPCStatus ¶
func (e ErrParentCommitNotFound) GRPCStatus() *status.Status
type ErrProjectExists ¶
ErrProjectExists represents a project-exists error.
func (ErrProjectExists) Error ¶
func (e ErrProjectExists) Error() string
func (ErrProjectExists) GRPCStatus ¶
func (e ErrProjectExists) GRPCStatus() *status.Status
type ErrProjectNotFound ¶
ErrProjectNotFound represents a project-not-found error.
func (ErrProjectNotFound) Error ¶
func (e ErrProjectNotFound) Error() string
func (ErrProjectNotFound) GRPCStatus ¶
func (e ErrProjectNotFound) GRPCStatus() *status.Status
type ErrRepoExists ¶
ErrRepoExists represents a repo-exists error.
func (ErrRepoExists) Error ¶
func (e ErrRepoExists) Error() string
func (ErrRepoExists) GRPCStatus ¶
func (e ErrRepoExists) GRPCStatus() *status.Status
type ErrRepoNotFound ¶
ErrRepoNotFound represents a repo-not-found error.
func (ErrRepoNotFound) Error ¶
func (e ErrRepoNotFound) Error() string
func (ErrRepoNotFound) GRPCStatus ¶
func (e ErrRepoNotFound) GRPCStatus() *status.Status
type ErrSquashWithSubvenance ¶
type ErrSquashWithSubvenance struct { CommitSet *pfs.CommitSet SubvenantCommitSets []*pfs.CommitSet }
ErrSquashWithSubvenance represents an error where a commit set cannot be deleted because it contains commits that are depended on by commits in another commit set. The dependent commit sets can be deleted by passing a force flag.
func (ErrSquashWithSubvenance) Error ¶
func (e ErrSquashWithSubvenance) Error() string
type ErrSquashWithoutChildren ¶
ErrSquashWithoutChildren represents an error when attempting to squash a commit that has no children. Since squash works by removing a commit and leaving its data in any child commits, a squash would result in data loss in this situation, so it is not allowed. To proceed anyway, use the DropCommitSet operation, which implies data loss.
func (ErrSquashWithoutChildren) Error ¶
func (e ErrSquashWithoutChildren) Error() string
Directories ¶
Path | Synopsis |
---|---|
TODO: the s2 library checks the type of the error to decide how to handle it, which doesn't work properly with wrapped errors
|
TODO: the s2 library checks the type of the error to decide how to handle it, which doesn't work properly with wrapped errors |