history

package
v1.53.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

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

func (e *Event) GenerateID(sequenceNumber int)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL