Documentation
¶
Overview ¶
Package output renders Pinax command projections for human and machine modes.
Index ¶
- func ApplyProjectionRedaction(p *domain.Projection)
- func Render(w io.Writer, mode Mode, projection domain.Projection) error
- func RenderWithOptions(w io.Writer, mode Mode, projection domain.Projection, opts RenderOptions) error
- func RunJournalPager(ctx context.Context, in io.Reader, out io.Writer, projection domain.Projection, ...) error
- type JournalLoader
- type JournalPagerModel
- type MarkdownOptions
- type Mode
- type RenderOptions
- type ThemeRoles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyProjectionRedaction ¶
func ApplyProjectionRedaction(p *domain.Projection)
ApplyProjectionRedaction 就地递归脱敏 projection 的全部渲染面。 它在 RenderWithOptions 渲染前调用,保证 default/json/agent/events/explain 与 evidence sidecar 都经过同一道门禁。返回的 projection 可安全渲染。
func RenderWithOptions ¶
func RenderWithOptions(w io.Writer, mode Mode, projection domain.Projection, opts RenderOptions) error
func RunJournalPager ¶
func RunJournalPager(ctx context.Context, in io.Reader, out io.Writer, projection domain.Projection, loader JournalLoader) error
Types ¶
type JournalLoader ¶
type JournalLoader func(direction int, current domain.Projection) (domain.Projection, error)
type JournalPagerModel ¶
type JournalPagerModel struct {
// contains filtered or unexported fields
}
func NewJournalPagerModel ¶
func NewJournalPagerModel(projection domain.Projection, loader JournalLoader, width, height int) JournalPagerModel
func (JournalPagerModel) Init ¶
func (m JournalPagerModel) Init() tea.Cmd
func (JournalPagerModel) View ¶
func (m JournalPagerModel) View() string
type MarkdownOptions ¶
type RenderOptions ¶
type RenderOptions struct {
Style string
ColorMode string
ThemeName string
ThemeRoles map[string]string
Width int
Markdown MarkdownOptions
IsTerminal bool
JSONIndent string
// SyncPreview and SyncLimit only affect human/agent sync previews. Machine
// JSON keeps the complete plan and sync_view regardless of these values.
SyncPreview string
SyncLimit int
SyncLimitSet bool
ContentDiff bool
}
Click to show internal directories.
Click to hide internal directories.