Documentation
¶
Index ¶
- Variables
- func ErrConflict(what string, where, with tokens.Range) error
- func ErrImportResolution(module, fn string) error
- func ErrInfiniteRecursion(stack []string) error
- func ErrInjected(format string, args ...any) error
- func ErrInvalidInvocation(reason string) error
- func ErrInvalidType(got, expected string) error
- func ErrModuleInvocation(module, fn string) error
- func ErrNamespaceNotFound(name string) error
- func ErrNotExported(fqn string) error
- func ErrPolicyNotFound(fqn string) error
- func ErrRequiredFact(name string) error
- func ErrRuleNotFound(fqn string) error
- func ErrShapeNotFound(name string) error
- func ErrShapeValidation(msg string) error
- func ErrUnresolvableFact(name string) error
- type ConflictError
- type ImportResolutionError
- type InfiniteRecursionError
- type InjectedError
- type InvalidInvocationError
- type InvalidTypeError
- type ModuleInvocationError
- type NotExportedError
- type NotFoundError
- type NotImplementedError
- type RuntimePanic
- type ShapeValidationError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPolicyMetadataContiguous = wrapCategory(ErrIndex, "title, description, version, and tag may only appear in one contiguous block at the top of the policy, before all fact and use statements.") ErrPolicyFactAfterUse = wrapCategory(ErrIndex, "fact statements must appear before any use statements.") ErrPolicyInvalidVersion = wrapCategory(ErrIndex, `Invalid policy version: expected SemVer string (e.g., "1.2.3").`) ErrPolicyEmptyTitle = wrapCategory(ErrIndex, "policy title must not be empty or whitespace-only.") ErrPolicyEmptyTagKey = wrapCategory(ErrIndex, "tag key must not be empty or whitespace-only.") )
Policy indexing: literal metadata and header ordering. Each value wraps ErrIndex; add location at the call site with fmt.Errorf("at %s: %w", span, err).
View Source
var ErrIndex = errors.New("index error")
ErrIndex is the root sentinel for static index construction and validation failures.
View Source
var ErrNotImplemented = &NotImplementedError{}
View Source
var ErrRuntimePanic = &RuntimePanic{}
Functions ¶
func ErrImportResolution ¶
func ErrInfiniteRecursion ¶
func ErrInjected ¶
func ErrInvalidInvocation ¶
func ErrInvalidType ¶
func ErrModuleInvocation ¶
func ErrNamespaceNotFound ¶
func ErrNotExported ¶
func ErrPolicyNotFound ¶
func ErrRequiredFact ¶
func ErrRuleNotFound ¶
func ErrShapeNotFound ¶
func ErrShapeValidation ¶
func ErrUnresolvableFact ¶
Types ¶
type ConflictError ¶
type ConflictError struct {
// contains filtered or unexported fields
}
func (ConflictError) Error ¶
func (e ConflictError) Error() string
type ImportResolutionError ¶
type ImportResolutionError struct{}
func (ImportResolutionError) Error ¶
func (e ImportResolutionError) Error() string
type InfiniteRecursionError ¶
type InfiniteRecursionError struct {
// contains filtered or unexported fields
}
func (InfiniteRecursionError) Error ¶
func (e InfiniteRecursionError) Error() string
type InjectedError ¶
type InjectedError struct {
}
Error injected by calling the `error` function in sentrie code
func (InjectedError) Error ¶
func (e InjectedError) Error() string
type InvalidInvocationError ¶
type InvalidInvocationError struct{}
func (InvalidInvocationError) Error ¶
func (e InvalidInvocationError) Error() string
type InvalidTypeError ¶
type InvalidTypeError struct {
// contains filtered or unexported fields
}
func (InvalidTypeError) Error ¶
func (e InvalidTypeError) Error() string
type ModuleInvocationError ¶
type ModuleInvocationError struct{}
func (ModuleInvocationError) Error ¶
func (e ModuleInvocationError) Error() string
type NotExportedError ¶
type NotExportedError struct{}
func (NotExportedError) Error ¶
func (e NotExportedError) Error() string
type NotFoundError ¶
type NotFoundError struct{}
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type NotImplementedError ¶
type NotImplementedError struct{}
func (*NotImplementedError) Error ¶
func (e *NotImplementedError) Error() string
func (*NotImplementedError) Unwrap ¶
func (e *NotImplementedError) Unwrap() error
type RuntimePanic ¶
type RuntimePanic struct{}
func (RuntimePanic) Error ¶
func (e RuntimePanic) Error() string
type ShapeValidationError ¶
type ShapeValidationError struct{}
func (ShapeValidationError) Error ¶
func (e ShapeValidationError) Error() string
Click to show internal directories.
Click to hide internal directories.