meaninglabelsfile

package
v0.148.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package meaninglabelsfile keeps a local project's Meaning Graph label document at <project>/datatug-labels.json and its audit trail at <project>/.datatug/audit/labels.jsonl. It implements the core meaninglabels.Store interface, so a later move to the DALgo project store changes only which Store the edge composes.

Index

Constants

View Source
const FileName = "datatug-labels.json"

FileName is the label document's name in the project root.

Variables

View Source
var AuditPath = filepath.Join(".datatug", "audit", "labels.jsonl")

AuditPath is the audit trail's path relative to the project root.

Functions

This section is empty.

Types

type AuditRecord

type AuditRecord struct {
	meaninglabels.Event
	// Columns lists revealed columns for meaning.field.revealed_locally; it
	// never holds values.
	Columns []string `json:"columns,omitempty"`
}

AuditRecord is one line of the local audit trail.

type Store

type Store struct {
	Dir string
}

Store is the file-backed label store of one project directory.

func (Store) Append

func (s Store) Append(record AuditRecord) error

Append adds one record to the project's audit trail.

func (Store) Load

Load reads the document; a project with no file has an empty document with revision "".

func (Store) Save

func (s Store) Save(ctx context.Context, doc meaninglabels.Document, ifRevision string) error

Save writes doc atomically under a lock if the stored revision is still ifRevision.

Jump to

Keyboard shortcuts

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