Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientMethodName ¶
ClientMethodName returns the public Go method for a registry operation id.
func ClientParameterName ¶
ClientParameterName returns the public Go field for an HTTP parameter wire name.
Types ¶
type ClientOperation ¶
type ClientOperation struct {
ID string
Method string
Path string
Kind ClientOperationKind
Params []ClientParam
RequestBody any
Response any
ResponseVariants []any
Summary string
Stability string
RequestContentType string
ResponseContentType string
}
ClientOperation is the transport-neutral input to the public client generator.
type ClientOperationKind ¶
type ClientOperationKind string
ClientOperationKind selects the generated response transport.
const ( ClientOperationJSON ClientOperationKind = "json" ClientOperationSSE ClientOperationKind = "sse" )
type ClientOptions ¶
type ClientOptions struct {
PackageName string
Header string
Reserved []string
Types []ClientType
// StringTypes identifies domain enums whose JSON wire representation is a string.
StringTypes map[reflect.Type]bool
}
ClientOptions defines the generated package and the identifiers owned by its runtime.
type ClientParam ¶
type ClientParam struct {
Name string
In string
GoType string
GoName string
Required bool
Enum []string
}
ClientParam describes a scalar HTTP parameter without depending on the API registry.
type ClientType ¶
ClientType seeds a DTO used by a hand-written public operation.
type Result ¶
Result is the complete deterministic Go SDK contract tree.
func GenerateClient ¶
func GenerateClient(operations []ClientOperation, opts ClientOptions) (Result, error)
GenerateClient renders deterministic, stdlib-only client methods and DTOs.