common

module
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: AGPL-3.0

README

common

ci codecov

Shared Go helpers for the Pilot Protocol. A small, pure-stdlib library with subpackages for durable file writes (fsutil) and Ed25519 identity operations (crypto).

Install

import (
    "github.com/pilot-protocol/common/fsutil"
    "github.com/pilot-protocol/common/crypto"
)

Usage

// Atomic file write — temp file + fsync + rename.
if err := fsutil.AtomicWrite(path, blob); err != nil {
    return err
}

// Ed25519 keypair + node-ID derivation.
id, err := crypto.NewIdentity()
sig := id.Sign(msg)
ok := crypto.Verify(id.PublicKey, msg, sig)

Layout

Package What it does
fsutil AtomicWrite(path, data), AppendSync(path, data) — durable file writes.
crypto Identity — Ed25519 keypair + node-ID derivation, signing, verification.

License

AGPL-3.0-or-later. See LICENSE.

// fix typo in docs

Directories

Path Synopsis
Package coreapi defines the L10 plugin runtime contract.
Package coreapi defines the L10 plugin runtime contract.
Package daemonapi is the dependency-free contract layer between the daemon engine and its plugins.
Package daemonapi is the dependency-free contract layer between the daemon engine and its plugins.
registry
wire
Package wire defines the binary wire format shared between the registry client and server.
Package wire defines the binary wire format shared between the registry client and server.
Package urlvalidate provides SSRF-prevention checks shared across packages that accept operator-supplied URLs (webhook endpoints, audit export sinks, identity provider verification callbacks, etc.).
Package urlvalidate provides SSRF-prevention checks shared across packages that accept operator-supplied URLs (webhook endpoints, audit export sinks, identity provider verification callbacks, etc.).

Jump to

Keyboard shortcuts

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