Versions in this module Expand all Collapse all v0 v0.2.0 Jun 12, 2026 Changes in this version + const MaxTableColumns + var ErrNotJSONAPI = errors.New("not a JSON:API envelope") + type Displayer interface + DefaultFormat func() Format + FieldTemplates func() []Field + Payload func() any + func DisplayFields[T any](payload T, format Format, fields ...string) Displayer + func NewDisplayer[T any](payload T, defaultFormat Format, fields []Field) Displayer + type Field struct + Name string + ValueFormat string + func NewField(name, valueFormat string) Field + type Format int + const Agent + const JSON + const Markdown + const Pretty + const Table + const Unset + func FromString(s string) (Format, error) + func (f Format) IsJSONOrAgent() bool + type JSONAPIDisplayer struct + func NewJSONAPIDisplayer(raw []byte, logger hclog.Logger) (*JSONAPIDisplayer, error) + func (d JSONAPIDisplayer) DefaultFormat() Format + func (d JSONAPIDisplayer) FieldTemplates() []Field + func (d JSONAPIDisplayer) Payload() any + func (d JSONAPIDisplayer) TemplatedPayload() any + type Outputter struct + func New(io iostreams.IOStreams) *Outputter + func (o *Outputter) Display(d Displayer) error + func (o *Outputter) GetFormat() Format + func (o *Outputter) SetFormat(f Format) + func (o *Outputter) SetJQFilter(filter string) + func (o *Outputter) Show(val any, format Format, fields ...string) error + type StringPayload interface + StringPayload func(f Format) string + type TableFormatter interface + FirstColumnFormatter func(input string) string + HeaderFormatter func(input string) string + type TemplatedPayload interface + TemplatedPayload func() any