Versions in this module Expand all Collapse all v0 v0.1.1 Aug 3, 2026 Changes in this version + type ErrorSchema struct + Code string + Fields []FieldSchema + type OccursSchema struct + Maximum *uint64 + Minimum uint64 type RecordSchema + Occurs *OccursSchema v0.1.0 Aug 3, 2026 Changes in this version + const CANCEL + const CHUNK_TOKEN + const CODE_FIELD + const COMMAND_TOKEN + const COUNT_FIELD + const DefaultMaxDataRecords + const ERR + const EVENT_TOKEN + const FIELD_TOKEN + const ITEM_TOKEN + const MaxLineBytes + const OK_TOKEN + const PATH_TOKEN + const REQUEST + const SCHEMA_FIELD + var ErrComplete = errors.New("cmdwire: reply is already complete") + var ErrDataLimit = errors.New("cmdwire: reply data record limit exceeded") + var ErrIncomplete = errors.New("cmdwire: reply is incomplete") + func Format(record Record) (string, error) + type Collector struct + func NewCollector(command string) (*Collector, error) + func NewCollectorWithLimit(command string, maxDataRecords int) (*Collector, error) + func (collector *Collector) Add(record Record) error + func (collector *Collector) AddLine(line string) (matched bool, complete bool, err error) + func (collector *Collector) Result() (Report, error) + type Decoder struct + func NewDecoder(input io.Reader) *Decoder + func (decoder *Decoder) Decode() (Record, error) + type Field struct + Name string + Value string + type FieldSchema struct + Maximum *uint64 + Minimum *uint64 + Name string + Required bool + Type string + Unavailable bool + Values []string + Width int + type Kind string + const Cancel + const Chunk + const Error + const Event + const Item + const OK + const Request + type MessageSchema struct + Fields []FieldSchema + Resource string + type Record struct + Command string + Fields []Field + Kind Kind + Resource string + func ParseLine(input string) (Record, error) + func (record Record) Field(name string) (value string, ok bool) + type RecordSchema struct + Fields []FieldSchema + Kind Kind + Resource string + type RemoteError struct + Code string + Command string + Fields []Field + func (err *RemoteError) Error() string + type ReplySchema struct + Records []RecordSchema + Terminal []FieldSchema + type Report struct + Command string + Data []Record + Schema uint64 + Terminal []Field + type Schema struct + Command string + Errors []string + Format uint64 + Reply ReplySchema + Request MessageSchema + Version uint64 + func DecodeSchema(input io.Reader) (schema Schema, err error) + func ParseSchema(input []byte) (Schema, error) + func (schema Schema) Validate() error + func (schema Schema) ValidateError(record Record) error + func (schema Schema) ValidateReply(report Report) error + func (schema Schema) ValidateReplyRecords(records []Record) error + func (schema Schema) ValidateRequest(record Record) error + type SyntaxError struct + Column int + Message string + func (err *SyntaxError) Error() string