mirivlad
|
69eb909d48
|
step 3: nodes repository + CRUD + CLI node commands
- types.go: TypeSpace/Case/Folder/Note/... + Slugify()
- node.go: Node struct, Meta, IsDeleted/IsRoot helpers
- repository.go: full CRUD (Create, Get, GetActive, ListChildren,
ListRoots, UpdateTitle, Move, SoftDelete) + Meta KV (MetaSet,
MetaGet, MetaList)
- node_cmd.go: thin wrappers around repository
- main.go: verstak node create/list/get/move/delete subcommands
- repository_test.go: 12 tests covering all CRUD paths
Acceptance: go build pass, go test pass (12 tests),
CLI create+list+get+move+delete all working.
|
2026-05-30 19:09:25 +08:00 |
mirivlad
|
b8d8427c46
|
step 2: init command + SQLite storage + migrations + config
- storage.go: DB wrapper, migration runner (in-code SQL strings)
- migrations.go: 001_init (nodes + node_meta + indexes)
- vault.go: Init() creates .verstak/ dirs, config.yml, index.db
- config.go: YAML config read/write
- util/uuid.go: UUIDv7 generator
- cmd/verstak/main.go: init --vault PATH command
- main_test.go: TestInitCreatesVault, TestInitConfigYAML
Acceptance: go build ./... pass, go test ./... pass
Init creates test-vault with .verstak/index.db + config.yml
Repeat Init is safe.
|
2026-05-30 18:58:47 +08:00 |