apperrors

package
v0.0.0-...-0640eb1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

View Source
const (
	// NotFoundMsg missing godoc
	NotFoundMsg = "Object not found"
	// NotFoundMsgF missing godoc
	NotFoundMsgF = "Object not found: %s"
	// InvalidDataMsg missing godoc
	InvalidDataMsg = "Invalid data"
	// InternalServerErrMsgF missing godoc
	InternalServerErrMsgF = "Internal Server Error: %s"
	// NotUniqueMsg missing godoc
	NotUniqueMsg = "Object is not unique"
	// TenantRequiredMsg missing godoc
	TenantRequiredMsg = "Tenant is required"
	// TenantNotFoundMsg missing godoc
	TenantNotFoundMsg = "Tenant not found"
	// InsufficientScopesMsg missing godoc
	InsufficientScopesMsg = "insufficient scopes provided"
	// NoScopesInContextMsg missing godoc
	NoScopesInContextMsg = "cannot read scopes from context"
	// NoRequiredScopesInContextMsg missing godoc
	NoRequiredScopesInContextMsg = "required scopes are not defined"
	// KeyDoesNotExistMsg missing godoc
	KeyDoesNotExistMsg = "the key does not exist in the source object"
	// CannotReadTenantMsg missing godoc
	CannotReadTenantMsg = "cannot read tenant from context"
	// CannotReadClientUserMsg missing godoc
	CannotReadClientUserMsg = "cannot read client_user from context"
	// InvalidOperationMsg missing godoc
	InvalidOperationMsg = "The operation is not allowed"
	// UnauthorizedMsg missing godoc
	UnauthorizedMsg = "Unauthorized"
	// OperationTimeoutMsg missing godoc
	OperationTimeoutMsg = "operation has timed out"
	// EmptyDataMsg missing godoc
	EmptyDataMsg = "Some required data was left out"
	// InconsistentDataMsg missing godoc
	InconsistentDataMsg = "Inconsistent or out-of-range data"
	// NotUniqueNameMsg missing godoc
	NotUniqueNameMsg = "Object name is not unique"
	// ConcurrentOperationMsg missing godoc
	ConcurrentOperationMsg = "Concurrent operation"
	// InvalidStatusConditionMsg missing godoc
	InvalidStatusConditionMsg = "Invalid status condition"
	// CannotUpdateObjectInManyBundlesMsg missing godoc
	CannotUpdateObjectInManyBundlesMsg = "Can not update object that is part of more than one bundle"
)

Variables

This section is empty.

Functions

func InternalErrorFrom

func InternalErrorFrom(err error, msg string, args ...interface{}) error

InternalErrorFrom missing godoc

func IsCannotReadTenant

func IsCannotReadTenant(err error) bool

IsCannotReadTenant missing godoc

func IsCannotUpdateObjectInManyBundlesError

func IsCannotUpdateObjectInManyBundlesError(err error) bool

IsCannotUpdateObjectInManyBundlesError missing godoc

func IsInvalidStatusCondition

func IsInvalidStatusCondition(err error) bool

IsInvalidStatusCondition missing godoc

func IsKeyDoesNotExist

func IsKeyDoesNotExist(err error) bool

IsKeyDoesNotExist missing godoc

func IsNewCheckViolationError

func IsNewCheckViolationError(err error) bool

IsNewCheckViolationError missing godoc

func IsNewInvalidOperationError

func IsNewInvalidOperationError(err error) bool

IsNewInvalidOperationError missing godoc

func IsNewNotNullViolationError

func IsNewNotNullViolationError(err error) bool

IsNewNotNullViolationError missing godoc

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError missing godoc

func IsNotUniqueError

func IsNotUniqueError(err error) bool

IsNotUniqueError missing godoc

func IsTenantNotFoundError

func IsTenantNotFoundError(err error) bool

IsTenantNotFoundError missing godoc

func IsTenantRequired

func IsTenantRequired(err error) bool

IsTenantRequired missing godoc

func IsValueNotFoundInConfiguration

func IsValueNotFoundInConfiguration(err error) bool

IsValueNotFoundInConfiguration missing godoc

func NewCannotReadClientUserError

func NewCannotReadClientUserError() error

NewCannotReadClientUserError missing godoc

func NewCannotReadTenantError

func NewCannotReadTenantError() error

NewCannotReadTenantError missing godoc

func NewCannotUpdateObjectInManyBundles

func NewCannotUpdateObjectInManyBundles() error

NewCannotUpdateObjectInManyBundles missing godoc

func NewCheckViolationError

func NewCheckViolationError(resourceType resource.Type) error

NewCheckViolationError missing godoc

func NewConcurrentOperationInProgressError

func NewConcurrentOperationInProgressError(msg string) error

NewConcurrentOperationInProgressError missing godoc

func NewForeignKeyInvalidOperationError

