Documentation
¶
Overview ¶
Package recordexport builds immutable, checksummed copies without changing the original records. Missing/racing/unrecorded material is always explicit.
Index ¶
- Constants
- Variables
- func Redact(data []byte) []byte
- func RedactJSON(out io.WriteCloser) io.WriteCloser
- type Builder
- func (b *Builder) Finish(zipPath string) (checksum string, size int64, err error)
- func (b *Builder) Index() error
- func (b *Builder) JSON(name string, v any) error
- func (b *Builder) Omit(p, reason string)
- func (b *Builder) Open(name string) (io.WriteCloser, error)
- func (b *Builder) Transcript(source, prefix string) error
- func (b *Builder) Tree(source, prefix string, cutoff time.Time) error
- func (b *Builder) Write(name string, data []byte) error
- type Entry
- type Manifest
- type Omission
Constants ¶
View Source
const MaxFiles = 200000
Variables ¶
View Source
var ErrCapacity = errors.New("record export exceeds file/byte capacity")
Functions ¶
func RedactJSON ¶
func RedactJSON(out io.WriteCloser) io.WriteCloser
JSON rows remain valid JSON. Raw binary files are omitted separately.
Types ¶
type Builder ¶
type Builder struct {
Dir string
Manifest Manifest
Limit, Bytes int64
// contains filtered or unexported fields
}
func (*Builder) Transcript ¶
Transcript copies only complete records at/before the database snapshot. It reads at most the initial file length, so concurrent appends cannot prolong it.
type Manifest ¶
type Manifest struct {
Format int `json:"format"`
TaskIDs []int64 `json:"task_ids"`
Cutoff time.Time `json:"database_cutoff"`
CompletedAt time.Time `json:"completed_at"`
Redacted bool `json:"redacted"`
Files []Entry `json:"files"`
Omissions []Omission `json:"omissions"`
Notes []string `json:"notes"`
}
Click to show internal directories.
Click to hide internal directories.