| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: tls/common.proto |
| |
| package tls |
| |
| import ( |
| context "context" |
| fmt "fmt" |
| proto "github.com/golang/protobuf/proto" |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| math "math" |
| ) |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ = proto.Marshal |
| var _ = fmt.Errorf |
| var _ = math.Inf |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the proto package it is being compiled against. |
| // A compilation error at this line likely means your copy of the |
| // proto package needs to be updated. |
| const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package |
| |
| // Output enumeration for ExecDutCommandRequest. |
| type Output int32 |
| |
| const ( |
| // OUTPUT_PIPE means to collect output and return it. |
| Output_OUTPUT_PIPE Output = 0 |
| // OUTPUT_STDOUT is a special value for stderr which means to merge stderr into stdout. |
| Output_OUTPUT_STDOUT Output = 1 |
| ) |
| |
| var Output_name = map[int32]string{ |
| 0: "OUTPUT_PIPE", |
| 1: "OUTPUT_STDOUT", |
| } |
| |
| var Output_value = map[string]int32{ |
| "OUTPUT_PIPE": 0, |
| "OUTPUT_STDOUT": 1, |
| } |
| |
| func (x Output) String() string { |
| return proto.EnumName(Output_name, int32(x)) |
| } |
| |
| func (Output) EnumDescriptor() ([]byte, []int) { |
| return fileDescriptor_3b853cac387a48f4, []int{0} |
| } |
| |
| type ExecDutCommandRequest struct { |
| // name is the resource name for the DUT. |
| // The DUT name is passed to the RTD when the RTD is started. |
| // It is not specified whether the name is the DUT hostname. |
| Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` |
| // command is the command to run. |
| // If this contains no slashes, it is resolved using PATH. |
| // If this starts with /, it is used as an absolute path to the |
| // program to run. |
| // Otherwise, this is treated as a path relative to the working |
| // directory. |
| Command string `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"` |
| // args are the arguments to pass to the command. |
| Args []string `protobuf:"bytes,3,rep,name=args,proto3" json:"args,omitempty"` |
| // stdin is passed to the command as the program's stdin. |
| // The stream does not support seeking. |
| // An empty bytes is not treated specially; if the command reads |
| // from stdin, it will receive zero bytes. |
| Stdin []byte `protobuf:"bytes,4,opt,name=stdin,proto3" json:"stdin,omitempty"` |
| // stdout indicates how to handle the command's stdout. |
| Stdout Output `protobuf:"varint,5,opt,name=stdout,proto3,enum=tls.Output" json:"stdout,omitempty"` |
| // stderr indicates how to handle the command's stderr. |
| Stderr Output `protobuf:"varint,6,opt,name=stderr,proto3,enum=tls.Output" json:"stderr,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExecDutCommandRequest) Reset() { *m = ExecDutCommandRequest{} } |
| func (m *ExecDutCommandRequest) String() string { return proto.CompactTextString(m) } |
| func (*ExecDutCommandRequest) ProtoMessage() {} |
| func (*ExecDutCommandRequest) Descriptor() ([]byte, []int) { |
| return fileDescriptor_3b853cac387a48f4, []int{0} |
| } |
| |
| func (m *ExecDutCommandRequest) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExecDutCommandRequest.Unmarshal(m, b) |
| } |
| func (m *ExecDutCommandRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExecDutCommandRequest.Marshal(b, m, deterministic) |
| } |
| func (m *ExecDutCommandRequest) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExecDutCommandRequest.Merge(m, src) |
| } |
| func (m *ExecDutCommandRequest) XXX_Size() int { |
| return xxx_messageInfo_ExecDutCommandRequest.Size(m) |
| } |
| func (m *ExecDutCommandRequest) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExecDutCommandRequest.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExecDutCommandRequest proto.InternalMessageInfo |
| |
| func (m *ExecDutCommandRequest) GetName() string { |
| if m != nil { |
| return m.Name |
| } |
| return "" |
| } |
| |
| func (m *ExecDutCommandRequest) GetCommand() string { |
| if m != nil { |
| return m.Command |
| } |
| return "" |
| } |
| |
| func (m *ExecDutCommandRequest) GetArgs() []string { |
| if m != nil { |
| return m.Args |
| } |
| return nil |
| } |
| |
| func (m *ExecDutCommandRequest) GetStdin() []byte { |
| if m != nil { |
| return m.Stdin |
| } |
| return nil |
| } |
| |
| func (m *ExecDutCommandRequest) GetStdout() Output { |
| if m != nil { |
| return m.Stdout |
| } |
| return Output_OUTPUT_PIPE |
| } |
| |
| func (m *ExecDutCommandRequest) GetStderr() Output { |
| if m != nil { |
| return m.Stderr |
| } |
| return Output_OUTPUT_PIPE |
| } |
| |
| type ExecDutCommandResponse struct { |
| // exit_info contains exit information. |
| // This is set when the command has exited or failed to start. |
| // This is set on the last message in the response stream. |
| ExitInfo *ExecDutCommandResponse_ExitInfo `protobuf:"bytes,1,opt,name=exit_info,json=exitInfo,proto3" json:"exit_info,omitempty"` |
| // stdout contains the shell command's stdout output since the last |
| // response in the stream. |
| // The implementation MAY batch or delay output to later |
| // responses in the stream. |
| Stdout []byte `protobuf:"bytes,2,opt,name=stdout,proto3" json:"stdout,omitempty"` |
| // stderr contains the shell command's stderr output since the last |
| // response in the stream. |
| // The implementation MAY batch or delay output to later |
| // responses in the stream. |
| Stderr []byte `protobuf:"bytes,3,opt,name=stderr,proto3" json:"stderr,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExecDutCommandResponse) Reset() { *m = ExecDutCommandResponse{} } |
| func (m *ExecDutCommandResponse) String() string { return proto.CompactTextString(m) } |
| func (*ExecDutCommandResponse) ProtoMessage() {} |
| func (*ExecDutCommandResponse) Descriptor() ([]byte, []int) { |
| return fileDescriptor_3b853cac387a48f4, []int{1} |
| } |
| |
| func (m *ExecDutCommandResponse) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExecDutCommandResponse.Unmarshal(m, b) |
| } |
| func (m *ExecDutCommandResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExecDutCommandResponse.Marshal(b, m, deterministic) |
| } |
| func (m *ExecDutCommandResponse) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExecDutCommandResponse.Merge(m, src) |
| } |
| func (m *ExecDutCommandResponse) XXX_Size() int { |
| return xxx_messageInfo_ExecDutCommandResponse.Size(m) |
| } |
| func (m *ExecDutCommandResponse) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExecDutCommandResponse.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExecDutCommandResponse proto.InternalMessageInfo |
| |
| func (m *ExecDutCommandResponse) GetExitInfo() *ExecDutCommandResponse_ExitInfo { |
| if m != nil { |
| return m.ExitInfo |
| } |
| return nil |
| } |
| |
| func (m *ExecDutCommandResponse) GetStdout() []byte { |
| if m != nil { |
| return m.Stdout |
| } |
| return nil |
| } |
| |
| func (m *ExecDutCommandResponse) GetStderr() []byte { |
| if m != nil { |
| return m.Stderr |
| } |
| return nil |
| } |
| |
| type ExecDutCommandResponse_ExitInfo struct { |
| // status provides information about how the command process |
| // terminated. |
| // |
| // If the command failed to start, status is set to an arbitrary |
| // non-zero value. |
| // |
| // If signaled is set, status is set to the signal that caused |
| // the command to terminate. |
| // |
| // Otherwise, status is set to the exit status of the process. |
| // Exit statuses outside of 0 to 255 inclusive are not supported; |
| // they will be mapped to an arbitrary non-zero value. |
| // |
| // status is zero if and only if the process was successfully |
| // started and exited with a zero status. |
| Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` |
| // signaled indicates whether the command exited due to a signal. |
| // If set, status contains the signal. |
| Signaled bool `protobuf:"varint,2,opt,name=signaled,proto3" json:"signaled,omitempty"` |
| // started indicates whether the command was started. |
| Started bool `protobuf:"varint,3,opt,name=started,proto3" json:"started,omitempty"` |
| // error_message provides a human readable explanation for some errors. |
| // This MUST NOT be inspected by programs. |
| ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` |
| XXX_NoUnkeyedLiteral struct{} `json:"-"` |
| XXX_unrecognized []byte `json:"-"` |
| XXX_sizecache int32 `json:"-"` |
| } |
| |
| func (m *ExecDutCommandResponse_ExitInfo) Reset() { *m = ExecDutCommandResponse_ExitInfo{} } |
| func (m *ExecDutCommandResponse_ExitInfo) String() string { return proto.CompactTextString(m) } |
| func (*ExecDutCommandResponse_ExitInfo) ProtoMessage() {} |
| func (*ExecDutCommandResponse_ExitInfo) Descriptor() ([]byte, []int) { |
| return fileDescriptor_3b853cac387a48f4, []int{1, 0} |
| } |
| |
| func (m *ExecDutCommandResponse_ExitInfo) XXX_Unmarshal(b []byte) error { |
| return xxx_messageInfo_ExecDutCommandResponse_ExitInfo.Unmarshal(m, b) |
| } |
| func (m *ExecDutCommandResponse_ExitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { |
| return xxx_messageInfo_ExecDutCommandResponse_ExitInfo.Marshal(b, m, deterministic) |
| } |
| func (m *ExecDutCommandResponse_ExitInfo) XXX_Merge(src proto.Message) { |
| xxx_messageInfo_ExecDutCommandResponse_ExitInfo.Merge(m, src) |
| } |
| func (m *ExecDutCommandResponse_ExitInfo) XXX_Size() int { |
| return xxx_messageInfo_ExecDutCommandResponse_ExitInfo.Size(m) |
| } |
| func (m *ExecDutCommandResponse_ExitInfo) XXX_DiscardUnknown() { |
| xxx_messageInfo_ExecDutCommandResponse_ExitInfo.DiscardUnknown(m) |
| } |
| |
| var xxx_messageInfo_ExecDutCommandResponse_ExitInfo proto.InternalMessageInfo |
| |
| func (m *ExecDutCommandResponse_ExitInfo) GetStatus() int32 { |
| if m != nil { |
| return m.Status |
| } |
| return 0 |
| } |
| |
| func (m *ExecDutCommandResponse_ExitInfo) GetSignaled() bool { |
| if m != nil { |
| return m.Signaled |
| } |
| return false |
| } |
| |
| func (m *ExecDutCommandResponse_ExitInfo) GetStarted() bool { |
| if m != nil { |
| return m.Started |
| } |
| return false |
| } |
| |
| func (m *ExecDutCommandResponse_ExitInfo) GetErrorMessage() string { |
| if m != nil { |
| return m.ErrorMessage |
| } |
| return "" |
| } |
| |
| func init() { |
| proto.RegisterEnum("tls.Output", Output_name, Output_value) |
| proto.RegisterType((*ExecDutCommandRequest)(nil), "tls.ExecDutCommandRequest") |
| proto.RegisterType((*ExecDutCommandResponse)(nil), "tls.ExecDutCommandResponse") |
| proto.RegisterType((*ExecDutCommandResponse_ExitInfo)(nil), "tls.ExecDutCommandResponse.ExitInfo") |
| } |
| |
| func init() { proto.RegisterFile("tls/common.proto", fileDescriptor_3b853cac387a48f4) } |
| |
| var fileDescriptor_3b853cac387a48f4 = []byte{ |
| // 403 bytes of a gzipped FileDescriptorProto |
| 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0xcf, 0x6e, 0xd3, 0x40, |
| 0x10, 0xc6, 0x71, 0xd2, 0x18, 0x67, 0xd2, 0x96, 0xb0, 0x82, 0xc8, 0x0a, 0x97, 0xa8, 0xe5, 0x10, |
| 0x21, 0xb0, 0x51, 0x78, 0x02, 0x68, 0x73, 0xa8, 0x10, 0x4a, 0xb4, 0xc4, 0x17, 0x2e, 0xd1, 0x62, |
| 0x6f, 0x8c, 0x25, 0xef, 0x6e, 0xd8, 0x19, 0x4b, 0xb9, 0xf0, 0x02, 0xbc, 0x11, 0x6f, 0x87, 0xbc, |
| 0xfe, 0x23, 0x15, 0x45, 0xdc, 0xe6, 0xfb, 0xfc, 0x79, 0xfc, 0xf9, 0xa7, 0x81, 0x29, 0x95, 0x18, |
| 0xa7, 0x46, 0x29, 0xa3, 0xa3, 0xa3, 0x35, 0x64, 0xd8, 0x90, 0x4a, 0xbc, 0xf9, 0xe3, 0xc1, 0xcb, |
| 0xf5, 0x49, 0xa6, 0xf7, 0x15, 0xdd, 0x19, 0xa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 0xe1, 0x4a, 0x5a, 0x6b, 0xec, 0x5e, 0x49, |
| 0x44, 0x91, 0x4b, 0xc7, 0x73, 0xcc, 0x2f, 0x9d, 0xf9, 0xa5, 0xf1, 0xde, 0xbc, 0x05, 0xbf, 0xc1, |
| 0xc3, 0x9e, 0xc1, 0x64, 0x93, 0xec, 0xb6, 0xc9, 0x6e, 0xbf, 0x7d, 0xd8, 0xae, 0xa7, 0x4f, 0xd8, |
| 0x73, 0xb8, 0x6a, 0x8d, 0xaf, 0xbb, 0xfb, 0x4d, 0xb2, 0x9b, 0x7a, 0xab, 0x04, 0xfc, 0x3b, 0x77, |
| 0x0b, 0xec, 0x33, 0x5c, 0x3f, 0x66, 0xc2, 0xe6, 0x67, 0x41, 0xb9, 0xa3, 0x98, 0xbf, 0xfa, 0x0f, |
| 0xc4, 0xf7, 0xde, 0xa7, 0xf8, 0xdb, 0xbb, 0xdc, 0x44, 0xe9, 0x0f, 0x6b, 0x54, 0x51, 0xa9, 0xc8, |
| 0xd8, 0x3c, 0xee, 0x84, 0xc1, 0xb8, 0xd0, 0x07, 0x2b, 0x62, 0x77, 0x7c, 0x71, 0x6e, 0x62, 0x2a, |
| 0xf1, 0xbb, 0xef, 0xd4, 0x87, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe5, 0xaa, 0xda, 0x5f, 0x9e, |
| 0x02, 0x00, 0x00, |
| } |
| |
| // Reference imports to suppress errors if they are not otherwise used. |
| var _ context.Context |
| var _ grpc.ClientConn |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| const _ = grpc.SupportPackageIsVersion4 |
| |
| // CommonClient is the client API for Common service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| type CommonClient interface { |
| // ExecDutCommand runs a command on a DUT. |
| // |
| // The working directory is /. |
| // A tty is not spawned for the command. |
| // The user and group is root. |
| // All signals have their default dispositions and are not masked. |
| // The umask is set to 0. |
| // |
| // The environment contains: |
| // |
| // TERM=dumb |
| // PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin |
| // LANG=en_US.UTF-8 |
| // USER=root |
| // HOME=/root |
| // |
| // The environment MAY also contain SSH client variables. |
| // The environment SHALL NOT contain variables not mentioned above. |
| // |
| // If the stream is interrupted, the implementation MAY attempt to |
| // stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL. |
| ExecDutCommand(ctx context.Context, in *ExecDutCommandRequest, opts ...grpc.CallOption) (Common_ExecDutCommandClient, error) |
| } |
| |
| type commonClient struct { |
| cc *grpc.ClientConn |
| } |
| |
| func NewCommonClient(cc *grpc.ClientConn) CommonClient { |
| return &commonClient{cc} |
| } |
| |
| func (c *commonClient) ExecDutCommand(ctx context.Context, in *ExecDutCommandRequest, opts ...grpc.CallOption) (Common_ExecDutCommandClient, error) { |
| stream, err := c.cc.NewStream(ctx, &_Common_serviceDesc.Streams[0], "/tls.Common/ExecDutCommand", opts...) |
| if err != nil { |
| return nil, err |
| } |
| x := &commonExecDutCommandClient{stream} |
| if err := x.ClientStream.SendMsg(in); err != nil { |
| return nil, err |
| } |
| if err := x.ClientStream.CloseSend(); err != nil { |
| return nil, err |
| } |
| return x, nil |
| } |
| |
| type Common_ExecDutCommandClient interface { |
| Recv() (*ExecDutCommandResponse, error) |
| grpc.ClientStream |
| } |
| |
| type commonExecDutCommandClient struct { |
| grpc.ClientStream |
| } |
| |
| func (x *commonExecDutCommandClient) Recv() (*ExecDutCommandResponse, error) { |
| m := new(ExecDutCommandResponse) |
| if err := x.ClientStream.RecvMsg(m); err != nil { |
| return nil, err |
| } |
| return m, nil |
| } |
| |
| // CommonServer is the server API for Common service. |
| type CommonServer interface { |
| // ExecDutCommand runs a command on a DUT. |
| // |
| // The working directory is /. |
| // A tty is not spawned for the command. |
| // The user and group is root. |
| // All signals have their default dispositions and are not masked. |
| // The umask is set to 0. |
| // |
| // The environment contains: |
| // |
| // TERM=dumb |
| // PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin |
| // LANG=en_US.UTF-8 |
| // USER=root |
| // HOME=/root |
| // |
| // The environment MAY also contain SSH client variables. |
| // The environment SHALL NOT contain variables not mentioned above. |
| // |
| // If the stream is interrupted, the implementation MAY attempt to |
| // stop the command by sending SIGINT, SIGHUP, SIGTERM, or SIGKILL. |
| ExecDutCommand(*ExecDutCommandRequest, Common_ExecDutCommandServer) error |
| } |
| |
| // UnimplementedCommonServer can be embedded to have forward compatible implementations. |
| type UnimplementedCommonServer struct { |
| } |
| |
| func (*UnimplementedCommonServer) ExecDutCommand(req *ExecDutCommandRequest, srv Common_ExecDutCommandServer) error { |
| return status.Errorf(codes.Unimplemented, "method ExecDutCommand not implemented") |
| } |
| |
| func RegisterCommonServer(s *grpc.Server, srv CommonServer) { |
| s.RegisterService(&_Common_serviceDesc, srv) |
| } |
| |
| func _Common_ExecDutCommand_Handler(srv interface{}, stream grpc.ServerStream) error { |
| m := new(ExecDutCommandRequest) |
| if err := stream.RecvMsg(m); err != nil { |
| return err |
| } |
| return srv.(CommonServer).ExecDutCommand(m, &commonExecDutCommandServer{stream}) |
| } |
| |
| type Common_ExecDutCommandServer interface { |
| Send(*ExecDutCommandResponse) error |
| grpc.ServerStream |
| } |
| |
| type commonExecDutCommandServer struct { |
| grpc.ServerStream |
| } |
| |
| func (x *commonExecDutCommandServer) Send(m *ExecDutCommandResponse) error { |
| return x.ServerStream.SendMsg(m) |
| } |
| |
| var _Common_serviceDesc = grpc.ServiceDesc{ |
| ServiceName: "tls.Common", |
| HandlerType: (*CommonServer)(nil), |
| Methods: []grpc.MethodDesc{}, |
| Streams: []grpc.StreamDesc{ |
| { |
| StreamName: "ExecDutCommand", |
| Handler: _Common_ExecDutCommand_Handler, |
| ServerStreams: true, |
| }, |
| }, |
| Metadata: "tls/common.proto", |
| } |