sdk

package
v0.1.125 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package sdk generates the client SDKs from a project's operations. The TypeScript client, imported as @lidza/client, is written to .lidza/client and regenerated whenever the Go types change.

Index

Constants

View Source
const ClientDir = ".lidza/client"

ClientDir is where the TypeScript client lives, relative to the project root. The template aliases @lidza/client to ClientDir/index.ts.

Variables

This section is empty.

Functions

func Dart

func Dart(c *inspect.Context) map[string]string

Dart renders the Dart client package (`lidza_client`, on package:http): types as classes with fromJson and toJson, enums with their wire values, and one method per operation on LidzaClient. Files are keyed by path inside the package directory.

func TypeScript

func TypeScript(c *inspect.Context) map[string]string

TypeScript renders the client as files keyed by name: types.ts (the component schemas as interfaces and unions), client.ts (one function per operation) and index.ts.

func WriteDart

func WriteDart(root, dir string, c *inspect.Context) error

WriteDart writes the package into dir (relative to root), touching only files whose content changed.

func WriteTypeScript

func WriteTypeScript(root string, c *inspect.Context) error

WriteTypeScript writes the client into root/.lidza/client, touching only files whose content changed so Vite does not reload needlessly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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