cli

package
v0.11.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ClientDependencyInjectionStrategy_name = map[int32]string{
		0: "InjectIntoContext",
		1: "InjectAsArgument",
	}
	ClientDependencyInjectionStrategy_value = map[string]int32{
		"InjectIntoContext": 0,
		"InjectAsArgument":  1,
	}
)

Enum value maps for ClientDependencyInjectionStrategy.

View Source
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.

View Source
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.

View Source
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.

View Source
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.

View Source
var File_github_com_rancher_opni_internal_codegen_cli_cli_proto protoreflect.FileDescriptor

Functions

func AddOutputFlag

func AddOutputFlag(cmd *cobra.Command)

func RenderOutput

func RenderOutput(cmd *cobra.Command, response proto.Message)

Types

type ClientDependencyInjectionStrategy

type ClientDependencyInjectionStrategy int32
const (
	ClientDependencyInjectionStrategy_InjectIntoContext ClientDependencyInjectionStrategy = 0
	ClientDependencyInjectionStrategy_InjectAsArgument  ClientDependencyInjectionStrategy = 1
)

func (ClientDependencyInjectionStrategy) Descriptor

func (ClientDependencyInjectionStrategy) Enum

func (ClientDependencyInjectionStrategy) EnumDescriptor deprecated

func (ClientDependencyInjectionStrategy) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClientDependencyInjectionStrategy.Descriptor instead.

func (ClientDependencyInjectionStrategy) Number

func (ClientDependencyInjectionStrategy) String

func (ClientDependencyInjectionStrategy) Type

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"`
	// contains filtered or unexported fields
}

func (*CommandGroupOptions) Descriptor deprecated

func (*CommandGroupOptions) Descriptor() ([]byte, []int)

Deprecated: Use CommandGroupOptions.ProtoReflect.Descriptor instead.

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"`
	RequiredFlags []string `protobuf:"bytes,25603,rep,name=required_flags,json=requiredFlags,proto3" json:"required_flags,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandOptions) Descriptor deprecated

func (*CommandOptions) Descriptor() ([]byte, []int)

Deprecated: Use CommandOptions.ProtoReflect.Descriptor instead.

func (*CommandOptions) GetRequiredFlags

func (x *CommandOptions) GetRequiredFlags() []string

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 FlagOptions

type FlagOptions struct {
	Default      string `protobuf:"bytes,1,opt,name=default,proto3" 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"`
	// contains filtered or unexported fields
}

func (*FlagSetOptions) Descriptor deprecated

func (*FlagSetOptions) Descriptor() ([]byte, []int)

Deprecated: Use FlagSetOptions.ProtoReflect.Descriptor instead.

func (*FlagSetOptions) ForEachDefault

func (f *FlagSetOptions) ForEachDefault(fieldMessage *protogen.Message, fn func(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool)

func (*FlagSetOptions) GetDefault

func (x *FlagSetOptions) GetDefault() *anypb.Any

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

func (*Generator) Generate

func (cg *Generator) Generate(gen *protogen.Plugin) error

func (Generator) Name

func (cg Generator) Name() string

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"`
	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) 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.

type Writer

type Writer interface {
	Print(i ...any)
	Println(i ...any)
	Printf(format string, i ...any)
	PrintErr(i ...any)
	PrintErrln(i ...any)
	PrintErrf(format string, i ...any)
}

Jump to

Keyboard shortcuts

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