commonerr

package
v16.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package commonerr contains common errors between different Praefect components. Ideally this package's contents would be in praefect's root package but this is not possible at the moment due to cyclic imports.

Index

Constants

This section is empty.

Variables

View Source
var ErrRepositoryAlreadyExists = errors.New("repository already exists")

ErrRepositoryAlreadyExists is returned when attempting to create a repository that already exists.

View Source
var ErrRepositoryNotFound = errors.New("repository not found")

ErrRepositoryNotFound is returned when operating on a repository that doesn't exist.

This somewhat duplicates the above RepositoryNotFoundError but doesn't specify which repository was not found. With repository IDs in use, the virtual storage and relative path won't be available everywhere anymore.

Functions

func NewRepositoryNotFoundError

func NewRepositoryNotFoundError(virtualStorage string, relativePath string) error

NewRepositoryNotFoundError returns a new repository not found error for the given repository.

Types

type RepositoryNotFoundError

type RepositoryNotFoundError struct {
	// contains filtered or unexported fields
}

RepositoryNotFoundError is returned when attempting to operate on a repository that does not exist in the virtual storage.

func (RepositoryNotFoundError) Error

func (err RepositoryNotFoundError) Error() string

Error returns the error message.

Jump to

Keyboard shortcuts

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