format

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package format provides serialization formats for slidekit. TOON (Token-Optimized Object Notation) is the default format for AI agents. JSON is available for human readability.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format string

Format is an output format type.

const (
	FormatTOON Format = "toon"
	FormatJSON Format = "json"
)

func (Format) IsValid

func (f Format) IsValid() bool

IsValid returns true if the format is recognized.

type TOONEncoder

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

TOONEncoder encodes decks and diffs to TOON format.

func NewTOONEncoder

func NewTOONEncoder() *TOONEncoder

NewTOONEncoder creates a new TOON encoder.

func (*TOONEncoder) EncodeDeck

func (e *TOONEncoder) EncodeDeck(d *model.Deck) string

EncodeDeck encodes a deck to TOON format.

func (*TOONEncoder) EncodeDiff

func (e *TOONEncoder) EncodeDiff(d *model.Diff) string

EncodeDiff encodes a diff to TOON format.

func (*TOONEncoder) EncodeSlide added in v0.2.0

func (e *TOONEncoder) EncodeSlide(s *model.Slide) string

EncodeSlide encodes a single slide to TOON format.

Jump to

Keyboard shortcuts

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