Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONMaterializer ¶ added in v0.6.8
type JSONMaterializer struct{}
JSONMaterializer reads the node tree from a mache SQLite DB and writes it as a hierarchical JSON file. Directories become nested objects with a "children" array; files become leaf objects with "content" and "size".
Uses parent_id + name traversal (same as BoltDB materializer) so node names containing slashes or special characters are handled correctly.
Output is written atomically: data goes to a temp file first, then os.Rename replaces the target path.
func (*JSONMaterializer) Materialize ¶ added in v0.6.8
func (m *JSONMaterializer) Materialize(srcDB, outPath string) error
type Materializer ¶
Materializer writes a projected node tree (from a mache SQLite DB) to an output format.
func ForFormat ¶
func ForFormat(format string) (Materializer, error)
ForFormat returns the appropriate Materializer for the given format string.
type SQLiteMaterializer ¶
type SQLiteMaterializer struct{}
SQLiteMaterializer copies the source DB as-is to the output path.
func (*SQLiteMaterializer) Materialize ¶
func (m *SQLiteMaterializer) Materialize(srcDB, outPath string) error
type ZIPMaterializer ¶
type ZIPMaterializer struct{}
ZIPMaterializer reads the node tree from a mache SQLite DB and writes all file nodes (kind=0) with non-NULL content as entries in a ZIP archive. Directory nodes are implicit (paths contain slashes).
func (*ZIPMaterializer) Materialize ¶
func (m *ZIPMaterializer) Materialize(srcDB, outPath string) error