pluginv1

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CommandProvider_GetCommands_FullMethodName = "/orca.plugin.v1.CommandProvider/GetCommands"
	CommandProvider_Execute_FullMethodName     = "/orca.plugin.v1.CommandProvider/Execute"
)

Variables

View Source
var (
	FlagType_name = map[int32]string{
		0: "FLAG_TYPE_STRING",
		1: "FLAG_TYPE_BOOL",
	}
	FlagType_value = map[string]int32{
		"FLAG_TYPE_STRING": 0,
		"FLAG_TYPE_BOOL":   1,
	}
)

Enum value maps for FlagType.

View Source
var CommandProvider_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "orca.plugin.v1.CommandProvider",
	HandlerType: (*CommandProviderServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetCommands",
			Handler:    _CommandProvider_GetCommands_Handler,
		},
		{
			MethodName: "Execute",
			Handler:    _CommandProvider_Execute_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "orca/plugin/v1/plugin.proto",
}

CommandProvider_ServiceDesc is the grpc.ServiceDesc for CommandProvider service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_orca_plugin_v1_plugin_proto protoreflect.FileDescriptor

Functions

func RegisterCommandProviderServer

func RegisterCommandProviderServer(s grpc.ServiceRegistrar, srv CommandProviderServer)

Types

type CommandProviderClient

type CommandProviderClient interface {
	// GetCommands returns the command tree the plugin wants registered.
	GetCommands(ctx context.Context, in *GetCommandsRequest, opts ...grpc.CallOption) (*GetCommandsResponse, error)
	// Execute runs a leaf command previously returned by GetCommands.
	Execute(ctx context.Context, in *ExecuteRequest, opts ...grpc.CallOption) (*ExecuteResponse, error)
}

CommandProviderClient is the client API for CommandProvider service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

CommandProvider is implemented by plugins that contribute CLI commands to orca.

type CommandProviderServer

type CommandProviderServer interface {
	// GetCommands returns the command tree the plugin wants registered.
	GetCommands(context.Context, *GetCommandsRequest) (*GetCommandsResponse, error)
	// Execute runs a leaf command previously returned by GetCommands.
	Execute(context.Context, *ExecuteRequest) (*ExecuteResponse, error)
	// contains filtered or unexported methods
}

CommandProviderServer is the server API for CommandProvider service. All implementations must embed UnimplementedCommandProviderServer for forward compatibility.

CommandProvider is implemented by plugins that contribute CLI commands to orca.

type CommandSpec

type CommandSpec struct {
	Use         string         `protobuf:"bytes,1,opt,name=use,proto3" json:"use,omitempty"`
	Short       string         `protobuf:"bytes,2,opt,name=short,proto3" json:"short,omitempty"`
	Long        string         `protobuf:"bytes,3,opt,name=long,proto3" json:"long,omitempty"`
	Flags       []*FlagSpec    `protobuf:"bytes,4,rep,name=flags,proto3" json:"flags,omitempty"`
	Subcommands []*CommandSpec `protobuf:"bytes,5,rep,name=subcommands,proto3" json:"subcommands,omitempty"`
	// contains filtered or unexported fields
}

func (*CommandSpec) Descriptor deprecated

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

Deprecated: Use CommandSpec.ProtoReflect.Descriptor instead.

func (*CommandSpec) GetFlags

func (x *CommandSpec) GetFlags() []*FlagSpec

func (*CommandSpec) GetLong

func (x *CommandSpec) GetLong() string

func (*CommandSpec) GetShort

func (x *CommandSpec) GetShort() string

func (*CommandSpec) GetSubcommands

func (x *CommandSpec) GetSubcommands() []*CommandSpec

func (*CommandSpec) GetUse

func (x *CommandSpec) GetUse() string

func (*CommandSpec) ProtoMessage

func (*CommandSpec) ProtoMessage()

func (*CommandSpec) ProtoReflect

func (x *CommandSpec) ProtoReflect() protoreflect.Message

func (*CommandSpec) Reset

func (x *CommandSpec) Reset()

func (*CommandSpec) String

func (x *CommandSpec) String() string

type ExecuteRequest

