Documentation
¶
Overview ¶
Package aipcli provides runtime APIs for generated CLIs.
Index ¶
- Constants
- func IsVerbose(cmd *cobra.Command) bool
- func NewCommand(cmd *cobra.Command, commands ...*cobra.Command) *cobra.Command
- func NewIAMModuleCommand(name string, config Config) *cobra.Command
- func NewMethodCommand(config Config, method protoreflect.MethodDescriptor, in proto.Message, ...) *cobra.Command
- func NewModuleCommand(use string, short string, config Config, commands ...*cobra.Command) *cobra.Command
- func NewServiceCommand(config Config, service protoreflect.ServiceDescriptor, ...) *cobra.Command
- type CompletionFunc
- type Config
- type IdentityTokenFile
Constants ¶
View Source
const (
FieldResourceName = "name"
)
Variables ¶
This section is empty.
Functions ¶
func NewCommand ¶ added in v0.12.0
NewCommand initializes a new *cobra.Command with AIP CLI flags and help functions.
func NewIAMModuleCommand ¶ added in v0.11.0
NewIAMModuleCommand returns a *cobra.Command for standard IAM operations.
func NewMethodCommand ¶ added in v0.7.0
func NewMethodCommand( config Config, method protoreflect.MethodDescriptor, in proto.Message, out proto.Message, comments map[protoreflect.FullName]string, ) *cobra.Command
NewMethodCommand initializes a new *cobra.Command for the provided gRPC method.
func NewModuleCommand ¶ added in v0.10.0
func NewModuleCommand( use string, short string, config Config, commands ...*cobra.Command, ) *cobra.Command
NewModuleCommand initializes a new *cobra.Command for a CLI module. A module is a collection of services with a common CLI config.
func NewServiceCommand ¶ added in v0.7.0
func NewServiceCommand( config Config, service protoreflect.ServiceDescriptor, comments map[protoreflect.FullName]string, commands ...*cobra.Command, ) *cobra.Command
NewServiceCommand initializes a new *cobra.Command for the provided gRPC service.
Types ¶
type CompletionFunc ¶
type Config ¶
type Config struct { // Hosts is a map from host ID to host address. Hosts map[string]string // DefaultHost is the host ID of the default host. DefaultHost string // RootPath is where the root file will be located. RootPath string // Root is the name of the root module package. Root string // GoogleCloudIdentityTokens indicates if Google Cloud Identity Tokens should be automatically generated. GoogleCloudIdentityTokens bool // Uses in a predetermined file relative to local config path for the Identity Token. CachedIdentityTokenPath string }
Config is the configuration for the protoc-gen-go-aip-cli plugin.
type IdentityTokenFile ¶ added in v0.20.0
type IdentityTokenFile struct {
IdentityToken string
}
Click to show internal directories.
Click to hide internal directories.