codegen

package
v0.1.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionDomain

func ConnectionDomain(name string) string

ConnectionDomain returns the segment before the first `-` in a `<domain>-<role>` connection name (e.g. "forge-postgres" → "forge"). Used for the PG init-dir mount path + the default user/db credentials in the dev compose.

func DialectFromConnectionName

func DialectFromConnectionName(name string) (string, bool)

DialectFromConnectionName picks the dialect from the connection-name `<domain>-<dialect>` suffix — the same convention the connection name follows everywhere (the dialect itself is declared in proto's (w17.module).connection, never stored in the lock). Excludes nats / s3, which don't appear in compose.w17.yaml as per-connection services (nats has its own block, s3 is versionless managed infrastructure).

func GenerateClientViaConsole

func GenerateClientViaConsole(root, console, protoDir, lockPath string) error

GenerateClientViaConsole renders the FE client tree(s) on the console's GenerateClient RPC (seam-D, thin-client refactor Step 3a) and writes them under each client's output_root. Uploads the proto tree + the signed lock (the generator reads generated_code.clients[] from it).

func GuideViaConsole

func GuideViaConsole(root, console string) error

GuideViaConsole fetches the w17 PLATFORM self-description (w17/specs/*) from the console's Guide RPC and writes it under the project root. The content is generated SERVER-SIDE from the compiler's own vocabulary, so it always matches the running compiler — a thin client of any version gets a current description. Takes no project input.

func Run

func Run(console string, force bool) error

Run is the package-level codegen entrypoint (invoked by the cmd/codegen kong command + stack build): it gathers the project's LOCAL inputs (proto tree, signed lock, go.module, go.mod dep-versions, the current gen Go tree, the co-dev env) and streams them to the console's GenerateProject RPC, which now owns ALL codegen orchestration server-side (surface detection, target derivation, composition, per-generator sequencing, file routing, the supersede-sweep — thin-client refactor Step 2). The client applies each streamed op under the project root with no derivation: write / write-if-missing / delete, plus the two LOCAL-disk merges it still owns (generated-go.mod replace preservation; the .po merge moved server-side) and go.work sync.

Types

This section is empty.

Jump to

Keyboard shortcuts

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