storage

package
v0.0.0-...-0490640 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is returned when a requested policy wasn't found.
	ErrNotFound = errors.New("not found")

	// ErrCannotDelete is thrown by our custom pg error from migration 02
	// if a user tries to delete a policy that is marked as non-deletable.
	ErrCannotDelete = errors.New("policy not deletable")

	// ErrConflict indicates that the object being created already exists.
	ErrConflict = errors.New("conflict")

	// ErrDatabase results from unexpected database errors.
	ErrDatabase = errors.New("database internal")

	// ErrGenerateUUID occurs when a UUID could not be generated for a new object.
	ErrGenerateUUID = errors.New("could not generate UUID")

	// ErrForeignKey occurs, among other times, when attempting to insert a foreign key whose referent does not exist
	ErrForeignKey = errors.New("foreign key violation")

	// ErrMaxProjectsExceeded indicates that a new project cannot be created
	// since the max allowed are already created.
	ErrMaxProjectsExceeded = errors.New("max projects allowed")
)

Error responses common to all storage adapters, be it v1, v2, memstore, postgres, etc.

Functions

func NewErrTxCommit

func NewErrTxCommit(e error) error

func NewMissingFieldError

func NewMissingFieldError(f string) error

Types

type ErrMissingField

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

ErrMissingField occurs when a required field was not passed.

func (*ErrMissingField) Error

func (e *ErrMissingField) Error() string

type ErrTxCommit

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

ErrTxCommit occurs when the database attempts to commit a transaction and fails.

func (*ErrTxCommit) Error

func (e *ErrTxCommit) Error() string

Directories

Path Synopsis
v1
v2

Jump to

Keyboard shortcuts

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