target

package
v0.1.0-rc.13 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryCmd

type BinaryCmd struct {
	Compose   BinaryComposeCmd   `` /* 173-byte string literal not displayed */
	List      BinaryListCmd      `cmd:"" help:"List the composed binaries declared in the lock."`
	Decompose BinaryDecomposeCmd `cmd:"" help:"Remove a domain's composed-binary declaration (revert to standalone per-component binaries). Re-signs on save."`
}

BinaryCmd is the parent of `w17ctl target binary <leaf>` — compose / list / decompose. It manages the lock's `binaries[]` surface (binary-composition feature): folding several of a domain's generated components into ONE binary instead of the default one-binary-per-component layout.

Block 2 §8.2: the console owns the lock. compose / decompose go through the console's EditLock (which validates the combo + re-signs); list reads through DescribeLock. The component-combo rules + the derived binary name live server-side.

type BinaryComposeCmd

type BinaryComposeCmd struct {
	Domain     string `arg:"" help:"Domain whose components to compose (matches proto/domains/<DOMAIN>/)."`
	Components string `` /* 283-byte string literal not displayed */
	LockPath   string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console    string `` /* 176-byte string literal not displayed */
}

BinaryComposeCmd implements `w17ctl target binary compose <domain> --components gateway,admin`. It sets (or replaces) the domain's `binaries[]` entry. The binary name is DERIVED from the component set server-side: a storage-bearing set → `<domain>-server` (full tier stack), else a gateway set → `<domain>-gateway`.

func (*BinaryComposeCmd) Run

func (c *BinaryComposeCmd) Run() error

type BinaryDecomposeCmd

type BinaryDecomposeCmd struct {
	Domain   string `arg:"" help:"Domain whose composed-binary declaration to remove (revert to standalone)."`
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

BinaryDecomposeCmd implements `w17ctl target binary decompose <domain>`.

func (*BinaryDecomposeCmd) Run

func (c *BinaryDecomposeCmd) Run() error

type BinaryListCmd

type BinaryListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

BinaryListCmd implements `w17ctl target binary list`.

func (*BinaryListCmd) Run

func (c *BinaryListCmd) Run() error

type BusinessAddCmd

type BusinessAddCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */

	Domain   string   `` /* 141-byte string literal not displayed */
	Register string   `` /* 197-byte string literal not displayed */
	Env      []string `` /* 331-byte string literal not displayed */
}

BusinessAddCmd implements `w17ctl target business add`. Domain + register are required; env is an optional repeatable declaration of the bundle's env-var surface (parsed + validated server-side).

func (*BusinessAddCmd) Run

func (c *BusinessAddCmd) Run() error

type BusinessCmd

type BusinessCmd struct {
	Add  BusinessAddCmd  `` /* 181-byte string literal not displayed */
	List BusinessListCmd `cmd:"" help:"List the business_bundles[] entries declared in the lock."`
}

BusinessCmd is the parent of `w17ctl target business <leaf>` — add / list. It closes the same lock-edit ergonomic gap that `grpc-client add` closed for grpc_clients[], but for the `generated_code.business_bundles[]` declarations codegen reads to emit a `<domain>-business` bundle: the generated runtime + the plugin-parallel gen package (EnvConfig / HandlerRegistry / ClientSet) the project's hand-written RegisterBusiness consumes.

Block 2 §8.2: the console owns the lock. add goes through the console's EditLock (which parses + validates the env specs, rejects a duplicate domain, and re-signs); list reads through DescribeLock.

type BusinessListCmd

type BusinessListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

BusinessListCmd implements `w17ctl target business list`.

func (*BusinessListCmd) Run

func (c *BusinessListCmd) Run() error

type CiAddCmd

