Help us shape the future of Go! Take the 2026 Go Developer Survey

genremote

command
v0.90.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Command genremote generates the AuthKit remote SDK (authkit/remote) and the management-API method registry (authkit/server) from the authkit.Client interface in client.go — ONE source of truth for both transports (#142).

Run via `go generate ./...` (see the directive in remote/remote.go). It parses client.go with go/ast (stdlib only — no external deps), and for each interface method emits:

  • remote/methods_gen.go: a concrete method that marshals args to the wire and decodes the result, so *remote.Client satisfies authkit.Client.
  • server/methods_gen.go: a registry entry that decodes args, calls the method on any authkit.Client, and returns the result.

The wire is the generic POST /v1/call/{Method} contract: args are a JSON object keyed by parameter name; the result is the single non-error return (or, for multi-return methods, an object keyed r0/r1/…). Because both sides are generated from the same signatures, the transports cannot drift.

Jump to

Keyboard shortcuts

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