exchange

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package exchange contains functions for converting between different formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePlayText

func EncodePlayText(ps schema.PatternSet) ([]string, error)

EncodePlayText emits canonical metadata and explicit compact SDK state data. On failure it returns no lines, so callers can validate before opening files.

func LoadFromJSON

func LoadFromJSON(data interface{}, path string) error

LoadFromJSON loads data from JSON file.

func LoadFromLine

func LoadFromLine(path string) ([]string, error)

LoadFromLine loads lines of text from the given path.

func LoadPatternFile

func LoadPatternFile(fp string) (*schema.PatternSet, error)

LoadPatternFile loads a pattern file from the given path.

func ParseColor

func ParseColor(raw string) (color.Color, error)

ParseColor resolves an application random keyword or one configured alias, then delegates a complete color expression to the SDK. Alias keys are exact.

func ParsePlayText

func ParsePlayText(lines []string) (*schema.PatternSet, error)

ParsePlayText reads explicit title:/repeat: metadata and complete SDK states. It returns no PatternSet if any line is malformed or metadata is duplicated.

func SaveAsJSON

func SaveAsJSON(data interface{}, path string) error

SaveAsJSON saves data as JSON to the given path.

func SaveAsLine

func SaveAsLine(data []string, path string) error

SaveAsLine saves lines of text to the given path.

func SetLog

func SetLog(l *zap.SugaredLogger)

SetLog sets the logger from outside the package.

func ValidatePatternSet added in v0.1.0

func ValidatePatternSet(ps schema.PatternSet) error

ValidatePatternSet checks the application repeat range and delegates every single-state execution rule to the SDK, without opening a device.

Types

This section is empty.

Jump to

Keyboard shortcuts

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