diene.go-interfaces

module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT

README

Diene Go interfaces library

CI Unit coverage Integration coverage Meta coverage Go Reference Commit activity

Diene's reproducible development environment is managed by Nix. Run direnv allow once, then use pls tasks from the loaded shell.

This repository inherits the all-features workspace baseline: split CI/CD, secrets, release configuration, validators, standards, and vendored agent-skill synchronization.

Commands

  • pls setup — synchronize installed diene package skills.
  • pls lint — run every pre-commit gate.
  • pls secret:scan — scan tracked content for secrets.
  • pls skills:sync — rebuild .claude/skills/vendor/ from installed packages.

Publishable Go module

github.com/AtomiCloud/diene.go-interfaces is the Go family's implementation-free seam library. It defines portable system, virtual filesystem, terminal, logging, and metrics contracts, with ordinary (T, error) failure slots. Every non-nil seam error carries a problem-typed error from diene.go-errors-problems; this module ships deterministic in-memory mocks in its consumer-facing testhelper package.

go get github.com/AtomiCloud/diene.go-interfaces@latest
package main

import (
	"context"
	"fmt"

	"github.com/AtomiCloud/diene.go-interfaces/testhelper"
)

func main() {
	ctx := context.Background()
	system := testhelper.NewInMemorySystem(testhelper.InMemorySystemOptions{})
	vfs := testhelper.NewInMemoryVfs(testhelper.InMemoryVfsOptions{})

	now, err := system.NowUTC()
	if err != nil {
		panic(err)
	}

	exists, err := vfs.Exists(ctx, "/")
	if err != nil {
		panic(err)
	}

	fmt.Println(now, exists)
}

Go commands

  • pls build — build every package in the module.
  • pls typecheck — compile every source package without running tests.
  • pls test / pls test:coverage — run unit, integration, and active meta tiers.
  • pls deadcode — run strict whole-repository and production passes plus the LLM-lax report.
  • pls up / pls down — start or stop local Redis.
  • ./scripts/ci/pkg-validate.sh all — run module-path, vet, API, docs, and example validators.

See the Go baseline for the language contract and template-maintenance boundary. See the Go library baseline for promotion, testing, compatibility, and publication policy.

Standards

Shared standards

Domain-specific documentation belongs under docs/domain/. The docs/standards/contracts/ location is reserved for the separately owned C0 contracts standard.

Go language variants

Directories

Path Synopsis
lib
interfaces
Package interfaces defines implementation-free seams for system, virtual filesystem, terminal, logging, and metrics work.
Package interfaces defines implementation-free seams for system, virtual filesystem, terminal, logging, and metrics work.
Package testhelper provides deterministic in-memory implementations of the interfaces package for consumer tests.
Package testhelper provides deterministic in-memory implementations of the interfaces package for consumer tests.
internal/faults
Package faults centralizes the canonical problem minting and error normalization shared by the testhelper mocks.
Package faults centralizes the canonical problem minting and error normalization shared by the testhelper mocks.
internal/vfsstore
Package vfsstore holds the stateful, byte-backed virtual filesystem algorithms behind the testhelper InMemoryVfs.
Package vfsstore holds the stateful, byte-backed virtual filesystem algorithms behind the testhelper InMemoryVfs.

Jump to

Keyboard shortcuts

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