Documentation
¶
Overview ¶
Package command 根据操作登记构建普通 STX CLI 命令。 Package command builds regular STX CLI commands from the operation registry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
func Build(specs []operation.OperationSpec, clientFactory ClientFactory) ([]*cobra.Command, error)
Build 构建登记项对应的 Cobra 顶级命令。 Build creates top-level Cobra commands for the supplied registry entries.
Types ¶
type Client ¶
type Client interface {
Capabilities(ctx context.Context) (string, cliClient.CapabilityData, error)
Request(ctx context.Context, method, path string, requestBody any, result any) (string, error)
RequestWithHeaders(ctx context.Context, method, path string, requestBody any, headers map[string]string, result any) (string, error)
}
Client 是登记命令执行时使用的最小远端客户端接口。 Client is the minimal remote client contract used by generated commands.
type ClientFactory ¶
ClientFactory 根据本地命名空间创建远端客户端。 ClientFactory creates a remote client for one local namespace.
Click to show internal directories.
Click to hide internal directories.