sdk

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: LGPL-3.0 Imports: 18 Imported by: 0

Documentation

Overview

Package sdk implements `world sdk` — generate a typed SDK (Go + C#) from a backend's Go command structs, via buf+protoc in Docker. Authoring rules are enforced by the generator's lint (it names the fix per violation) and documented on GenerateCmd.Run; run `world sdk generate --help` for usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Generate *GenerateCmd `cmd:"" help:"Generate the typed SDK (Go + C#) from backend wire types"`
}

Cmd is the `world sdk` command group.

type GenerateCmd

type GenerateCmd struct {
	Source string `arg:"" help:"Backend dir, or a remote git URL/owner/repo, to scan for commands, events, components and system events"`

	GoOut string `` /* 241-byte string literal not displayed */
	CsOut string `help:"Directory to write generated C# (client SDK) into"`
	// NoEmit stops the run after the report. Discovery and classification are untouched — only emission
	// is dropped — so the findings are exactly the ones a real run would act on. It writes nothing, which
	// is also why it cannot stub a missing --go-out package: a backend whose wire.gen.go imports a gen/
	// tree that does not exist yet has to generate once before it can be reported on.
	NoEmit bool `` /* 174-byte string literal not displayed */
	// ProtoOut is a debugging aid, not a build input, and is slated for deprecation. Nothing in
	// generation or in CI reads the exported schema — buf's module is the hand-written proto/ tree, so
	// these files are not under a breaking check — and the backends that once persisted it
	// (rampage-backend, the world-engine plugins) keep no copy. It stays so the wire contract can be
	// read by hand; retiring it means deleting the flag, ownProtos, writeProtos, and the --go-out
	// requirement below.
	ProtoOut      string `` /* 440-byte string literal not displayed */
	GoVersion     string `help:"override protoc-gen-go version (default: repo-pinned)"`
	CSharpVersion string `help:"override C#/protoc version (default: repo-pinned)"`
	Ref           string `help:"git branch/tag/commit to clone when source is a remote URL"`
}

func (*GenerateCmd) Run

func (c *GenerateCmd) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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