policycard

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package policycard renders a policy as a self-contained card component. Designed for embedding in chat — the card stands on its own with identity, rationale, recommendation, impact, and evidence from actual log data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model renders a single policy card.

func New

func New(theme styles.Theme) *Model

New creates a policy card. Call SetPolicy and SetWidth before rendering.

func (*Model) Height

func (m *Model) Height() int

Height returns the rendered height in lines.

func (*Model) SetPolicy

func (m *Model) SetPolicy(p *domain.Policy)

SetPolicy sets the policy to render and caches derived data.

func (*Model) SetWidth

func (m *Model) SetWidth(w int)

SetWidth sets the available rendering width.

func (*Model) Update

func (m *Model) Update(_ tea.Msg) tea.Cmd

Update handles messages. No interactive state yet.

func (*Model) View

func (m *Model) View() string

View renders the complete policy card.

Jump to

Keyboard shortcuts

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