type ExecuteRequest struct {

	// Names of the commands from the plugin's top-level command down to the leaf
	// being executed, e.g. ["k8s", "ctx"].
	CommandPath []string `protobuf:"bytes,1,rep,name=command_path,json=commandPath,proto3" json:"command_path,omitempty"`
	Args        []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
	// Flag values keyed by flag name, encoded as strings.
	Flags map[string]string `` /* 137-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ExecuteRequest) Descriptor deprecated

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

Deprecated: Use ExecuteRequest.ProtoReflect.Descriptor instead.

func (*ExecuteRequest) GetArgs

func (x *ExecuteRequest) GetArgs() []string

func (*ExecuteRequest) GetCommandPath

func (x *ExecuteRequest) GetCommandPath() []string

func (*ExecuteRequest) GetFlags

func (x *ExecuteRequest) GetFlags() map[string]string

func (*ExecuteRequest) ProtoMessage

func (*ExecuteRequest) ProtoMessage()

func (*ExecuteRequest) ProtoReflect

func (x *ExecuteRequest) ProtoReflect() protoreflect.Message

func (*ExecuteRequest) Reset

func (x *ExecuteRequest) Reset()

func (*ExecuteRequest) String

func (x *ExecuteRequest) String() string

type ExecuteResponse

type ExecuteResponse struct {
	ExitCode int32  `protobuf:"varint,1,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"`
	Error    string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ExecuteResponse) Descriptor deprecated

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

Deprecated: Use ExecuteResponse.ProtoReflect.Descriptor instead.

func (*ExecuteResponse) GetError

func (x *ExecuteResponse) GetError() string

func (*ExecuteResponse) GetExitCode

func (x *ExecuteResponse) GetExitCode() int32

func (*ExecuteResponse) ProtoMessage

func (*ExecuteResponse) ProtoMessage()

func (*ExecuteResponse) ProtoReflect

func (x *ExecuteResponse) ProtoReflect() protoreflect.Message

func (*ExecuteResponse) Reset

func (x *ExecuteResponse) Reset()

func (*ExecuteResponse) String

func (x *ExecuteResponse) String() string

type FlagSpec

type FlagSpec struct {
	Name      string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Shorthand string   `protobuf:"bytes,2,opt,name=shorthand,proto3" json:"shorthand,omitempty"`
	Usage     string   `protobuf:"bytes,3,opt,name=usage,proto3" json:"usage,omitempty"`
	Type      FlagType `protobuf:"varint,4,opt,name=type,proto3,enum=orca.plugin.v1.FlagType" json:"type,omitempty"`
	// Default value, encoded as a string regardless of type.
	Default string `protobuf:"bytes,5,opt,name=default,proto3" json:"default,omitempty"`
	// contains filtered or unexported fields
}

func (*FlagSpec) Descriptor deprecated

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

Deprecated: Use FlagSpec.ProtoReflect.Descriptor instead.

func (*FlagSpec) GetDefault

func (x *FlagSpec) GetDefault() string

func (*FlagSpec) GetName

func (x *FlagSpec) GetName() string

func (*FlagSpec) GetShorthand

func (x *FlagSpec) GetShorthand() string

func (*FlagSpec) GetType

func (x *FlagSpec) GetType() FlagType

func (*FlagSpec) GetUsage

func (x *FlagSpec) GetUsage() string

func (*FlagSpec) ProtoMessage

func (*FlagSpec) ProtoMessage()

func (*FlagSpec) ProtoReflect

func (x *FlagSpec) ProtoReflect() protoreflect.Message

func (*FlagSpec) Reset

func (x *FlagSpec) Reset()

func (*FlagSpec) String

func (x *FlagSpec) String() string

type FlagType

type FlagType int32
const (
	FlagType_FLAG_TYPE_STRING FlagType = 0
	FlagType_FLAG_TYPE_BOOL   FlagType = 1
)

func (FlagType) Descriptor

func (FlagType) Descriptor() protoreflect.EnumDescriptor

func (FlagType) Enum

func (x FlagType) Enum() *FlagType

func (FlagType) EnumDescriptor deprecated

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

Deprecated: Use FlagType.Descriptor instead.

func (FlagType) Number

func (x FlagType) Number() protoreflect.EnumNumber

func (FlagType) String

func (x FlagType) String() string

func (FlagType) Type

type GetCommandsRequest

type GetCommandsRequest struct {
	// contains filtered or unexported fields
}

func (*GetCommandsRequest) Descriptor deprecated

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

Deprecated: Use GetCommandsRequest.ProtoReflect.Descriptor instead.

func (*GetCommandsRequest) ProtoMessage

func (*GetCommandsRequest) ProtoMessage()

func (*GetCommandsRequest) ProtoReflect

func (x *GetCommandsRequest) ProtoReflect() protoreflect.Message

func (*GetCommandsRequest) Reset

func (x *GetCommandsRequest) Reset()

func (*GetCommandsRequest) String

func (x *GetCommandsRequest) String() string

type GetCommandsResponse

type GetCommandsResponse struct {
	Commands []*CommandSpec `protobuf:"bytes,1,rep,name=commands,proto3" json:"commands,omitempty"`
	// contains filtered or unexported fields
}

func (*GetCommandsResponse) Descriptor deprecated

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

Deprecated: Use GetCommandsResponse.ProtoReflect.Descriptor instead.

func (*GetCommandsResponse) GetCommands

func (x *GetCommandsResponse) GetCommands() []*CommandSpec

func (*GetCommandsResponse) ProtoMessage

func (*GetCommandsResponse) ProtoMessage()

func (*GetCommandsResponse) ProtoReflect

func (x *GetCommandsResponse) ProtoReflect() protoreflect.Message

func (*GetCommandsResponse) Reset

func (x *GetCommandsResponse) Reset()

func (*GetCommandsResponse) String

func (x *GetCommandsResponse) String() string

type UnimplementedCommandProviderServer

type UnimplementedCommandProviderServer struct{}

UnimplementedCommandProviderServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedCommandProviderServer) Execute

func (UnimplementedCommandProviderServer) GetCommands

type UnsafeCommandProviderServer

type UnsafeCommandProviderServer interface {
	// contains filtered or unexported methods
}

UnsafeCommandProviderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CommandProviderServer will result in compilation errors.

Jump to

Keyboard shortcuts

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