generators

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FeatureREST              = "rest"
	FeatureWebSocket         = "websocket"
	FeatureSSE               = "sse"
	FeatureWebTransport      = "webtransport"
	FeatureAuth              = "auth"
	FeatureReconnection      = "reconnection"
	FeatureHeartbeat         = "heartbeat"
	FeatureStateManagement   = "state-management"
	FeatureTypedErrors       = "typed-errors"
	FeatureRequestRetry      = "request-retry"
	FeatureTimeout           = "timeout"
	FeatureMiddleware        = "middleware"
	FeatureLogging           = "logging"
	FeaturePolymorphicTypes  = "polymorphic-types"
	FeatureFileUpload        = "file-upload"
	FeatureStreamingResponse = "streaming-response"
)

Feature constants for common features

Variables

This section is empty.

Functions

This section is empty.

Types

type APISpec

type APISpec interface{}

APISpec is a forward declaration to avoid import cycle The actual type is defined in the client package

type Dependency

type Dependency struct {
	Name    string
	Version string
	Type    string // "direct", "dev", "peer"
}

Dependency represents a required dependency

type GeneratedClient

type GeneratedClient struct {
	// Files maps filename to file contents
	Files map[string]string

	// Instructions provides setup/usage instructions for the client
	Instructions string

	// Dependencies lists required dependencies
	Dependencies []Dependency

	// Language is the target language
	Language string

	// Version is the generated client version
	Version string
}

GeneratedClient represents the generated client code

type GeneratorConfig

type GeneratorConfig interface{}

GeneratorConfig is a forward declaration to avoid import cycle The actual type is defined in the client package

type LanguageGenerator

type LanguageGenerator interface {
	// Name returns the generator name (e.g., "go", "typescript")
	Name() string

	// SupportedFeatures returns a list of features this generator supports
	SupportedFeatures() []string

	// Generate produces client code from the API specification
	Generate(ctx context.Context, spec APISpec, config GeneratorConfig) (*GeneratedClient, error)

	// Validate checks if the spec can be generated for this language
	Validate(spec APISpec) error
}

LanguageGenerator defines the interface for language-specific client generators

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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