Documentation
¶
Index ¶
- type ErrorType
- type FlowlytError
- func ErrConfigNotFound(configPath string) *FlowlytError
- func ErrInvalidOutputFormat(format string, supportedFormats []string) *FlowlytError
- func ErrNoInputSpecified() *FlowlytError
- func ErrUnsupportedPlatform(platform string, supportedPlatforms []string) *FlowlytError
- func NewConfigError(message string, cause error, suggestions ...string) *FlowlytError
- func NewPlatformError(message string, cause error, platform string, suggestions ...string) *FlowlytError
- func NewPolicyError(message string, cause error, policyPath string, suggestions ...string) *FlowlytError
- func NewReportError(message string, cause error, outputPath string, suggestions ...string) *FlowlytError
- func NewRepositoryError(message string, cause error, repoPath string, suggestions ...string) *FlowlytError
- func NewRuleError(message string, cause error, ruleID string, suggestions ...string) *FlowlytError
- func NewValidationError(message string, field string, value interface{}, suggestions ...string) *FlowlytError
- func NewWorkflowError(message string, cause error, workflowPath string, suggestions ...string) *FlowlytError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorType ¶
type ErrorType int
ErrorType represents different types of errors that can occur
const ( // Configuration errors ErrorTypeConfig ErrorType = iota // Repository access errors ErrorTypeRepository // Workflow parsing errors ErrorTypeWorkflow // Rule execution errors ErrorTypeRule // Policy evaluation errors ErrorTypePolicy // Report generation errors ErrorTypeReport // Validation errors ErrorTypeValidation // Platform errors ErrorTypePlatform )
type FlowlytError ¶
type FlowlytError struct {
Type ErrorType
Message string
Cause error
Details map[string]interface{}
Suggestions []string
}
FlowlytError represents a structured error with context
func ErrConfigNotFound ¶
func ErrConfigNotFound(configPath string) *FlowlytError
ErrConfigNotFound creates a configuration not found error
func ErrInvalidOutputFormat ¶
func ErrInvalidOutputFormat(format string, supportedFormats []string) *FlowlytError
ErrInvalidOutputFormat creates an invalid output format error
func ErrNoInputSpecified ¶
func ErrNoInputSpecified() *FlowlytError
ErrNoInputSpecified creates a no input specified error
func ErrUnsupportedPlatform ¶
func ErrUnsupportedPlatform(platform string, supportedPlatforms []string) *FlowlytError
ErrUnsupportedPlatform creates an unsupported platform error
func NewConfigError ¶
func NewConfigError(message string, cause error, suggestions ...string) *FlowlytError
NewConfigError creates a configuration error
func NewPlatformError ¶
func NewPlatformError(message string, cause error, platform string, suggestions ...string) *FlowlytError
NewPlatformError creates a platform error
func NewPolicyError ¶
func NewPolicyError(message string, cause error, policyPath string, suggestions ...string) *FlowlytError
NewPolicyError creates a policy evaluation error
func NewReportError ¶
func NewReportError(message string, cause error, outputPath string, suggestions ...string) *FlowlytError
NewReportError creates a report generation error
func NewRepositoryError ¶
func NewRepositoryError(message string, cause error, repoPath string, suggestions ...string) *FlowlytError
NewRepositoryError creates a repository error
func NewRuleError ¶
func NewRuleError(message string, cause error, ruleID string, suggestions ...string) *FlowlytError
NewRuleError creates a rule execution error
func NewValidationError ¶
func NewValidationError(message string, field string, value interface{}, suggestions ...string) *FlowlytError
NewValidationError creates a validation error
func NewWorkflowError ¶
func NewWorkflowError(message string, cause error, workflowPath string, suggestions ...string) *FlowlytError
NewWorkflowError creates a workflow parsing error
func (*FlowlytError) Error ¶
func (e *FlowlytError) Error() string
Error implements the error interface
func (*FlowlytError) Is ¶
func (e *FlowlytError) Is(target error) bool
Is checks if the error is of a specific type
func (*FlowlytError) Unwrap ¶
func (e *FlowlytError) Unwrap() error
Unwrap returns the underlying error
func (*FlowlytError) UserFriendlyMessage ¶
func (e *FlowlytError) UserFriendlyMessage() string
UserFriendlyMessage returns a user-friendly error message with suggestions