errors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound       = errors.New("not found")
	ErrAlreadyExists  = errors.New("already exists")
	ErrNotInitialized = errors.New("not initialized")
	ErrInvalidInput   = errors.New("invalid input")
)

Standard sentinel errors for type checking

Functions

func BoardAlreadyExists

func BoardAlreadyExists(name string) error

func BoardNotFound

func BoardNotFound(name string) error

func CardNotFound

func CardNotFound(idOrAlias string) error

func ColumnNotFound

func ColumnNotFound(name, board string) error

func InvalidField

func InvalidField(field, message string) error

func IsAlreadyExists

func IsAlreadyExists(err error) bool

IsAlreadyExists checks if an error is an already-exists error.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound checks if an error is a not-found error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError checks if an error is a validation error.

func LabelNotFound

func LabelNotFound(name, board string) error

Types

type AlreadyExistsError

type AlreadyExistsError struct {
	Resource string
	ID       string
}

AlreadyExistsError indicates a resource already exists.

func (*AlreadyExistsError) Error

func (e *AlreadyExistsError) Error() string

func (*AlreadyExistsError) Unwrap

func (e *AlreadyExistsError) Unwrap() error

type NotFoundError

type NotFoundError struct {
	Resource string // "card", "board", "config"
	ID       string // The identifier that wasn't found
}

NotFoundError indicates a resource doesn't exist.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

type NotInitializedError

type NotInitializedError struct {
	Path string
}

NotInitializedError indicates Kan isn't set up in the repo.

func (*NotInitializedError) Error

func (e *NotInitializedError) Error() string

func (*NotInitializedError) Unwrap

func (e *NotInitializedError) Unwrap() error

type ValidationError

type ValidationError struct {
	Field   string
	Message string
}

ValidationError indicates invalid user input.

func (*ValidationError) Error

func (e *ValidationError) Error() string

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Jump to

Keyboard shortcuts

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