client

package
v0.1.0-rc.71 Latest Latest
Warning

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

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

Documentation

Overview

Package client is `w17ctl client`: egress clients — a third-party REST API, from its OpenAPI document, as a signed generated gRPC client under `<proto root>/clients/<name>/` (docs/todos/egress-rest-client.md).

Not to be confused with `w17ctl target client`, which declares the project's OWN generated frontend clients. These are clients of somebody else's API.

The client is dumb here as everywhere (public-split §4): it fetches or reads the document (transport), streams it to the console, and writes back what the console returns, verbatim. Which operations exist, how they map to proto and the signature over the result are the console's.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Generate GenerateCmd `` /* 317-byte string literal not displayed */
	Update   UpdateCmd   `` /* 170-byte string literal not displayed */
	List     ListCmd     `cmd:"" help:"List the project's clients: name, source, selection."`
	Remove   RemoveCmd   `cmd:"" help:"Delete a client's directory (proto/clients/<name>/)."`
}

Cmd is `w17ctl client`.

type GenerateCmd

type GenerateCmd struct {
	Source    string   `arg:"" help:"The OpenAPI document: an http(s) URL, or a path to a JSON or YAML file."`
	Name      string   `` /* 152-byte string literal not displayed */
	Endpoint  []string `` /* 181-byte string literal not displayed */
	Operation []string `name:"operation" help:"An operation to include, by its operationId. Repeatable."`
	Console   string   `` /* 160-byte string literal not displayed */
	Force     bool     `` /* 158-byte string literal not displayed */
}

GenerateCmd is `w17ctl client generate`.

func (*GenerateCmd) Run

func (c *GenerateCmd) Run() error

type ListCmd

type ListCmd struct{}

ListCmd is `w17ctl client list`.

func (*ListCmd) Run

func (c *ListCmd) Run() error

type RemoveCmd

type RemoveCmd struct {
	Name string `arg:"" help:"The client to delete."`
}

RemoveCmd is `w17ctl client remove`.

func (*RemoveCmd) Run

func (c *RemoveCmd) Run() error

type UpdateCmd

type UpdateCmd struct {
	Name      string   `arg:"" help:"The client to regenerate."`
	Source    string   `name:"source" help:"Fetch the document from here instead of the recorded source (and record this one)."`
	Endpoint  []string `name:"endpoint" help:"Replace the recorded selection: an operation as its request line. Repeatable."`
	Operation []string `name:"operation" help:"Replace the recorded selection: an operationId. Repeatable."`
	Console   string   `name:"console" placeholder:"HOST:PORT" env:"W17_CONSOLE_ADDR" help:"gRPC endpoint of the console."`
}

UpdateCmd is `w17ctl client update`.

func (*UpdateCmd) Run

func (c *UpdateCmd) Run() error

Jump to

Keyboard shortcuts

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