Go API Reference
Keywords
openme Go API, openme Go package, SPA Go library, pkgsite, golang knock protocol
The openme Go API reference is auto-generated from source code comments and published at:
→ pkg.go.dev/github.com/merlos/openme/cli
This mirrors the standard godoc format and is updated whenever a new version is pushed.
Packages
| Package | Description |
|---|---|
pkg/protocol |
Wire format constants, packet serialisation, error types |
internal/crypto |
Key generation, ECDH, encryption, signing |
internal/config |
Config structs, YAML loading/saving, port mode logic |
internal/server |
UDP listener, packet verification, replay cache |
internal/client |
Packet builder, knock sender, health check |
internal/firewall |
iptables and nftables backends, rule expiry manager, live session state (SessionEntry, ServerState, ReadState) |
internal/qr |
QR code generation for client provisioning |
Generating Locally
# Install pkgsite
go install golang.org/x/pkgsite/cmd/pkgsite@latest
# From the cli/ directory
cd cli
pkgsite -open .This opens a local pkg.go.dev-style documentation server at http://localhost:8080.
Documentation Standards
All exported symbols in openme are documented. The conventions are:
- Package-level comments describe the package’s purpose and usage pattern
- Function comments describe parameters, return values, and error conditions
- Type comments describe the purpose and invariants of each field
When adding new exported symbols, follow the same style as existing ones — start with the symbol name and use complete sentences.