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.
Click to show internal directories.
Click to hide internal directories.