Documentation
¶
Overview ¶
Package presentation owns the closed CLI presentation grammar.
Index ¶
- func Literal(text string) (value, error)
- func Prompt(dst io.Writer, prelude Document, tail Value) error
- func Prose(text string) (value, error)
- func Render(dst io.Writer, document Document) error
- type Collection
- type CollectionCategory
- type Detail
- type Diagnostic
- type Document
- type Field
- type List
- type Mutation
- type MutationChange
- type Node
- type Record
- type RecordGroup
- type Report
- type ReportCategory
- type Section
- type Steps
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Prompt ¶
Prompt renders a complete prelude atomically, then writes and flushes one validated prompt tail without a trailing newline before input is read.
Types ¶
type Collection ¶
type Collection struct {
Status string
Categories []CollectionCategory
}
Collection is a representation-only ordered set of semantic record categories. Its owner supplies category labels, schemas, records, and order.
func (Collection) Document ¶
func (c Collection) Document() (Document, error)
Document lowers a collection into the closed presentation tree.
type CollectionCategory ¶
CollectionCategory is one same-schema category in a Collection.
type Detail ¶
Detail is the standard shape for a detailed query. Its optional leading fields and ordered sections lower to a Document.
type Diagnostic ¶
Diagnostic is a representation-only actionable failure. Its owner supplies all semantic labels, state, changed axes, cause, and ordered remedies.
func (Diagnostic) Document ¶
func (d Diagnostic) Document() (Document, error)
Document lowers a diagnostic into the closed presentation tree.
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document is a complete CLI presentation. Root fields must precede sections.
func NewDocument ¶
NewDocument constructs a Document from ordered root nodes.
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
Field is a labeled scalar value.
type List ¶
type List struct {
// contains filtered or unexported fields
}
List is a labeled collection of bare scalar leaves.
type Mutation ¶
type Mutation struct {
Status string
Identity []Field
Changes []MutationChange
Notes []Value
NextActions []Value
}
Mutation is a representation-only completed operation. Its owner supplies status, identity, changed axes, notes, and ordered next actions.
type MutationChange ¶
MutationChange is one owner-named ordered group of mutation facts.
type Node ¶
type Node interface {
// contains filtered or unexported methods
}
Node is a grammar node. The closed implementation is Field, Section, List, RecordGroup, Record, and Steps.
type Record ¶
type Record struct {
// contains filtered or unexported fields
}
Record is a fixed-arity compact record leaf.
type RecordGroup ¶
type RecordGroup struct {
// contains filtered or unexported fields
}
RecordGroup is a labeled collection with one fixed record schema.
func NewRecordGroup ¶
func NewRecordGroup(label string, schema []string, records ...Record) (RecordGroup, error)
NewRecordGroup constructs a labeled fixed-schema record collection.
type Report ¶
type Report struct {
Status string
Context []Field
Summary []Field
Categories []ReportCategory
}
Report is a representation-only complete check or audit result. Its owner supplies the status, context, summary, categories, schemas, and ordering.
type ReportCategory ¶
ReportCategory is one semantic category of same-schema findings in a report.
type Section ¶
type Section struct {
// contains filtered or unexported fields
}
Section groups nested nodes under a label.