Documentation
¶
Index ¶
- func NewCmdServiceMethod(f *cmdutil.Factory, svc meta.Service, m meta.Method, name, resName string, ...) *cobra.Command
- func NewCmdServiceMethodWithContext(ctx context.Context, f *cmdutil.Factory, svc meta.Service, m meta.Method, ...) *cobra.Command
- func RegisterServiceCommands(parent *cobra.Command, f *cmdutil.Factory)
- func RegisterServiceCommandsWithContext(ctx context.Context, parent *cobra.Command, f *cmdutil.Factory)
- type ServiceMethodOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdServiceMethod ¶
func NewCmdServiceMethod(f *cmdutil.Factory, svc meta.Service, m meta.Method, name, resName string, runF func(*ServiceMethodOptions) error) *cobra.Command
NewCmdServiceMethod creates a command for a dynamically registered service method.
func NewCmdServiceMethodWithContext ¶ added in v1.0.16
func NewCmdServiceMethodWithContext(ctx context.Context, f *cmdutil.Factory, svc meta.Service, m meta.Method, name, resName string, runF func(*ServiceMethodOptions) error) *cobra.Command
NewCmdServiceMethodWithContext builds the command for one service method from its (service, resource, method) coordinates, deriving the methodCommandSpec via an apicatalog.MethodRef so direct callers and the catalog-driven registration assemble the command identically.
func RegisterServiceCommands ¶
RegisterServiceCommands registers all service commands from from_meta specs.
Types ¶
type ServiceMethodOptions ¶
type ServiceMethodOptions struct {
Factory *cmdutil.Factory
Cmd *cobra.Command
Ctx context.Context
ServicePath string
Method meta.Method
SchemaPath string
// Flags
Params string
Data string
As core.Identity
Output string
PageAll bool
PageLimit int
PageDelay int
Format string
JqExpr string
DryRun bool
File string // --file flag value
FileFields []string // auto-detected file field names from metadata
// contains filtered or unexported fields
}
ServiceMethodOptions holds all inputs for a dynamically registered service method command.
Click to show internal directories.
Click to hide internal directories.