vaultgen

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: MIT Imports: 13 Imported by: 0 modules, 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 vaultgen generates deterministic, fictional markdown vaults and link manifests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	Source string `json:"source"`
	Text   string `json:"text"`
	Start  int    `json:"start"`
	Kind   string `json:"kind"`
	Target string `json:"target"`
	Want   string `json:"want,omitzero"`
}

Link records exact markup, its byte offset and its expected resolution.

type Manifest

type Manifest struct {
	Seed        uint64   `json:"seed"`
	Notes       []string `json:"notes"`
	Attachments []string `json:"attachments"`
	Links       []Link   `json:"links"`
	Decoys      []Link   `json:"decoys"`
}

Manifest lists every file, real link and code-hidden decoy in a vault.

func Generate

func Generate(dir string, o Options) (Manifest, error)

Generate writes a vault of o.Notes notes into dir and returns its manifest. The destination must be missing or an empty directory.

type Options

type Options struct {
	Seed  uint64
	Notes int // Number of markdown files; at least 20.
}

Options controls the size and randomness of a generated vault.

Jump to

Keyboard shortcuts

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