sdkgo

package
v0.3.0-beta.37 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientMethodName

func ClientMethodName(operationID string) string

ClientMethodName returns the public Go method for a registry operation id.

func ClientParameterName

func ClientParameterName(wireName string) string

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

type ClientType struct {
	Name  string
	Value any
}

ClientType seeds a DTO used by a hand-written public operation.

type Result

type Result struct {
	Files           map[string][]byte
	HostMethodCount int
	HookEventCount  int
}

Result is the complete deterministic Go SDK contract tree.

func Generate

func Generate() (Result, error)

Generate renders the public Go SDK contracts from the daemon contract authority.

func GenerateClient

func GenerateClient(operations []ClientOperation, opts ClientOptions) (Result, error)

GenerateClient renders deterministic, stdlib-only client methods and DTOs.

func (Result) FileNames

func (r Result) FileNames() []string

FileNames returns result paths in deterministic order.

Jump to

Keyboard shortcuts

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