type CiAddCmd struct {
	Provider string `arg:"" help:"CI provider to generate e2e CI for: github|gitlab|circleci|azure|bitbucket|jenkins|generic."`
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

CiAddCmd implements `w17ctl target ci add <provider>`. It appends (or no-ops on) the provider's `ci_configs[]` entry. The output path (`w17/ci/<provider>/`) is derived, so there's nothing else to name.

func (*CiAddCmd) Run

func (c *CiAddCmd) Run() error

type CiCmd

type CiCmd struct {
	Add    CiAddCmd    `` /* 129-byte string literal not displayed */
	List   CiListCmd   `cmd:"" help:"List the CI providers declared in the lock."`
	Remove CiRemoveCmd `cmd:"" help:"Remove a CI provider's declaration (stop generating its config). Re-signs on save."`
}

CiCmd is the parent of `w17ctl target ci <leaf>` — add / list / remove. It manages the lock's `ci_configs[]` surface (the opt-in for generated e2e CI). Each entry names one CI provider; codegen renders a self-contained, w17ctl-driven CI config under `w17/ci/<provider>/` that the consumer copies into its CI's canonical location (the compiler never touches the repo root — Zero-Code Isolation).

Block 2 §8.2: the console owns the lock. add / remove go through the console's EditLock (which validates the provider name + re-signs); list reads through DescribeLock.

type CiListCmd

type CiListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

CiListCmd implements `w17ctl target ci list`.

func (*CiListCmd) Run

func (c *CiListCmd) Run() error

type CiRemoveCmd

type CiRemoveCmd struct {
	Provider string `arg:"" help:"CI provider whose declaration to remove (stop generating its config)."`
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

CiRemoveCmd implements `w17ctl target ci remove <provider>`.

func (*CiRemoveCmd) Run

func (c *CiRemoveCmd) Run() error

type ClientAddCmd

type ClientAddCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */

	// Non-interactive overrides — when every flag is set the
	// wizard skips prompting + runs straight to validation +
	// save. Useful for CI / scripts that already know the answers.
	Framework  string `name:"framework"  placeholder:"NAME" help:"Skip prompt for framework. One of: core, react, react-native, vue."`
	Language   string `name:"language"   placeholder:"NAME" help:"Skip prompt for language. One of: typescript, javascript."`
	OutputRoot string `name:"output-root" placeholder:"PATH" help:"Skip prompt for output root."`
	Wire       string `name:"wire"        placeholder:"NAME" help:"Skip prompt for wire format. One of: json, protobuf, unspecified."`
	// RestSurface scopes the client to one `(w17.rest_api)` surface by
	// name. Empty keeps the whole-project shape, where every method must
	// be REST-addressable — right for a project whose entire API is its
	// REST API, and impossible for one that keeps most of itself on gRPC.
	RestSurface string `` /* 200-byte string literal not displayed */
}

ClientAddCmd implements `w17ctl target client add`. Wizard prompts:

  1. Framework — pick from CORE / REACT / REACT_NATIVE / VUE.
  2. Language — pick from TYPESCRIPT / JAVASCRIPT.
  3. Output root — project-relative path the w17client binary writes generated files under (convention: `ui/w17/web-client` for web, `ui/w17/mobile-client` for RN).
  4. Wire format — pick from JSON / PROTOBUF / UNSPECIFIED (UNSPECIFIED defaults to JSON at codegen time, ack'd historical default).

Refuses if the output_root is already claimed by another clients[] entry (the validator on lock save enforces uniqueness; wizard surfaces the diag earlier with a clearer message).

func (*ClientAddCmd) Run

func (c *ClientAddCmd) Run() error

type ClientCmd

type ClientCmd struct {
	Add      ClientAddCmd      `` /* 146-byte string literal not displayed */
	List     ClientListCmd     `cmd:"" help:"List the generated-client entries declared in the lock."`
	Generate ClientGenerateCmd `cmd:"" help:"Generate the FE client tree(s) declared in generated_code.clients[] (formerly the standalone w17client binary)."`
}

ClientCmd is the parent of `w17ctl target client <leaf>` commands — add / list / generate.

Block 2 §8.2: the console owns the lock. The add wizard appends one entry to `generated_code.clients[]` (the FE client codegen output declarations) via the console's EditLock (which maps the framework/language/wire tokens to the lock enums + re-signs); list reads through DescribeLock. (generate is codegen orchestration — it still loads the lock for the console address + proto dir, migrated with the rest of the codegen path.)

type ClientGenerateCmd

type ClientGenerateCmd struct {
	Lock        string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file (relative paths resolve from cwd)."`
	ProtoRoot   string `` /* 139-byte string literal not displayed */
	ProjectRoot string `name:"project-root" placeholder:"DIR" help:"Project root for resolving output_root in lock.clients[] (default cwd)."`
	Console     string `` /* 211-byte string literal not displayed */
}

ClientGenerateCmd implements `w17ctl target client generate` — the FE client codegen formerly shipped as the standalone `w17client` binary. As a thin client it uploads the proto set + the signed lock to the console's GenerateClient RPC, which runs the generator server-side, and writes the returned trees under each client's output_root (thin-client refactor Step 3a).

func (*ClientGenerateCmd) Run

func (c *ClientGenerateCmd) Run() error

type ClientListCmd

type ClientListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

ClientListCmd implements `w17ctl target client list`. One client per line, framework + language + output root + wire format surfaced in the friendly shape.

func (*ClientListCmd) Run

func (c *ClientListCmd) Run() error

type Cmd

type Cmd struct {
	Client     ClientCmd     `` /* 145-byte string literal not displayed */
	GrpcClient GrpcClientCmd `` /* 207-byte string literal not displayed */
	Business   BusinessCmd   `` /* 223-byte string literal not displayed */
	Binary     BinaryCmd     `` /* 191-byte string literal not displayed */
	Ci         CiCmd         `` /* 191-byte string literal not displayed */
	Scale      ScaleCmd      `` /* 232-byte string literal not displayed */
}

Cmd is the `w17ctl target <kind> …` parent — the editors for the lock's `generated_code` declarations. Every subcommand mutates a `generated_code.*` slot of the SIGNED lock (re-signing on save), so they share one section: client (clients[]), grpc-client (grpc_clients[]), business (business_bundles[]), binary (binaries[]), ci (ci_configs[]), scale (replicas[]).

These are code-AGNOSTIC project settings — WHAT codegen emits + HOW it deploys — not API surface (that's proto). They live in the lock because the lock is signed for codegen reproducibility (every dev shares the same one); the signature is why they need a command rather than a hand-edit.

type GrpcClientAddCmd

type GrpcClientAddCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */

	// Non-interactive overrides — when --language is set the
	// wizard skips prompting + runs straight to validation + save.
	Language   string `name:"language"    placeholder:"NAME" help:"Skip prompt for language. One of: go. Empty = ask (default go)."`
	OutputRoot string `` /* 143-byte string literal not displayed */
}

GrpcClientAddCmd implements `w17ctl target grpc-client add`. The GrpcClient lock message carries only language + output_root; for Go leave output_root empty so it derives from the lock's `stubs` (<stubs>/clients). Set it only to override that default.

func (*GrpcClientAddCmd) Run

func (c *GrpcClientAddCmd) Run() error

type GrpcClientCmd

type GrpcClientCmd struct {
	Add  GrpcClientAddCmd  `` /* 131-byte string literal not displayed */
	List GrpcClientListCmd `cmd:"" help:"List the grpc_clients[] entries declared in the lock."`
}

GrpcClientCmd is the parent of `w17ctl target grpc-client <leaf>` — add / list. Manages the `generated_code.grpc_clients[]` declarations codegen reads to render the project's Go gRPC `clients` package (the dependency-inversion seam a hand-written business binary builds its downstream clients from — see srcgo/gen/clients/<domain>/<tier>).

Block 2 §8.2: the console owns the lock. The add goes through the console's EditLock (which re-signs); the list + the wizard's duplicate-output_root check read through DescribeLock.

type GrpcClientListCmd

type GrpcClientListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

GrpcClientListCmd implements `w17ctl target grpc-client list`.

func (*GrpcClientListCmd) Run

func (c *GrpcClientListCmd) Run() error

type ScaleCmd

type ScaleCmd struct {
	Set   ScaleSetCmd   `` /* 137-byte string literal not displayed */
	List  ScaleListCmd  `cmd:"" help:"List the per-service replica counts declared in the lock."`
	Unset ScaleUnsetCmd `cmd:"" help:"Remove a service's replica-count entry (revert to the single-replica default). Re-signs on save."`
}

ScaleCmd is the parent of `w17ctl target scale <leaf>` — set / list / unset. It manages the lock's `replicas[]` surface (storage gRPC proxy feature): the per-service PROD replica counts the generated Compose / k8s render.

Block 2 §8.2: the console owns the lock. These commands treat w17/lock.yaml as opaque bytes — the replica edit goes through the console's EditLock (which re-signs + runs the pre-sign Validate: count >= 1, no folded tier scaled past 1), the list read through DescribeLock.

The one load-bearing effect: a `<domain>-storage` bundle set past 1 materializes the storage gRPC proxy in the prod artifacts (S4). Single-replica tiers and composed single binaries never do.

type ScaleListCmd

type ScaleListCmd struct {
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

ScaleListCmd implements `w17ctl target scale list`.

func (*ScaleListCmd) Run

func (c *ScaleListCmd) Run() error

type ScaleSetCmd

type ScaleSetCmd struct {
	Service  string `arg:"" help:"Deployable bundle/service name (<domain>-storage, <domain>-gateway, <domain>-server, …)."`
	Count    int32  `arg:"" help:"Desired PROD replica count (>= 1). A <domain>-storage bundle > 1 materializes the storage gRPC proxy."`
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

ScaleSetCmd implements `w17ctl target scale set <service> <count>`. It sets (or replaces) the service's `replicas[]` entry. The service name is the deployable bundle name as it appears in the generated artifacts (`<domain>-storage`, `<domain>-gateway`, `<domain>-server`, …).

func (*ScaleSetCmd) Run

func (c *ScaleSetCmd) Run() error

type ScaleUnsetCmd

type ScaleUnsetCmd struct {
	Service  string `arg:"" help:"Service whose replica-count entry to remove (revert to single replica)."`
	LockPath string `name:"lock" placeholder:"PATH" default:"w17/lock.yaml" help:"Path to the lock file."`
	Console  string `` /* 176-byte string literal not displayed */
}

ScaleUnsetCmd implements `w17ctl target scale unset <service>`.

func (*ScaleUnsetCmd) Run

func (c *ScaleUnsetCmd) Run() error

Jump to

Keyboard shortcuts

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