Documentation
¶
Overview ¶
Package tony provides support and tooling for the Tony format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Diff ¶
Diff produces a succint comparison of from and to. If there are no differences, Diff returns nil.
A resulting diff may be reversed using libdiff.Reverse.
A resulting diff may be used as a patch in Patch.
The structure returned by Diff contains a minimal set of changes indicated by yaml tags which double as patch operations.
if the types of from and to differ then the result is a node !replace from: from to: to
for ObjectType any field f in to but not in from has a field `f: !delete[(<orig-tag>)] ...`
for ObjectType any field f in from but not in to has a field `f: !insert[(<orig-tag>)] ...`
for any field f shared by from and to which is equal, it is absent in the result.
for any field f with a difference, it contains a diff of the value of f in from and respectively to.
For ArrayType nodes which differ, if both nodes are tagged by the same key with !key(<key>), they are treated as objects but presented as an array with tag !key(<key>).
For StringTypes, a string diff may computed and if the size of the string diff is less than half the size of the the smallest string
If only the tags differ, the tags !addtag(<tag>) !rmtag(<tag>) and !retag(<from>,<to>) will be present decorating a null.
Types ¶
type DiffConfig ¶
type DiffConfig struct {
Comments bool
}
type MatchConfig ¶
type PatchConfig ¶
type PatchConfig struct {
Comments bool
}
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
git-issue
command
|
|
|
git-issue/issuelib
Package issuelib provides the core library for git-issue.
|
Package issuelib provides the core library for git-issue. |
|
o
command
|
|
|
tony-codegen
command
|
|
|
tony-lsp
command
|
|
|
Package debug provides debugging utilities for Tony development.
|
Package debug provides debugging utilities for Tony development. |
|
Package dirbuild interprets a tony build directory
|
Package dirbuild interprets a tony build directory |
|
Package encode encodes IR nodes to Tony format text.
|
Package encode encodes IR nodes to Tony format text. |
|
Package eval provides expression evaluation for Tony documents.
|
Package eval provides expression evaluation for Tony documents. |
|
Package format provides formatting utilities for Tony documents.
|
Package format provides formatting utilities for Tony documents. |
|
Package gomap provides encoding and decoding between IR nodes and Go values.
|
Package gomap provides encoding and decoding between IR nodes and Go values. |
|
codegen
Package codegen generates Go code for Tony schema types.
|
Package codegen generates Go code for Tony schema types. |
|
Package ir provides the intermediate representation for Tony format documents.
|
Package ir provides the intermediate representation for Tony format documents. |
|
kpath
Package kpath provides kinded path parsing and navigation.
|
Package kpath provides kinded path parsing and navigation. |
|
Package libdiff provides diff computation for Tony documents.
|
Package libdiff provides diff computation for Tony documents. |
|
Package mergeop provides match and patch operations for Tony documents.
|
Package mergeop provides match and patch operations for Tony documents. |
|
Package parse parses Tony format text into IR nodes.
|
Package parse parses Tony format text into IR nodes. |
|
Package schema provides Tony Schema for describing and validating Tony documents.
|
Package schema provides Tony Schema for describing and validating Tony documents. |
|
Package stream provides streaming encode/decode for Tony documents.
|
Package stream provides streaming encode/decode for Tony documents. |
|
system
|
|
|
logd
Package logd provides the backend storage for the tony system api.
|
Package logd provides the backend storage for the tony system api. |
|
logd/api
Package api provides HTTP API types for the logd server.
|
Package api provides HTTP API types for the logd server. |
|
logd/server
Package server provides the HTTP server implementation for logd.
|
Package server provides the HTTP server implementation for logd. |
|
logd/storage
Package storage provides a filesystem based storage layer for tony system api.
|
Package storage provides a filesystem based storage layer for tony system api. |
|
logd/storage/index
Package index provides hierarchical path-based indexing for storage.
|
Package index provides hierarchical path-based indexing for storage. |
|
logd/storage/internal/dlog
Package dlog provides double-buffered write-ahead logging.
|
Package dlog provides double-buffered write-ahead logging. |
|
logd/storage/internal/patches
Package patches provides streaming patch application for snapshots.
|
Package patches provides streaming patch application for snapshots. |
|
logd/storage/internal/seq
Package seq provides atomic sequence counters.
|
Package seq provides atomic sequence counters. |
|
logd/storage/internal/snap
Package snap provides event-based snapshot storage.
|
Package snap provides event-based snapshot storage. |
|
logd/storage/tx
Package tx provides transaction coordination for multi-participant updates.
|
Package tx provides transaction coordination for multi-participant updates. |
|
Package token provides tokenization support for Tony and related formats.
|
Package token provides tokenization support for Tony and related formats. |