tart-guest-agent/internal/rpc/agent.pb.go

659 lines
18 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.6
// protoc (unknown)
// source: rpc/agent.proto
package rpc
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
_ "google.golang.org/protobuf/types/known/emptypb"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ExecRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Type:
//
// *ExecRequest_Command_
// *ExecRequest_StandardInput
// *ExecRequest_TerminalResize
Type isExecRequest_Type `protobuf_oneof:"type"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExecRequest) Reset() {
*x = ExecRequest{}
mi := &file_rpc_agent_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExecRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecRequest) ProtoMessage() {}
func (x *ExecRequest) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExecRequest.ProtoReflect.Descriptor instead.
func (*ExecRequest) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{0}
}
func (x *ExecRequest) GetType() isExecRequest_Type {
if x != nil {
return x.Type
}
return nil
}
func (x *ExecRequest) GetCommand() *ExecRequest_Command {
if x != nil {
if x, ok := x.Type.(*ExecRequest_Command_); ok {
return x.Command
}
}
return nil
}
func (x *ExecRequest) GetStandardInput() *IOChunk {
if x != nil {
if x, ok := x.Type.(*ExecRequest_StandardInput); ok {
return x.StandardInput
}
}
return nil
}
func (x *ExecRequest) GetTerminalResize() *TerminalSize {
if x != nil {
if x, ok := x.Type.(*ExecRequest_TerminalResize); ok {
return x.TerminalResize
}
}
return nil
}
type isExecRequest_Type interface {
isExecRequest_Type()
}
type ExecRequest_Command_ struct {
Command *ExecRequest_Command `protobuf:"bytes,1,opt,name=command,proto3,oneof"`
}
type ExecRequest_StandardInput struct {
StandardInput *IOChunk `protobuf:"bytes,2,opt,name=standard_input,json=standardInput,proto3,oneof"`
}
type ExecRequest_TerminalResize struct {
TerminalResize *TerminalSize `protobuf:"bytes,3,opt,name=terminal_resize,json=terminalResize,proto3,oneof"`
}
func (*ExecRequest_Command_) isExecRequest_Type() {}
func (*ExecRequest_StandardInput) isExecRequest_Type() {}
func (*ExecRequest_TerminalResize) isExecRequest_Type() {}
type ExecResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
// Types that are valid to be assigned to Type:
//
// *ExecResponse_Exit_
// *ExecResponse_StandardOutput
// *ExecResponse_StandardError
Type isExecResponse_Type `protobuf_oneof:"type"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExecResponse) Reset() {
*x = ExecResponse{}
mi := &file_rpc_agent_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExecResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecResponse) ProtoMessage() {}
func (x *ExecResponse) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExecResponse.ProtoReflect.Descriptor instead.
func (*ExecResponse) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{1}
}
func (x *ExecResponse) GetType() isExecResponse_Type {
if x != nil {
return x.Type
}
return nil
}
func (x *ExecResponse) GetExit() *ExecResponse_Exit {
if x != nil {
if x, ok := x.Type.(*ExecResponse_Exit_); ok {
return x.Exit
}
}
return nil
}
func (x *ExecResponse) GetStandardOutput() *IOChunk {
if x != nil {
if x, ok := x.Type.(*ExecResponse_StandardOutput); ok {
return x.StandardOutput
}
}
return nil
}
func (x *ExecResponse) GetStandardError() *IOChunk {
if x != nil {
if x, ok := x.Type.(*ExecResponse_StandardError); ok {
return x.StandardError
}
}
return nil
}
type isExecResponse_Type interface {
isExecResponse_Type()
}
type ExecResponse_Exit_ struct {
Exit *ExecResponse_Exit `protobuf:"bytes,1,opt,name=exit,proto3,oneof"`
}
type ExecResponse_StandardOutput struct {
StandardOutput *IOChunk `protobuf:"bytes,2,opt,name=standard_output,json=standardOutput,proto3,oneof"`
}
type ExecResponse_StandardError struct {
StandardError *IOChunk `protobuf:"bytes,3,opt,name=standard_error,json=standardError,proto3,oneof"`
}
func (*ExecResponse_Exit_) isExecResponse_Type() {}
func (*ExecResponse_StandardOutput) isExecResponse_Type() {}
func (*ExecResponse_StandardError) isExecResponse_Type() {}
type TerminalSize struct {
state protoimpl.MessageState `protogen:"open.v1"`
Rows uint32 `protobuf:"varint,1,opt,name=rows,proto3" json:"rows,omitempty"`
Cols uint32 `protobuf:"varint,2,opt,name=cols,proto3" json:"cols,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *TerminalSize) Reset() {
*x = TerminalSize{}
mi := &file_rpc_agent_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *TerminalSize) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TerminalSize) ProtoMessage() {}
func (x *TerminalSize) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TerminalSize.ProtoReflect.Descriptor instead.
func (*TerminalSize) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{2}
}
func (x *TerminalSize) GetRows() uint32 {
if x != nil {
return x.Rows
}
return 0
}
func (x *TerminalSize) GetCols() uint32 {
if x != nil {
return x.Cols
}
return 0
}
type IOChunk struct {
state protoimpl.MessageState `protogen:"open.v1"`
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *IOChunk) Reset() {
*x = IOChunk{}
mi := &file_rpc_agent_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *IOChunk) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IOChunk) ProtoMessage() {}
func (x *IOChunk) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IOChunk.ProtoReflect.Descriptor instead.
func (*IOChunk) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{3}
}
func (x *IOChunk) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
type ResolveIPRequest struct {
state protoimpl.MessageState `protogen:"open.v1"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ResolveIPRequest) Reset() {
*x = ResolveIPRequest{}
mi := &file_rpc_agent_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ResolveIPRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResolveIPRequest) ProtoMessage() {}
func (x *ResolveIPRequest) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResolveIPRequest.ProtoReflect.Descriptor instead.
func (*ResolveIPRequest) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{4}
}
type ResolveIPResponse struct {
state protoimpl.MessageState `protogen:"open.v1"`
Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ResolveIPResponse) Reset() {
*x = ResolveIPResponse{}
mi := &file_rpc_agent_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ResolveIPResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResolveIPResponse) ProtoMessage() {}
func (x *ResolveIPResponse) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[5]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResolveIPResponse.ProtoReflect.Descriptor instead.
func (*ResolveIPResponse) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{5}
}
func (x *ResolveIPResponse) GetIp() string {
if x != nil {
return x.Ip
}
return ""
}
type ExecRequest_Command struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Args []string `protobuf:"bytes,2,rep,name=args,proto3" json:"args,omitempty"`
Interactive bool `protobuf:"varint,3,opt,name=interactive,proto3" json:"interactive,omitempty"`
Tty bool `protobuf:"varint,4,opt,name=tty,proto3" json:"tty,omitempty"`
TerminalSize *TerminalSize `protobuf:"bytes,5,opt,name=terminal_size,json=terminalSize,proto3" json:"terminal_size,omitempty"`
Detach bool `protobuf:"varint,6,opt,name=detach,proto3" json:"detach,omitempty"`
Env map[string]string `protobuf:"bytes,7,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
Workdir string `protobuf:"bytes,8,opt,name=workdir,proto3" json:"workdir,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExecRequest_Command) Reset() {
*x = ExecRequest_Command{}
mi := &file_rpc_agent_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExecRequest_Command) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecRequest_Command) ProtoMessage() {}
func (x *ExecRequest_Command) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[6]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExecRequest_Command.ProtoReflect.Descriptor instead.
func (*ExecRequest_Command) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{0, 0}
}
func (x *ExecRequest_Command) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ExecRequest_Command) GetArgs() []string {
if x != nil {
return x.Args
}
return nil
}
func (x *ExecRequest_Command) GetInteractive() bool {
if x != nil {
return x.Interactive
}
return false
}
func (x *ExecRequest_Command) GetTty() bool {
if x != nil {
return x.Tty
}
return false
}
func (x *ExecRequest_Command) GetTerminalSize() *TerminalSize {
if x != nil {
return x.TerminalSize
}
return nil
}
func (x *ExecRequest_Command) GetDetach() bool {
if x != nil {
return x.Detach
}
return false
}
func (x *ExecRequest_Command) GetEnv() map[string]string {
if x != nil {
return x.Env
}
return nil
}
func (x *ExecRequest_Command) GetWorkdir() string {
if x != nil {
return x.Workdir
}
return ""
}
type ExecResponse_Exit struct {
state protoimpl.MessageState `protogen:"open.v1"`
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *ExecResponse_Exit) Reset() {
*x = ExecResponse_Exit{}
mi := &file_rpc_agent_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *ExecResponse_Exit) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ExecResponse_Exit) ProtoMessage() {}
func (x *ExecResponse_Exit) ProtoReflect() protoreflect.Message {
mi := &file_rpc_agent_proto_msgTypes[8]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ExecResponse_Exit.ProtoReflect.Descriptor instead.
func (*ExecResponse_Exit) Descriptor() ([]byte, []int) {
return file_rpc_agent_proto_rawDescGZIP(), []int{1, 0}
}
func (x *ExecResponse_Exit) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
var File_rpc_agent_proto protoreflect.FileDescriptor
const file_rpc_agent_proto_rawDesc = "" +
"\n" +
"\x0frpc/agent.proto\x1a\x1bgoogle/protobuf/empty.proto\"\xeb\x03\n" +
"\vExecRequest\x120\n" +
"\acommand\x18\x01 \x01(\v2\x14.ExecRequest.CommandH\x00R\acommand\x121\n" +
"\x0estandard_input\x18\x02 \x01(\v2\b.IOChunkH\x00R\rstandardInput\x128\n" +
"\x0fterminal_resize\x18\x03 \x01(\v2\r.TerminalSizeH\x00R\x0eterminalResize\x1a\xb4\x02\n" +
"\aCommand\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
"\x04args\x18\x02 \x03(\tR\x04args\x12 \n" +
"\vinteractive\x18\x03 \x01(\bR\vinteractive\x12\x10\n" +
"\x03tty\x18\x04 \x01(\bR\x03tty\x122\n" +
"\rterminal_size\x18\x05 \x01(\v2\r.TerminalSizeR\fterminalSize\x12\x16\n" +
"\x06detach\x18\x06 \x01(\bR\x06detach\x12/\n" +
"\x03env\x18\a \x03(\v2\x1d.ExecRequest.Command.EnvEntryR\x03env\x12\x18\n" +
"\aworkdir\x18\b \x01(\tR\aworkdir\x1a6\n" +
"\bEnvEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x06\n" +
"\x04type\"\xc4\x01\n" +
"\fExecResponse\x12(\n" +
"\x04exit\x18\x01 \x01(\v2\x12.ExecResponse.ExitH\x00R\x04exit\x123\n" +
"\x0fstandard_output\x18\x02 \x01(\v2\b.IOChunkH\x00R\x0estandardOutput\x121\n" +
"\x0estandard_error\x18\x03 \x01(\v2\b.IOChunkH\x00R\rstandardError\x1a\x1a\n" +
"\x04Exit\x12\x12\n" +
"\x04code\x18\x01 \x01(\x05R\x04codeB\x06\n" +
"\x04type\"6\n" +
"\fTerminalSize\x12\x12\n" +
"\x04rows\x18\x01 \x01(\rR\x04rows\x12\x12\n" +
"\x04cols\x18\x02 \x01(\rR\x04cols\"\x1d\n" +
"\aIOChunk\x12\x12\n" +
"\x04data\x18\x01 \x01(\fR\x04data\"\x12\n" +
"\x10ResolveIPRequest\"#\n" +
"\x11ResolveIPResponse\x12\x0e\n" +
"\x02ip\x18\x01 \x01(\tR\x02ip2d\n" +
"\x05Agent\x12'\n" +
"\x04Exec\x12\f.ExecRequest\x1a\r.ExecResponse(\x010\x01\x122\n" +
"\tResolveIP\x12\x11.ResolveIPRequest\x1a\x12.ResolveIPResponseB5Z3github.com/cirruslabs/tart-guest-agent/internal/rpcb\x06proto3"
var (
file_rpc_agent_proto_rawDescOnce sync.Once
file_rpc_agent_proto_rawDescData []byte
)
func file_rpc_agent_proto_rawDescGZIP() []byte {
file_rpc_agent_proto_rawDescOnce.Do(func() {
file_rpc_agent_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_rpc_agent_proto_rawDesc), len(file_rpc_agent_proto_rawDesc)))
})
return file_rpc_agent_proto_rawDescData
}
var file_rpc_agent_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_rpc_agent_proto_goTypes = []any{
(*ExecRequest)(nil), // 0: ExecRequest
(*ExecResponse)(nil), // 1: ExecResponse
(*TerminalSize)(nil), // 2: TerminalSize
(*IOChunk)(nil), // 3: IOChunk
(*ResolveIPRequest)(nil), // 4: ResolveIPRequest
(*ResolveIPResponse)(nil), // 5: ResolveIPResponse
(*ExecRequest_Command)(nil), // 6: ExecRequest.Command
nil, // 7: ExecRequest.Command.EnvEntry
(*ExecResponse_Exit)(nil), // 8: ExecResponse.Exit
}
var file_rpc_agent_proto_depIdxs = []int32{
6, // 0: ExecRequest.command:type_name -> ExecRequest.Command
3, // 1: ExecRequest.standard_input:type_name -> IOChunk
2, // 2: ExecRequest.terminal_resize:type_name -> TerminalSize
8, // 3: ExecResponse.exit:type_name -> ExecResponse.Exit
3, // 4: ExecResponse.standard_output:type_name -> IOChunk
3, // 5: ExecResponse.standard_error:type_name -> IOChunk
2, // 6: ExecRequest.Command.terminal_size:type_name -> TerminalSize
7, // 7: ExecRequest.Command.env:type_name -> ExecRequest.Command.EnvEntry
0, // 8: Agent.Exec:input_type -> ExecRequest
4, // 9: Agent.ResolveIP:input_type -> ResolveIPRequest
1, // 10: Agent.Exec:output_type -> ExecResponse
5, // 11: Agent.ResolveIP:output_type -> ResolveIPResponse
10, // [10:12] is the sub-list for method output_type
8, // [8:10] is the sub-list for method input_type
8, // [8:8] is the sub-list for extension type_name
8, // [8:8] is the sub-list for extension extendee
0, // [0:8] is the sub-list for field type_name
}
func init() { file_rpc_agent_proto_init() }
func file_rpc_agent_proto_init() {
if File_rpc_agent_proto != nil {
return
}
file_rpc_agent_proto_msgTypes[0].OneofWrappers = []any{
(*ExecRequest_Command_)(nil),
(*ExecRequest_StandardInput)(nil),
(*ExecRequest_TerminalResize)(nil),
}
file_rpc_agent_proto_msgTypes[1].OneofWrappers = []any{
(*ExecResponse_Exit_)(nil),
(*ExecResponse_StandardOutput)(nil),
(*ExecResponse_StandardError)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_rpc_agent_proto_rawDesc), len(file_rpc_agent_proto_rawDesc)),
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_rpc_agent_proto_goTypes,
DependencyIndexes: file_rpc_agent_proto_depIdxs,
MessageInfos: file_rpc_agent_proto_msgTypes,
}.Build()
File_rpc_agent_proto = out.File
file_rpc_agent_proto_goTypes = nil
file_rpc_agent_proto_depIdxs = nil
}