Documentation
¶
Index ¶
- Variables
- func BoardAlreadyExists(name string) error
- func BoardNotFound(name string) error
- func CardNotFound(idOrAlias string) error
- func ColumnAlreadyExists(name, board string) error
- func ColumnLimitExceeded(columnName string, limit int) error
- func ColumnNotFound(name, board string) error
- func CommentNotFound(id string) error
- func InvalidField(field, message string) error
- func IsAlreadyExists(err error) bool
- func IsAmbiguous(err error) bool
- func IsNotFound(err error) bool
- func IsValidationError(err error) bool
- func NewAmbiguousCardError(input string, matches []AmbiguousMatch, displayLimit int) error
- type AlreadyExistsError
- type AmbiguousCardError
- type AmbiguousMatch
- type NoGlobalBoardError
- type NotFoundError
- type NotInitializedError
- type StaleGlobalBoardError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") ErrNotInitialized = errors.New("not initialized") ErrInvalidInput = errors.New("invalid input") ErrAmbiguous = errors.New("ambiguous match") )
Standard sentinel errors for type checking
Functions ¶
func BoardAlreadyExists ¶
func BoardNotFound ¶
func CardNotFound ¶
func ColumnAlreadyExists ¶ added in v0.5.0
func ColumnLimitExceeded ¶ added in v0.14.0
func ColumnNotFound ¶
func CommentNotFound ¶ added in v0.7.1
func InvalidField ¶
func IsAlreadyExists ¶
IsAlreadyExists checks if an error is an already-exists error.
func IsAmbiguous ¶ added in v0.24.0
IsAmbiguous reports whether err indicates an ambiguous fuzzy match.
func IsNotFound ¶
IsNotFound checks if an error is a not-found error.
func IsValidationError ¶
IsValidationError checks if an error is a validation error.
func NewAmbiguousCardError ¶ added in v0.24.0
func NewAmbiguousCardError(input string, matches []AmbiguousMatch, displayLimit int) error
NewAmbiguousCardError builds an AmbiguousCardError. The full match list is stored on the error; displayLimit controls how many are shown by Error() (Error() renders "(showing N of M)" when truncation happens). Pass 0 to disable the display cap.
Types ¶
type AlreadyExistsError ¶
AlreadyExistsError indicates a resource already exists.
func (*AlreadyExistsError) Error ¶
func (e *AlreadyExistsError) Error() string
func (*AlreadyExistsError) Unwrap ¶
func (e *AlreadyExistsError) Unwrap() error
type AmbiguousCardError ¶ added in v0.24.0
type AmbiguousCardError struct {
Input string
Matches []AmbiguousMatch
DisplayLimit int
}
AmbiguousCardError indicates a fuzzy lookup matched multiple cards and the user must disambiguate. Matches contains the full list (pre-sorted); DisplayLimit caps how many entries Error() renders. Storing the full list lets callers like cross-board aggregation reuse the data without losing truncated matches.
func (*AmbiguousCardError) Error ¶ added in v0.24.0
func (e *AmbiguousCardError) Error() string
func (*AmbiguousCardError) Unwrap ¶ added in v0.24.0
func (e *AmbiguousCardError) Unwrap() error
type AmbiguousMatch ¶ added in v0.24.0
AmbiguousMatch is one candidate in an AmbiguousCardError list.
type NoGlobalBoardError ¶ added in v0.26.0
type NoGlobalBoardError struct{}
NoGlobalBoardError indicates -g was used but no global board is designated.
func (*NoGlobalBoardError) Error ¶ added in v0.26.0
func (e *NoGlobalBoardError) Error() string
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 StaleGlobalBoardError ¶ added in v0.26.0
StaleGlobalBoardError indicates the designated global board no longer exists (its project moved/was deleted, or the board itself was removed).
func (*StaleGlobalBoardError) Error ¶ added in v0.26.0
func (e *StaleGlobalBoardError) Error() string
type ValidationError ¶
ValidationError indicates invalid user input.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
func (*ValidationError) Unwrap ¶
func (e *ValidationError) Unwrap() error