Documentation
¶
Overview ¶
Package domain contains domain errors used throughout the application.
Index ¶
Constants ¶
View Source
const ( ErrCodeClaudeAlreadyRunning = "CLAUDE_ALREADY_RUNNING" ErrCodeClaudeNotRunning = "CLAUDE_NOT_RUNNING" ErrCodeInvalidCommand = "INVALID_COMMAND" ErrCodeInvalidPayload = "INVALID_PAYLOAD" ErrCodePathOutsideRepo = "PATH_OUTSIDE_REPO" ErrCodeFileNotFound = "FILE_NOT_FOUND" ErrCodeFileTooLarge = "FILE_TOO_LARGE" ErrCodeGitError = "GIT_ERROR" ErrCodeInternalError = "INTERNAL_ERROR" )
Error codes for client responses.
Variables ¶
View Source
var ( ErrClaudeAlreadyRunning = errors.New("claude is already running") ErrClaudeNotRunning = errors.New("claude is not running") ErrInvalidPrompt = errors.New("invalid prompt: prompt cannot be empty") ErrPromptTooLong = errors.New("prompt exceeds maximum length") ErrRepoNotFound = errors.New("repository not found") ErrNotGitRepo = errors.New("not a git repository") ErrPathOutsideRepo = errors.New("path is outside repository") ErrFileTooLarge = errors.New("file exceeds size limit") ErrFileNotFound = errors.New("file not found") ErrInvalidCommand = errors.New("invalid command") ErrInvalidPayload = errors.New("invalid payload") ErrHubNotRunning = errors.New("event hub is not running") ErrSubscriberClosed = errors.New("subscriber is closed") )
Sentinel errors for common error conditions.
Functions ¶
This section is empty.
Types ¶
type ClaudeError ¶
type ClaudeError struct {
Op string // Operation that failed
Err error // Underlying error
ExitCode int // Exit code if process exited
}
ClaudeError represents an error from Claude CLI operations.
func NewClaudeError ¶
func NewClaudeError(op string, err error, exitCode int) *ClaudeError
NewClaudeError creates a new ClaudeError.
func (*ClaudeError) Error ¶
func (e *ClaudeError) Error() string
func (*ClaudeError) Unwrap ¶
func (e *ClaudeError) Unwrap() error
type GitError ¶
GitError represents an error from Git operations.
func NewGitError ¶
NewGitError creates a new GitError.
type ValidationError ¶
ValidationError represents a validation error.
func NewValidationError ¶
func NewValidationError(field, message string) *ValidationError
NewValidationError creates a new ValidationError.
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string
Directories
¶
| Path | Synopsis |
|---|---|
|
Package events defines domain events for the cdev system.
|
Package events defines domain events for the cdev system. |
|
Package ports defines the interfaces (ports) for the hexagonal architecture.
|
Package ports defines the interfaces (ports) for the hexagonal architecture. |
Click to show internal directories.
Click to hide internal directories.