Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
ID string `db:"id" json:"id"` // Unique identifier/hash
Command string `db:"command" json:"command"` // The actual shell command
Timestamp time.Time `db:"timestamp" json:"timestamp"` // When the command was executed
Directory string `db:"directory" json:"directory"` // Directory where the command was executed (if known)
ExitCode int `db:"exit_code" json:"exit_code"` // Exit code of the command (if known)
ProgramSource string `db:"program_source" json:"program_source"` // e.g., "bash", "zsh"
IsRedacted bool `db:"is_redacted" json:"is_redacted"` // Whether the command has been sanitized
}
Event represents a canonical history command event.
func (*Event) GenerateID ¶
GenerateID creates a unique composite key/hash for the event. For Bash without timestamps, it uses a fallback deduplication strategy relying on contiguous deduplication combined with content hashing.
Click to show internal directories.
Click to hide internal directories.