No description
Find a file
Snider 3f4462db08
Some checks failed
CI / test (push) Has been cancelled
CI / auto-fix (push) Has been cancelled
CI / auto-merge (push) Has been cancelled
fix(store): swap sqlite to duckdb
Co-Authored-By: Virgil <virgil@lethean.io>
2026-05-14 21:25:42 +01:00
.core chore: sync workspace dependencies 2026-03-15 15:44:44 +00:00
.github/workflows ci: add Core ecosystem CI workflow with CodeRabbit auto-fix 2026-03-22 00:25:20 +00:00
.idea fix: use UK English spelling throughout 2026-03-15 10:10:46 +00:00
docs fix(store): export ErrNotDirectory sentinel and fix duplicate RFC method entries 2026-04-05 13:37:12 +01:00
external chore(repo): refresh submodules + go.work hygiene (Phase 2 cascade unblock) 2026-05-01 09:40:06 +01:00
go fix(store): swap sqlite to duckdb 2026-05-14 21:25:42 +01:00
tests/cli/io chore(sonar): address 166 code smells (5.5 lane) 2026-04-30 15:42:02 +01:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:49 +00:00
.gitmodules refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1238) 2026-04-30 19:58:56 +01:00
.woodpecker.yml ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-29 00:03:10 +01:00
AGENTS.md refactor(core): align go-io with full v0.9.1 reference shape 2026-04-29 03:53:19 +01:00
CLAUDE.md merge: resolve dev←github/main conflicts — accept dev restructure 2026-04-05 11:34:36 +01:00
CONSUMERS.md chore(deps): migrate go-log import to dappco.re/go/core/log v0.1.0 2026-03-22 01:28:41 +00:00
go.work refactor(go): restructure to /go/ subtree + audit COMPLIANT (Mantis #1238) 2026-04-30 19:58:56 +01:00
LICENCE chore: add EUPL-1.2 LICENCE file (UK English canonical) 2026-05-01 08:34:22 +01:00
README.md refactor(core): align go-io with full v0.9.1 reference shape 2026-04-29 03:53:19 +01:00
RFC.md feat(io): Windows compile path — portable linkInfo via core.Lstat 2026-05-12 20:34:50 +01:00
sonar-project.properties ci: woodpecker pipeline (Go) — golangci-lint/eslint/phpstan + sonar.lthn.sh 2026-04-29 00:03:10 +01:00

go-io

dappco.re/go/io is the Core storage boundary. It gives callers one Medium interface for file-like operations while letting the backing store be local disk, memory, S3, SQLite, WebDAV, SFTP, GitHub, a Borg DataNode, or an encrypted workspace.

The point of the module is containment. Application code can read, write, list, stream, rename, and delete through a Medium without taking a direct dependency on host filesystem APIs. Backends decide how paths are normalized, how metadata is represented, and which operations are no-ops or remote calls.

Quick Start

memory := io.NewMemoryMedium()
_ = memory.Write("config/app.yaml", "port: 8080")

content, err := io.Read(memory, "config/app.yaml")
if err != nil {
    return err
}
_ = content

For host files, use io.NewSandboxed(root) or local.New(root) so paths stay under an explicit root. io.Local exists for process-level access, but service code should prefer scoped mediums.

Packages

  • io: the Medium interface, copy helpers, in-memory medium, file info and directory entry helpers, and Core action registration.
  • local: sandboxed local filesystem backend.
  • s3, pkg/medium/sftp, pkg/medium/webdav, pkg/medium/github, pkg/medium/pwa: remote or protocol-backed mediums.
  • sqlite and store: database-backed storage and key-value storage.
  • node and datanode: in-memory tree backends with tar snapshot support.
  • cube: encrypted medium wrapper and archive packing helpers.
  • sigil: reversible and one-way byte transformations used by cube and workspace encryption.
  • workspace: medium-backed workspace services and RFC command DTOs.
  • pkg/api: Gin provider exposing the I/O action and medium surfaces over HTTP.

Development Gate

Run the repository with workspace mode disabled:

GOWORK=off go mod tidy
GOWORK=off go vet ./...
GOWORK=off go test -count=1 ./...
gofmt -l .
bash /Users/snider/Code/core/go/tests/cli/v090-upgrade/audit.sh .

The audit is part of the contract. Public symbols need sibling triplet tests and sibling examples, test files use Core assertions, and direct imports of wrapped stdlib packages are not accepted in repository Go files.