Documentation
¶
Index ¶
Constants ¶
View Source
const ( ExitSuccess = 0 ExitFailure = 1 ExitUsageError = 2 )
Exit codes
View Source
const ( ErrCodeAuth = "AUTH_ERROR" ErrCodeNotFound = "NOT_FOUND" ErrCodeValidation = "VALIDATION_ERROR" ErrCodeConnection = "CONNECTION_ERROR" ErrCodeInternal = "INTERNAL_ERROR" )
Error codes for envelope responses
Variables ¶
This section is empty.
Functions ¶
func NewEnableCommandsError ¶ added in v0.13.0
NewEnableCommandsError creates an allowlist restriction error.
func NewReadonlyError ¶ added in v0.13.0
NewReadonlyError creates a readonly restriction error.
Types ¶
type ExitError ¶
ExitError wraps an error with an exit code.
func UsageError ¶
UsageError creates an error with exit code 2.
type RestrictionError ¶ added in v0.13.0
type RestrictionError struct {
Kind RestrictionKind
Command string
Allowlist []string
}
RestrictionError reports command safety restriction violations.
func (*RestrictionError) Error ¶ added in v0.13.0
func (e *RestrictionError) Error() string
type RestrictionKind ¶ added in v0.13.0
type RestrictionKind string
RestrictionKind identifies command safety restriction types.
const ( // RestrictionEnableCommands indicates command allowlist blocking. RestrictionEnableCommands RestrictionKind = "enable_commands" // RestrictionReadonly indicates readonly mode blocking. RestrictionReadonly RestrictionKind = "readonly" )
Click to show internal directories.
Click to hide internal directories.