Documentation ¶
Index ¶
- Variables
- func AddOutputFlag(cmd *cobra.Command)
- func RenderOutput(cmd *cobra.Command, response proto.Message)
- type ClientDependencyInjectionStrategy
- func (ClientDependencyInjectionStrategy) Descriptor() protoreflect.EnumDescriptor
- func (x ClientDependencyInjectionStrategy) Enum() *ClientDependencyInjectionStrategy
- func (ClientDependencyInjectionStrategy) EnumDescriptor() ([]byte, []int)deprecated
- func (x ClientDependencyInjectionStrategy) Number() protoreflect.EnumNumber
- func (x ClientDependencyInjectionStrategy) String() string
- func (ClientDependencyInjectionStrategy) Type() protoreflect.EnumType
- type CommandGroupOptions
- func (*CommandGroupOptions) Descriptor() ([]byte, []int)deprecated
- func (x *CommandGroupOptions) GetEnableHooks() bool
- func (x *CommandGroupOptions) GetGroupId() string
- func (x *CommandGroupOptions) GetUse() string
- func (*CommandGroupOptions) ProtoMessage()
- func (x *CommandGroupOptions) ProtoReflect() protoreflect.Message
- func (x *CommandGroupOptions) Reset()
- func (x *CommandGroupOptions) String() string
- type CommandOptions
- func (*CommandOptions) Descriptor() ([]byte, []int)deprecated
- func (x *CommandOptions) GetAliases() []string
- func (x *CommandOptions) GetEnableHooks() bool
- func (x *CommandOptions) GetGranularity() EditScope
- func (x *CommandOptions) GetRequiredFlags() []string
- func (x *CommandOptions) GetSkip() bool
- func (x *CommandOptions) GetUse() string
- func (*CommandOptions) ProtoMessage()
- func (x *CommandOptions) ProtoReflect() protoreflect.Message
- func (x *CommandOptions) Reset()
- func (x *CommandOptions) String() string
- type EditScope
- type FlagOptions
- func (*FlagOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FlagOptions) GetDefault() string
- func (x *FlagOptions) GetEnv() string
- func (x *FlagOptions) GetSecret() bool
- func (x *FlagOptions) GetSkip() bool
- func (x *FlagOptions) GetTypeOverride() string
- func (*FlagOptions) ProtoMessage()
- func (x *FlagOptions) ProtoReflect() protoreflect.Message
- func (x *FlagOptions) Reset()
- func (x *FlagOptions) String() string
- type FlagSetOptions
- func (*FlagSetOptions) Descriptor() ([]byte, []int)deprecated
- func (x *FlagSetOptions) GetDefault() *anypb.Any
- func (x *FlagSetOptions) GetNoPrefix() bool
- func (*FlagSetOptions) ProtoMessage()
- func (x *FlagSetOptions) ProtoReflect() protoreflect.Message
- func (x *FlagSetOptions) Reset()
- func (x *FlagSetOptions) String() string
- type Generator
- type GeneratorOptions
- func (*GeneratorOptions) Descriptor() ([]byte, []int)deprecated
- func (x *GeneratorOptions) GetClientDependencyInjection() ClientDependencyInjectionStrategy
- func (x *GeneratorOptions) GetGenerate() bool
- func (x *GeneratorOptions) GetGenerateDeepcopy() bool
- func (x *GeneratorOptions) GetGenerateFlagsForAllMessages() bool
- func (*GeneratorOptions) ProtoMessage()
- func (x *GeneratorOptions) ProtoReflect() protoreflect.Message
- func (x *GeneratorOptions) Reset()
- func (x *GeneratorOptions) String() string
- type TextRenderer
- type Writer
Constants ¶
This section is empty.
Variables ¶
var ( ClientDependencyInjectionStrategy_name = map[int32]string{ 0: "InjectIntoContext", 1: "InjectAsArgument", } ClientDependencyInjectionStrategy_value = map[string]int32{ "InjectIntoContext": 0, "InjectAsArgument": 1, } )
Enum value maps for ClientDependencyInjectionStrategy.
var ( EditScope_name = map[int32]string{ 0: "EditFields", 1: "EditMessage", } EditScope_value = map[string]int32{ "EditFields": 0, "EditMessage": 1, } )
Enum value maps for EditScope.
var ( // optional cli.FlagOptions flag = 25601; E_Flag = &file_github_com_rancher_opni_internal_codegen_cli_cli_proto_extTypes[1] // optional cli.FlagSetOptions flag_set = 25602; E_FlagSet = &file_github_com_rancher_opni_internal_codegen_cli_cli_proto_extTypes[2] )
Extension fields to descriptorpb.FieldOptions.
var (
// optional cli.CommandOptions command = 25600;
E_Command = &file_github_com_rancher_opni_internal_codegen_cli_cli_proto_extTypes[4]
)
Extension fields to descriptorpb.MethodOptions.
var (
// optional cli.CommandGroupOptions command_group = 25600;
E_CommandGroup = &file_github_com_rancher_opni_internal_codegen_cli_cli_proto_extTypes[3]
)
Extension fields to descriptorpb.ServiceOptions.
var (
// optional cli.GeneratorOptions generator = 25600;
E_Generator = &file_github_com_rancher_opni_internal_codegen_cli_cli_proto_extTypes[0]
)
Extension fields to descriptorpb.FileOptions.
var File_github_com_rancher_opni_internal_codegen_cli_cli_proto protoreflect.FileDescriptor
Functions ¶
func AddOutputFlag ¶
Types ¶
type ClientDependencyInjectionStrategy ¶
type ClientDependencyInjectionStrategy int32
const ( ClientDependencyInjectionStrategy_InjectIntoContext ClientDependencyInjectionStrategy = 0 ClientDependencyInjectionStrategy_InjectAsArgument ClientDependencyInjectionStrategy = 1 )
func (ClientDependencyInjectionStrategy) Descriptor ¶
func (ClientDependencyInjectionStrategy) Descriptor() protoreflect.EnumDescriptor
func (ClientDependencyInjectionStrategy) Enum ¶
func (x ClientDependencyInjectionStrategy) Enum() *ClientDependencyInjectionStrategy
func (ClientDependencyInjectionStrategy) EnumDescriptor
deprecated
func (ClientDependencyInjectionStrategy) EnumDescriptor() ([]byte, []int)
Deprecated: Use ClientDependencyInjectionStrategy.Descriptor instead.
func (ClientDependencyInjectionStrategy) Number ¶
func (x ClientDependencyInjectionStrategy) Number() protoreflect.EnumNumber
func (ClientDependencyInjectionStrategy) String ¶
func (x ClientDependencyInjectionStrategy) String() string
func (ClientDependencyInjectionStrategy) Type ¶
func (ClientDependencyInjectionStrategy) Type() protoreflect.EnumType
type CommandGroupOptions ¶
type CommandGroupOptions struct { Use string `protobuf:"bytes,25601,opt,name=use,proto3" json:"use,omitempty"` GroupId string `protobuf:"bytes,25602,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` EnableHooks bool `protobuf:"varint,25603,opt,name=enable_hooks,json=enableHooks,proto3" json:"enable_hooks,omitempty"` // contains filtered or unexported fields }
func (*CommandGroupOptions) Descriptor
deprecated
func (*CommandGroupOptions) Descriptor() ([]byte, []int)
Deprecated: Use CommandGroupOptions.ProtoReflect.Descriptor instead.
func (*CommandGroupOptions) GetEnableHooks ¶ added in v0.12.0
func (x *CommandGroupOptions) GetEnableHooks() bool
func (*CommandGroupOptions) GetGroupId ¶
func (x *CommandGroupOptions) GetGroupId() string
func (*CommandGroupOptions) GetUse ¶
func (x *CommandGroupOptions) GetUse() string
func (*CommandGroupOptions) ProtoMessage ¶
func (*CommandGroupOptions) ProtoMessage()
func (*CommandGroupOptions) ProtoReflect ¶
func (x *CommandGroupOptions) ProtoReflect() protoreflect.Message
func (*CommandGroupOptions) Reset ¶
func (x *CommandGroupOptions) Reset()
func (*CommandGroupOptions) String ¶
func (x *CommandGroupOptions) String() string
type CommandOptions ¶
type CommandOptions struct { Use string `protobuf:"bytes,25601,opt,name=use,proto3" json:"use,omitempty"` Aliases []string `protobuf:"bytes,25602,rep,name=aliases,proto3" json:"aliases,omitempty"` RequiredFlags []string `protobuf:"bytes,25603,rep,name=required_flags,json=requiredFlags,proto3" json:"required_flags,omitempty"` Skip bool `protobuf:"varint,25604,opt,name=skip,proto3" json:"skip,omitempty"` EnableHooks bool `protobuf:"varint,25605,opt,name=enable_hooks,json=enableHooks,proto3" json:"enable_hooks,omitempty"` Granularity EditScope `protobuf:"varint,25606,opt,name=granularity,proto3,enum=cli.EditScope" json:"granularity,omitempty"` // contains filtered or unexported fields }
func (*CommandOptions) Descriptor
deprecated
func (*CommandOptions) Descriptor() ([]byte, []int)
Deprecated: Use CommandOptions.ProtoReflect.Descriptor instead.
func (*CommandOptions) GetAliases ¶ added in v0.12.0
func (x *CommandOptions) GetAliases() []string
func (*CommandOptions) GetEnableHooks ¶ added in v0.12.0
func (x *CommandOptions) GetEnableHooks() bool
func (*CommandOptions) GetGranularity ¶ added in v0.12.0
func (x *CommandOptions) GetGranularity() EditScope
func (*CommandOptions) GetRequiredFlags ¶
func (x *CommandOptions) GetRequiredFlags() []string
func (*CommandOptions) GetSkip ¶ added in v0.12.0
func (x *CommandOptions) GetSkip() bool
func (*CommandOptions) GetUse ¶
func (x *CommandOptions) GetUse() string
func (*CommandOptions) ProtoMessage ¶
func (*CommandOptions) ProtoMessage()
func (*CommandOptions) ProtoReflect ¶
func (x *CommandOptions) ProtoReflect() protoreflect.Message
func (*CommandOptions) Reset ¶
func (x *CommandOptions) Reset()
func (*CommandOptions) String ¶
func (x *CommandOptions) String() string
type EditScope ¶ added in v0.12.0
type EditScope int32
const ( // Allows all individual fields of the message to be edited individually. // This option generates flags and uses them in the CLI. EditScope_EditFields EditScope = 0 // The whole message is edited as a single unit. This option does not use // flags, but instead enables editing the message with an editor, or from // a file. EditScope_EditMessage EditScope = 1 )
func (EditScope) Descriptor ¶ added in v0.12.0
func (EditScope) Descriptor() protoreflect.EnumDescriptor
func (EditScope) EnumDescriptor
deprecated
added in
v0.12.0
func (EditScope) Number ¶ added in v0.12.0
func (x EditScope) Number() protoreflect.EnumNumber
func (EditScope) Type ¶ added in v0.12.0
func (EditScope) Type() protoreflect.EnumType
type FlagOptions ¶
type FlagOptions struct { Default *string `protobuf:"bytes,1,opt,name=default,proto3,oneof" json:"default,omitempty"` Env string `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` Secret bool `protobuf:"varint,3,opt,name=secret,proto3" json:"secret,omitempty"` TypeOverride string `protobuf:"bytes,4,opt,name=type_override,json=typeOverride,proto3" json:"type_override,omitempty"` Skip bool `protobuf:"varint,5,opt,name=skip,proto3" json:"skip,omitempty"` // contains filtered or unexported fields }
func (*FlagOptions) Descriptor
deprecated
func (*FlagOptions) Descriptor() ([]byte, []int)
Deprecated: Use FlagOptions.ProtoReflect.Descriptor instead.
func (*FlagOptions) GetDefault ¶
func (x *FlagOptions) GetDefault() string
func (*FlagOptions) GetEnv ¶
func (x *FlagOptions) GetEnv() string
func (*FlagOptions) GetSecret ¶
func (x *FlagOptions) GetSecret() bool
func (*FlagOptions) GetSkip ¶
func (x *FlagOptions) GetSkip() bool
func (*FlagOptions) GetTypeOverride ¶
func (x *FlagOptions) GetTypeOverride() string
func (*FlagOptions) ProtoMessage ¶
func (*FlagOptions) ProtoMessage()
func (*FlagOptions) ProtoReflect ¶
func (x *FlagOptions) ProtoReflect() protoreflect.Message
func (*FlagOptions) Reset ¶
func (x *FlagOptions) Reset()
func (*FlagOptions) String ¶
func (x *FlagOptions) String() string
type FlagSetOptions ¶
type FlagSetOptions struct { Default *anypb.Any `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"` NoPrefix bool `protobuf:"varint,2,opt,name=no_prefix,json=noPrefix,proto3" json:"no_prefix,omitempty"` // contains filtered or unexported fields }
func (*FlagSetOptions) Descriptor
deprecated
func (*FlagSetOptions) Descriptor() ([]byte, []int)
Deprecated: Use FlagSetOptions.ProtoReflect.Descriptor instead.
func (*FlagSetOptions) GetDefault ¶
func (x *FlagSetOptions) GetDefault() *anypb.Any
func (*FlagSetOptions) GetNoPrefix ¶ added in v0.12.0
func (x *FlagSetOptions) GetNoPrefix() bool
func (*FlagSetOptions) ProtoMessage ¶
func (*FlagSetOptions) ProtoMessage()
func (*FlagSetOptions) ProtoReflect ¶
func (x *FlagSetOptions) ProtoReflect() protoreflect.Message
func (*FlagSetOptions) Reset ¶
func (x *FlagSetOptions) Reset()
func (*FlagSetOptions) String ¶
func (x *FlagSetOptions) String() string
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
func NewGenerator ¶
func NewGenerator() *Generator
type GeneratorOptions ¶
type GeneratorOptions struct { Generate bool `protobuf:"varint,1,opt,name=generate,proto3" json:"generate,omitempty"` GenerateDeepcopy bool `protobuf:"varint,2,opt,name=generate_deepcopy,json=generateDeepcopy,proto3" json:"generate_deepcopy,omitempty"` GenerateFlagsForAllMessages bool `` /* 149-byte string literal not displayed */ ClientDependencyInjection ClientDependencyInjectionStrategy `` /* 182-byte string literal not displayed */ // contains filtered or unexported fields }
func (*GeneratorOptions) Descriptor
deprecated
func (*GeneratorOptions) Descriptor() ([]byte, []int)
Deprecated: Use GeneratorOptions.ProtoReflect.Descriptor instead.
func (*GeneratorOptions) GetClientDependencyInjection ¶
func (x *GeneratorOptions) GetClientDependencyInjection() ClientDependencyInjectionStrategy
func (*GeneratorOptions) GetGenerate ¶
func (x *GeneratorOptions) GetGenerate() bool
func (*GeneratorOptions) GetGenerateDeepcopy ¶
func (x *GeneratorOptions) GetGenerateDeepcopy() bool
func (*GeneratorOptions) GetGenerateFlagsForAllMessages ¶ added in v0.12.0
func (x *GeneratorOptions) GetGenerateFlagsForAllMessages() bool
func (*GeneratorOptions) ProtoMessage ¶
func (*GeneratorOptions) ProtoMessage()
func (*GeneratorOptions) ProtoReflect ¶
func (x *GeneratorOptions) ProtoReflect() protoreflect.Message
func (*GeneratorOptions) Reset ¶
func (x *GeneratorOptions) Reset()
func (*GeneratorOptions) String ¶
func (x *GeneratorOptions) String() string
type TextRenderer ¶
type TextRenderer interface { // RenderText renders the message to the given writer in a human-readable // format. RenderText(out Writer) }
An optional interface that can be implemented by an RPC response type to control how it is rendered to the user.