Documentation
¶
Index ¶
- func ApplyCelHighlight(e log.Entry, expr string, compiled *filter.CompiledFilter, colorIndex int) map[string]lipgloss.Color
- func FormatLine(line string, logFormat log.Format) string
- func FormatLineWithHighlight(e log.Entry, expr string, highlight *filter.CompiledFilter) string
- type CelFilter
- type CelHighlight
- type CelInput
- func (c CelInput) Error() string
- func (c CelInput) Phase() CelInputPhase
- func (c *CelInput) ResetToInput()
- func (c *CelInput) SetError(err string)
- func (c *CelInput) SetInitialValue(value string)
- func (c CelInput) Update(msg tea.KeyMsg) (CelInput, tea.Cmd)
- func (c CelInput) Value() string
- func (c CelInput) ViewHint() string
- func (c CelInput) ViewInput() string
- func (c CelInput) ViewPicker() string
- type CelInputPhase
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCelHighlight ¶
func ApplyCelHighlight(e log.Entry, expr string, compiled *filter.CompiledFilter, colorIndex int) map[string]lipgloss.Color
ApplyCelHighlight returns a highlight color map for fields matching a CEL expression. Only highlights fields that are referenced in the expression.
func FormatLine ¶
FormatLine formats a single log line for plain output.
func FormatLineWithHighlight ¶
FormatLineWithHighlight formats a log entry with optional CEL-based highlighting.
Types ¶
type CelFilter ¶
type CelFilter struct {
Expression string
Compiled *filter.CompiledFilter
Enabled bool
}
CelFilter represents a CEL expression-based filter.
type CelHighlight ¶
type CelHighlight struct {
Expression string
Compiled *filter.CompiledFilter
ColorIndex int
Enabled bool
}
CelHighlight represents a CEL expression-based highlight.
type CelInput ¶
type CelInput struct {
// contains filtered or unexported fields
}
CelInput is a reusable component for entering CEL expressions. It provides a field picker followed by text input with tab completion.
func NewCelInput ¶
NewCelInput creates a new CEL input component.
func (*CelInput) ResetToInput ¶
func (c *CelInput) ResetToInput()
ResetToInput resets to input phase (for retrying after error).
func (*CelInput) SetInitialValue ¶
SetInitialValue sets an initial value and skips the picker phase.
func (CelInput) Update ¶
Update handles input messages and returns the updated component and any command.
func (CelInput) Value ¶
Value returns the entered expression (only valid when phase is CelPhaseDone).
func (CelInput) ViewPicker ¶
ViewPicker renders the field picker.
type CelInputPhase ¶
type CelInputPhase int
CelInputPhase represents the current phase of CEL input.
const ( CelPhasePicker CelInputPhase = iota CelPhaseInput CelPhaseDone CelPhaseCancelled )
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the application state.
func NewWithStore ¶
NewWithStore creates a new Model with a disk-backed store.
func (Model) KnownFields ¶
KnownFields returns all unique field names seen in the log entries.