func NewForeignKeyInvalidOperationError(sqlOperation resource.SQLOperation, resourceType resource.Type) error

NewForeignKeyInvalidOperationError missing godoc

func NewInsufficientScopesError

func NewInsufficientScopesError(requiredScopes, actualScopes []string) error

NewInsufficientScopesError missing godoc

func NewInternalError

func NewInternalError(msg string, args ...interface{}) error

NewInternalError missing godoc

func NewInvalidDataError

func NewInvalidDataError(msg string, args ...interface{}) error

NewInvalidDataError missing godoc

func NewInvalidDataErrorWithFields

func NewInvalidDataErrorWithFields(fields map[string]error, objType string) error

NewInvalidDataErrorWithFields missing godoc

func NewInvalidOperationError

func NewInvalidOperationError(reason string) error

NewInvalidOperationError missing godoc

func NewInvalidStatusCondition

func NewInvalidStatusCondition(resourceType resource.Type) error

NewInvalidStatusCondition missing godoc

func NewKeyDoesNotExistError

func NewKeyDoesNotExistError(key string) error

NewKeyDoesNotExistError missing godoc

func NewNoScopesInContextError

func NewNoScopesInContextError() error

NewNoScopesInContextError missing godoc

func NewNotFoundError

func NewNotFoundError(resourceType resource.Type, objectID string) error

NewNotFoundError missing godoc

func NewNotFoundErrorWithMessage

func NewNotFoundErrorWithMessage(resourceType resource.Type, objectID string, message string) error

NewNotFoundErrorWithMessage missing godoc

func NewNotFoundErrorWithType

func NewNotFoundErrorWithType(resourceType resource.Type) error

NewNotFoundErrorWithType missing godoc

func NewNotNullViolationError

func NewNotNullViolationError(resourceType resource.Type) error

NewNotNullViolationError missing godoc

func NewNotUniqueError

func NewNotUniqueError(resourceType resource.Type) error

NewNotUniqueError missing godoc

func NewNotUniqueNameError

func NewNotUniqueNameError(resourceType resource.Type) error

NewNotUniqueNameError missing godoc

func NewOperationTimeoutError

func NewOperationTimeoutError() error

NewOperationTimeoutError missing godoc

func NewRequiredScopesNotDefinedError

func NewRequiredScopesNotDefinedError() error

NewRequiredScopesNotDefinedError missing godoc

func NewTenantNotFoundError

func NewTenantNotFoundError(externalTenant string) error

NewTenantNotFoundError missing godoc

func NewTenantRequiredError

func NewTenantRequiredError() error

NewTenantRequiredError missing godoc

func NewUnauthorizedError

func NewUnauthorizedError(msg string) error

NewUnauthorizedError missing godoc

func NewValueNotFoundInConfigurationError

func NewValueNotFoundInConfigurationError() error

NewValueNotFoundInConfigurationError missing godoc

func WriteAppError

func WriteAppError(ctx context.Context, w http.ResponseWriter, appErr error, statusCode int)

WriteAppError missing godoc

Types

type Error

type Error struct {
	Message string
	// contains filtered or unexported fields
}

Error missing godoc

func (Error) Error

func (e Error) Error() string

Error missing godoc

func (Error) Is

func (e Error) Is(err error) bool

Is missing godoc

type ErrorType

type ErrorType int

ErrorType missing godoc

const (
	// InternalError missing godoc
	InternalError ErrorType = 10
	// UnknownError missing godoc
	UnknownError ErrorType = 11
	// NotFound missing godoc
	NotFound ErrorType = 20
	// NotUnique missing godoc
	NotUnique ErrorType = 21
	// InvalidData missing godoc
	InvalidData ErrorType = 22
	// InsufficientScopes missing godoc
	InsufficientScopes ErrorType = 23
	// TenantRequired missing godoc
	TenantRequired ErrorType = 24
	// TenantNotFound missing godoc
	TenantNotFound ErrorType = 25
	// Unauthorized missing godoc
	Unauthorized ErrorType = 26
	// InvalidOperation missing godoc
	InvalidOperation ErrorType = 27
	// OperationTimeout missing godoc
	OperationTimeout ErrorType = 28
	// EmptyData missing godoc
	EmptyData ErrorType = 29
	// InconsistentData missing godoc
	InconsistentData ErrorType = 30
	// NotUniqueName missing godoc
	NotUniqueName ErrorType = 31
	// ConcurrentOperation missing godoc
	ConcurrentOperation ErrorType = 32
	// InvalidStatusCondition missing godoc
	InvalidStatusCondition ErrorType = 33
	// CannotUpdateObjectInManyBundles missing godoc
	CannotUpdateObjectInManyBundles ErrorType = 34
)

func ErrorCode

func ErrorCode(err error) ErrorType

ErrorCode missing godoc

func (ErrorType) String

func (i ErrorType) String() string

Jump to

Keyboard shortcuts

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