demofixtures

package
v0.148.0 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 demofixtures holds the files `datatug demo install` writes into the local demo project: the pinned Chinook SQLite database, a small inGitDB database of synthetic support notes, the curated Perimeter policy and the Meaning Graph sensitivity labels. Everything is embedded in the binary, so installing the demo needs no network; the Chinook bytes are checked against their pinned sha256 before they are written.

Index

Constants

View Source
const (
	ChinookSHA256       = "7651ba378ac2fcd0dfc3c66fb101f7a7eed3ba39a612ec642b96e20702061f15"
	ChinookSize   int64 = 1007616
)

ChinookSHA256 and ChinookSize pin the embedded Chinook SQLite file: the same fixture https://chinook.demodb.dev/data/chinook.sqlite serves.

View Source
const (
	ChinookPath = "data/chinook.sqlite"
	SupportPath = "data/support"
	PolicyPath  = "policies/agent.yaml"
	LabelsPath  = "datatug-labels.json"
	NoticePath  = "data/NOTICE.md"
)

Paths of the demo project files, relative to the project directory.

View Source
const (
	ChinookSource = "chinook"
	SupportSource = "support"
)

Source ids of the demo project.

Variables

This section is empty.

Functions

func Labels

func Labels() (meaninglabels.Document, error)

Labels is the demo's label document.

Types

type File

type File struct {
	Path    string // relative to the project directory, slash-separated
	Content []byte
	// Fixture marks a file whose bytes are pinned: a different file on disk
	// is refused (fail closed) rather than preserved.
	Fixture bool
}

File is one file of the demo project.

func Files

func Files() ([]File, error)

Files lists every file of the demo project, sorted by path. The Chinook bytes are verified against ChinookSHA256 and ChinookSize first.

func (File) SHA256

func (f File) SHA256() string

SHA256 is the hex sha256 of the content.

Jump to

Keyboard shortcuts

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