mirror of
https://github.com/gitpod-io/gitpod.git
synced 2025-12-08 17:36:30 +00:00
1045 lines
40 KiB
Go
1045 lines
40 KiB
Go
// Copyright (c) 2020 TypeFox GmbH. All rights reserved.
|
|
// Licensed under the GNU Affero General Public License (AGPL).
|
|
// See License-AGPL.txt in the project root for license information.
|
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: terminal.proto
|
|
|
|
package api
|
|
|
|
import (
|
|
context "context"
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
_ "google.golang.org/genproto/googleapis/api/annotations"
|
|
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
|
|
|
|
type OpenTerminalRequest struct {
|
|
Env map[string]string `protobuf:"bytes,2,rep,name=env,proto3" json:"env,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *OpenTerminalRequest) Reset() { *m = OpenTerminalRequest{} }
|
|
func (m *OpenTerminalRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*OpenTerminalRequest) ProtoMessage() {}
|
|
func (*OpenTerminalRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{0}
|
|
}
|
|
|
|
func (m *OpenTerminalRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_OpenTerminalRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *OpenTerminalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_OpenTerminalRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *OpenTerminalRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_OpenTerminalRequest.Merge(m, src)
|
|
}
|
|
func (m *OpenTerminalRequest) XXX_Size() int {
|
|
return xxx_messageInfo_OpenTerminalRequest.Size(m)
|
|
}
|
|
func (m *OpenTerminalRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_OpenTerminalRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_OpenTerminalRequest proto.InternalMessageInfo
|
|
|
|
func (m *OpenTerminalRequest) GetEnv() map[string]string {
|
|
if m != nil {
|
|
return m.Env
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type OpenTerminalResponse struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
// starter_token can be used to change the terminal size if there are
|
|
// multiple listerns, without having to force your way in.
|
|
StarterToken string `protobuf:"bytes,2,opt,name=starter_token,json=starterToken,proto3" json:"starter_token,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *OpenTerminalResponse) Reset() { *m = OpenTerminalResponse{} }
|
|
func (m *OpenTerminalResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*OpenTerminalResponse) ProtoMessage() {}
|
|
func (*OpenTerminalResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{1}
|
|
}
|
|
|
|
func (m *OpenTerminalResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_OpenTerminalResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *OpenTerminalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_OpenTerminalResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *OpenTerminalResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_OpenTerminalResponse.Merge(m, src)
|
|
}
|
|
func (m *OpenTerminalResponse) XXX_Size() int {
|
|
return xxx_messageInfo_OpenTerminalResponse.Size(m)
|
|
}
|
|
func (m *OpenTerminalResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_OpenTerminalResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_OpenTerminalResponse proto.InternalMessageInfo
|
|
|
|
func (m *OpenTerminalResponse) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *OpenTerminalResponse) GetStarterToken() string {
|
|
if m != nil {
|
|
return m.StarterToken
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CloseTerminalRequest struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CloseTerminalRequest) Reset() { *m = CloseTerminalRequest{} }
|
|
func (m *CloseTerminalRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*CloseTerminalRequest) ProtoMessage() {}
|
|
func (*CloseTerminalRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{2}
|
|
}
|
|
|
|
func (m *CloseTerminalRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CloseTerminalRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *CloseTerminalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CloseTerminalRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CloseTerminalRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CloseTerminalRequest.Merge(m, src)
|
|
}
|
|
func (m *CloseTerminalRequest) XXX_Size() int {
|
|
return xxx_messageInfo_CloseTerminalRequest.Size(m)
|
|
}
|
|
func (m *CloseTerminalRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CloseTerminalRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CloseTerminalRequest proto.InternalMessageInfo
|
|
|
|
func (m *CloseTerminalRequest) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type CloseTerminalResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CloseTerminalResponse) Reset() { *m = CloseTerminalResponse{} }
|
|
func (m *CloseTerminalResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*CloseTerminalResponse) ProtoMessage() {}
|
|
func (*CloseTerminalResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{3}
|
|
}
|
|
|
|
func (m *CloseTerminalResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CloseTerminalResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *CloseTerminalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CloseTerminalResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CloseTerminalResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CloseTerminalResponse.Merge(m, src)
|
|
}
|
|
func (m *CloseTerminalResponse) XXX_Size() int {
|
|
return xxx_messageInfo_CloseTerminalResponse.Size(m)
|
|
}
|
|
func (m *CloseTerminalResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CloseTerminalResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CloseTerminalResponse proto.InternalMessageInfo
|
|
|
|
type ListTerminalsRequest struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListTerminalsRequest) Reset() { *m = ListTerminalsRequest{} }
|
|
func (m *ListTerminalsRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListTerminalsRequest) ProtoMessage() {}
|
|
func (*ListTerminalsRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{4}
|
|
}
|
|
|
|
func (m *ListTerminalsRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListTerminalsRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ListTerminalsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListTerminalsRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListTerminalsRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListTerminalsRequest.Merge(m, src)
|
|
}
|
|
func (m *ListTerminalsRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ListTerminalsRequest.Size(m)
|
|
}
|
|
func (m *ListTerminalsRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListTerminalsRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListTerminalsRequest proto.InternalMessageInfo
|
|
|
|
type ListTerminalsResponse struct {
|
|
Terminals []*ListTerminalsResponse_Terminal `protobuf:"bytes,1,rep,name=terminals,proto3" json:"terminals,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListTerminalsResponse) Reset() { *m = ListTerminalsResponse{} }
|
|
func (m *ListTerminalsResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ListTerminalsResponse) ProtoMessage() {}
|
|
func (*ListTerminalsResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{5}
|
|
}
|
|
|
|
func (m *ListTerminalsResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListTerminalsResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ListTerminalsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListTerminalsResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListTerminalsResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListTerminalsResponse.Merge(m, src)
|
|
}
|
|
func (m *ListTerminalsResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ListTerminalsResponse.Size(m)
|
|
}
|
|
func (m *ListTerminalsResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListTerminalsResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListTerminalsResponse proto.InternalMessageInfo
|
|
|
|
func (m *ListTerminalsResponse) GetTerminals() []*ListTerminalsResponse_Terminal {
|
|
if m != nil {
|
|
return m.Terminals
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ListTerminalsResponse_Terminal struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
Command []string `protobuf:"bytes,2,rep,name=command,proto3" json:"command,omitempty"`
|
|
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListTerminalsResponse_Terminal) Reset() { *m = ListTerminalsResponse_Terminal{} }
|
|
func (m *ListTerminalsResponse_Terminal) String() string { return proto.CompactTextString(m) }
|
|
func (*ListTerminalsResponse_Terminal) ProtoMessage() {}
|
|
func (*ListTerminalsResponse_Terminal) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{5, 0}
|
|
}
|
|
|
|
func (m *ListTerminalsResponse_Terminal) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListTerminalsResponse_Terminal.Unmarshal(m, b)
|
|
}
|
|
func (m *ListTerminalsResponse_Terminal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListTerminalsResponse_Terminal.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListTerminalsResponse_Terminal) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListTerminalsResponse_Terminal.Merge(m, src)
|
|
}
|
|
func (m *ListTerminalsResponse_Terminal) XXX_Size() int {
|
|
return xxx_messageInfo_ListTerminalsResponse_Terminal.Size(m)
|
|
}
|
|
func (m *ListTerminalsResponse_Terminal) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListTerminalsResponse_Terminal.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListTerminalsResponse_Terminal proto.InternalMessageInfo
|
|
|
|
func (m *ListTerminalsResponse_Terminal) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ListTerminalsResponse_Terminal) GetCommand() []string {
|
|
if m != nil {
|
|
return m.Command
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListTerminalsResponse_Terminal) GetTitle() string {
|
|
if m != nil {
|
|
return m.Title
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListenTerminalRequest struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListenTerminalRequest) Reset() { *m = ListenTerminalRequest{} }
|
|
func (m *ListenTerminalRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ListenTerminalRequest) ProtoMessage() {}
|
|
func (*ListenTerminalRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{6}
|
|
}
|
|
|
|
func (m *ListenTerminalRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListenTerminalRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ListenTerminalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListenTerminalRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListenTerminalRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListenTerminalRequest.Merge(m, src)
|
|
}
|
|
func (m *ListenTerminalRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ListenTerminalRequest.Size(m)
|
|
}
|
|
func (m *ListenTerminalRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListenTerminalRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListenTerminalRequest proto.InternalMessageInfo
|
|
|
|
func (m *ListenTerminalRequest) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ListenTerminalResponse struct {
|
|
// Types that are valid to be assigned to Output:
|
|
// *ListenTerminalResponse_Stdout
|
|
// *ListenTerminalResponse_Stderr
|
|
Output isListenTerminalResponse_Output `protobuf_oneof:"output"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ListenTerminalResponse) Reset() { *m = ListenTerminalResponse{} }
|
|
func (m *ListenTerminalResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ListenTerminalResponse) ProtoMessage() {}
|
|
func (*ListenTerminalResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{7}
|
|
}
|
|
|
|
func (m *ListenTerminalResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ListenTerminalResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ListenTerminalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ListenTerminalResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ListenTerminalResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ListenTerminalResponse.Merge(m, src)
|
|
}
|
|
func (m *ListenTerminalResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ListenTerminalResponse.Size(m)
|
|
}
|
|
func (m *ListenTerminalResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ListenTerminalResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ListenTerminalResponse proto.InternalMessageInfo
|
|
|
|
type isListenTerminalResponse_Output interface {
|
|
isListenTerminalResponse_Output()
|
|
}
|
|
|
|
type ListenTerminalResponse_Stdout struct {
|
|
Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3,oneof"`
|
|
}
|
|
|
|
type ListenTerminalResponse_Stderr struct {
|
|
Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3,oneof"`
|
|
}
|
|
|
|
func (*ListenTerminalResponse_Stdout) isListenTerminalResponse_Output() {}
|
|
|
|
func (*ListenTerminalResponse_Stderr) isListenTerminalResponse_Output() {}
|
|
|
|
func (m *ListenTerminalResponse) GetOutput() isListenTerminalResponse_Output {
|
|
if m != nil {
|
|
return m.Output
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListenTerminalResponse) GetStdout() []byte {
|
|
if x, ok := m.GetOutput().(*ListenTerminalResponse_Stdout); ok {
|
|
return x.Stdout
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ListenTerminalResponse) GetStderr() []byte {
|
|
if x, ok := m.GetOutput().(*ListenTerminalResponse_Stderr); ok {
|
|
return x.Stderr
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*ListenTerminalResponse) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*ListenTerminalResponse_Stdout)(nil),
|
|
(*ListenTerminalResponse_Stderr)(nil),
|
|
}
|
|
}
|
|
|
|
type WriteTerminalRequest struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
Stdin []byte `protobuf:"bytes,2,opt,name=stdin,proto3" json:"stdin,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *WriteTerminalRequest) Reset() { *m = WriteTerminalRequest{} }
|
|
func (m *WriteTerminalRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*WriteTerminalRequest) ProtoMessage() {}
|
|
func (*WriteTerminalRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{8}
|
|
}
|
|
|
|
func (m *WriteTerminalRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_WriteTerminalRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *WriteTerminalRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_WriteTerminalRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *WriteTerminalRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_WriteTerminalRequest.Merge(m, src)
|
|
}
|
|
func (m *WriteTerminalRequest) XXX_Size() int {
|
|
return xxx_messageInfo_WriteTerminalRequest.Size(m)
|
|
}
|
|
func (m *WriteTerminalRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_WriteTerminalRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_WriteTerminalRequest proto.InternalMessageInfo
|
|
|
|
func (m *WriteTerminalRequest) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *WriteTerminalRequest) GetStdin() []byte {
|
|
if m != nil {
|
|
return m.Stdin
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type WriteTerminalResponse struct {
|
|
BytesWritten uint32 `protobuf:"varint,1,opt,name=bytes_written,json=bytesWritten,proto3" json:"bytes_written,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *WriteTerminalResponse) Reset() { *m = WriteTerminalResponse{} }
|
|
func (m *WriteTerminalResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*WriteTerminalResponse) ProtoMessage() {}
|
|
func (*WriteTerminalResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{9}
|
|
}
|
|
|
|
func (m *WriteTerminalResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_WriteTerminalResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *WriteTerminalResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_WriteTerminalResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *WriteTerminalResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_WriteTerminalResponse.Merge(m, src)
|
|
}
|
|
func (m *WriteTerminalResponse) XXX_Size() int {
|
|
return xxx_messageInfo_WriteTerminalResponse.Size(m)
|
|
}
|
|
func (m *WriteTerminalResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_WriteTerminalResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_WriteTerminalResponse proto.InternalMessageInfo
|
|
|
|
func (m *WriteTerminalResponse) GetBytesWritten() uint32 {
|
|
if m != nil {
|
|
return m.BytesWritten
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SetTerminalSizeRequest struct {
|
|
Alias string `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
|
|
// token is the starter_token that Open() returned.
|
|
// Without token it's possible that the request is ignored.
|
|
// If you want to force your size, indendently of all other listener,
|
|
// use force.
|
|
//
|
|
// Types that are valid to be assigned to Priority:
|
|
// *SetTerminalSizeRequest_Token
|
|
// *SetTerminalSizeRequest_Force
|
|
Priority isSetTerminalSizeRequest_Priority `protobuf_oneof:"priority"`
|
|
Rows uint32 `protobuf:"varint,4,opt,name=rows,proto3" json:"rows,omitempty"`
|
|
Cols uint32 `protobuf:"varint,5,opt,name=cols,proto3" json:"cols,omitempty"`
|
|
WidthPx uint32 `protobuf:"varint,6,opt,name=widthPx,proto3" json:"widthPx,omitempty"`
|
|
HeightPx uint32 `protobuf:"varint,7,opt,name=heightPx,proto3" json:"heightPx,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) Reset() { *m = SetTerminalSizeRequest{} }
|
|
func (m *SetTerminalSizeRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*SetTerminalSizeRequest) ProtoMessage() {}
|
|
func (*SetTerminalSizeRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{10}
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SetTerminalSizeRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *SetTerminalSizeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SetTerminalSizeRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *SetTerminalSizeRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SetTerminalSizeRequest.Merge(m, src)
|
|
}
|
|
func (m *SetTerminalSizeRequest) XXX_Size() int {
|
|
return xxx_messageInfo_SetTerminalSizeRequest.Size(m)
|
|
}
|
|
func (m *SetTerminalSizeRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SetTerminalSizeRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SetTerminalSizeRequest proto.InternalMessageInfo
|
|
|
|
func (m *SetTerminalSizeRequest) GetAlias() string {
|
|
if m != nil {
|
|
return m.Alias
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type isSetTerminalSizeRequest_Priority interface {
|
|
isSetTerminalSizeRequest_Priority()
|
|
}
|
|
|
|
type SetTerminalSizeRequest_Token struct {
|
|
Token string `protobuf:"bytes,2,opt,name=token,proto3,oneof"`
|
|
}
|
|
|
|
type SetTerminalSizeRequest_Force struct {
|
|
Force bool `protobuf:"varint,3,opt,name=force,proto3,oneof"`
|
|
}
|
|
|
|
func (*SetTerminalSizeRequest_Token) isSetTerminalSizeRequest_Priority() {}
|
|
|
|
func (*SetTerminalSizeRequest_Force) isSetTerminalSizeRequest_Priority() {}
|
|
|
|
func (m *SetTerminalSizeRequest) GetPriority() isSetTerminalSizeRequest_Priority {
|
|
if m != nil {
|
|
return m.Priority
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetToken() string {
|
|
if x, ok := m.GetPriority().(*SetTerminalSizeRequest_Token); ok {
|
|
return x.Token
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetForce() bool {
|
|
if x, ok := m.GetPriority().(*SetTerminalSizeRequest_Force); ok {
|
|
return x.Force
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetRows() uint32 {
|
|
if m != nil {
|
|
return m.Rows
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetCols() uint32 {
|
|
if m != nil {
|
|
return m.Cols
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetWidthPx() uint32 {
|
|
if m != nil {
|
|
return m.WidthPx
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *SetTerminalSizeRequest) GetHeightPx() uint32 {
|
|
if m != nil {
|
|
return m.HeightPx
|
|
}
|
|
return 0
|
|
}
|
|
|
|
// XXX_OneofWrappers is for the internal use of the proto package.
|
|
func (*SetTerminalSizeRequest) XXX_OneofWrappers() []interface{} {
|
|
return []interface{}{
|
|
(*SetTerminalSizeRequest_Token)(nil),
|
|
(*SetTerminalSizeRequest_Force)(nil),
|
|
}
|
|
}
|
|
|
|
type SetTerminalSizeResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *SetTerminalSizeResponse) Reset() { *m = SetTerminalSizeResponse{} }
|
|
func (m *SetTerminalSizeResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*SetTerminalSizeResponse) ProtoMessage() {}
|
|
func (*SetTerminalSizeResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_ff8b8260c8ef16ad, []int{11}
|
|
}
|
|
|
|
func (m *SetTerminalSizeResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_SetTerminalSizeResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *SetTerminalSizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_SetTerminalSizeResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *SetTerminalSizeResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_SetTerminalSizeResponse.Merge(m, src)
|
|
}
|
|
func (m *SetTerminalSizeResponse) XXX_Size() int {
|
|
return xxx_messageInfo_SetTerminalSizeResponse.Size(m)
|
|
}
|
|
func (m *SetTerminalSizeResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_SetTerminalSizeResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_SetTerminalSizeResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*OpenTerminalRequest)(nil), "supervisor.OpenTerminalRequest")
|
|
proto.RegisterMapType((map[string]string)(nil), "supervisor.OpenTerminalRequest.EnvEntry")
|
|
proto.RegisterType((*OpenTerminalResponse)(nil), "supervisor.OpenTerminalResponse")
|
|
proto.RegisterType((*CloseTerminalRequest)(nil), "supervisor.CloseTerminalRequest")
|
|
proto.RegisterType((*CloseTerminalResponse)(nil), "supervisor.CloseTerminalResponse")
|
|
proto.RegisterType((*ListTerminalsRequest)(nil), "supervisor.ListTerminalsRequest")
|
|
proto.RegisterType((*ListTerminalsResponse)(nil), "supervisor.ListTerminalsResponse")
|
|
proto.RegisterType((*ListTerminalsResponse_Terminal)(nil), "supervisor.ListTerminalsResponse.Terminal")
|
|
proto.RegisterType((*ListenTerminalRequest)(nil), "supervisor.ListenTerminalRequest")
|
|
proto.RegisterType((*ListenTerminalResponse)(nil), "supervisor.ListenTerminalResponse")
|
|
proto.RegisterType((*WriteTerminalRequest)(nil), "supervisor.WriteTerminalRequest")
|
|
proto.RegisterType((*WriteTerminalResponse)(nil), "supervisor.WriteTerminalResponse")
|
|
proto.RegisterType((*SetTerminalSizeRequest)(nil), "supervisor.SetTerminalSizeRequest")
|
|
proto.RegisterType((*SetTerminalSizeResponse)(nil), "supervisor.SetTerminalSizeResponse")
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterFile("terminal.proto", fileDescriptor_ff8b8260c8ef16ad)
|
|
}
|
|
|
|
var fileDescriptor_ff8b8260c8ef16ad = []byte{
|
|
// 686 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4d, 0x4f, 0x13, 0x41,
|
|
0x18, 0x66, 0xfb, 0x45, 0x79, 0x2d, 0x7e, 0x0c,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x82, 0xf6, 0xe0, 0x69, 0x3b, 0xb5,
|
|
0x41, 0xbb, 0xab, 0xb9, 0xed, 0xcf, 0x66, 0x0c, 0x5f, 0xd0, 0x31, 0x94, 0xf4, 0x4a, 0x66, 0x13,
|
|
0xe6, 0x39, 0x34, 0x9b, 0x30, 0xd7, 0x74, 0x78, 0xd5, 0x24, 0x5c, 0x42, 0x77, 0x32, 0x09, 0x63,
|
|
0xad, 0x3f, 0x80, 0x8a, 0x5d, 0x7d, 0x34, 0xa5, 0x33, 0xdd, 0x2a, 0x3c, 0x8b, 0xe2, 0x72, 0x35,
|
|
0x4d, 0xae, 0x7b, 0xe8, 0xee, 0x54, 0x2e, 0xc2, 0xd2, 0xea, 0x9e, 0x78, 0xba, 0xa3, 0x66, 0xad,
|
|
0xb3, 0x05, 0xe6, 0xb9, 0x25, 0x5b, 0x60, 0xae, 0x17, 0xd2, 0x8e, 0xe2, 0x6c, 0x47, 0xb5, 0x31,
|
|
0xc6, 0x1d, 0xdd, 0x87, 0xf9, 0x3d, 0xa2, 0xf4, 0xde, 0xa0, 0x4c, 0x1d, 0xf9, 0xf6, 0x08, 0x9a,
|
|
0x33, 0x39, 0xe9, 0x66, 0x74, 0xca, 0x1f, 0x8a, 0x51, 0x42, 0x8f, 0x2a, 0xe6, 0x5f, 0xf3, 0xec,
|
|
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x30, 0xbf, 0x84, 0xa7, 0x06, 0x00, 0x00,
|
|
}
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ context.Context
|
|
var _ grpc.ClientConnInterface
|
|
|
|
// 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.SupportPackageIsVersion6
|
|
|
|
// TerminalServiceClient is the client API for TerminalService service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type TerminalServiceClient interface {
|
|
// Open opens a new terminal running the login shell
|
|
Open(ctx context.Context, in *OpenTerminalRequest, opts ...grpc.CallOption) (*OpenTerminalResponse, error)
|
|
// Close closes a terminal for the given alias, SIGKILL'ing all child processes
|
|
// before closing the pseudo-terminal.
|
|
Close(ctx context.Context, in *CloseTerminalRequest, opts ...grpc.CallOption) (*CloseTerminalResponse, error)
|
|
// List lists all open terminals
|
|
List(ctx context.Context, in *ListTerminalsRequest, opts ...grpc.CallOption) (*ListTerminalsResponse, error)
|
|
// Listen listens to a terminal
|
|
Listen(ctx context.Context, in *ListenTerminalRequest, opts ...grpc.CallOption) (TerminalService_ListenClient, error)
|
|
// Write writes to a terminal
|
|
Write(ctx context.Context, in *WriteTerminalRequest, opts ...grpc.CallOption) (*WriteTerminalResponse, error)
|
|
// SetSize sets the terminal's size
|
|
SetSize(ctx context.Context, in *SetTerminalSizeRequest, opts ...grpc.CallOption) (*SetTerminalSizeResponse, error)
|
|
}
|
|
|
|
type terminalServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewTerminalServiceClient(cc grpc.ClientConnInterface) TerminalServiceClient {
|
|
return &terminalServiceClient{cc}
|
|
}
|
|
|
|
func (c *terminalServiceClient) Open(ctx context.Context, in *OpenTerminalRequest, opts ...grpc.CallOption) (*OpenTerminalResponse, error) {
|
|
out := new(OpenTerminalResponse)
|
|
err := c.cc.Invoke(ctx, "/supervisor.TerminalService/Open", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *terminalServiceClient) Close(ctx context.Context, in *CloseTerminalRequest, opts ...grpc.CallOption) (*CloseTerminalResponse, error) {
|
|
out := new(CloseTerminalResponse)
|
|
err := c.cc.Invoke(ctx, "/supervisor.TerminalService/Close", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *terminalServiceClient) List(ctx context.Context, in *ListTerminalsRequest, opts ...grpc.CallOption) (*ListTerminalsResponse, error) {
|
|
out := new(ListTerminalsResponse)
|
|
err := c.cc.Invoke(ctx, "/supervisor.TerminalService/List", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *terminalServiceClient) Listen(ctx context.Context, in *ListenTerminalRequest, opts ...grpc.CallOption) (TerminalService_ListenClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &_TerminalService_serviceDesc.Streams[0], "/supervisor.TerminalService/Listen", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &terminalServiceListenClient{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 TerminalService_ListenClient interface {
|
|
Recv() (*ListenTerminalResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type terminalServiceListenClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *terminalServiceListenClient) Recv() (*ListenTerminalResponse, error) {
|
|
m := new(ListenTerminalResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
func (c *terminalServiceClient) Write(ctx context.Context, in *WriteTerminalRequest, opts ...grpc.CallOption) (*WriteTerminalResponse, error) {
|
|
out := new(WriteTerminalResponse)
|
|
err := c.cc.Invoke(ctx, "/supervisor.TerminalService/Write", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *terminalServiceClient) SetSize(ctx context.Context, in *SetTerminalSizeRequest, opts ...grpc.CallOption) (*SetTerminalSizeResponse, error) {
|
|
out := new(SetTerminalSizeResponse)
|
|
err := c.cc.Invoke(ctx, "/supervisor.TerminalService/SetSize", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// TerminalServiceServer is the server API for TerminalService service.
|
|
type TerminalServiceServer interface {
|
|
// Open opens a new terminal running the login shell
|
|
Open(context.Context, *OpenTerminalRequest) (*OpenTerminalResponse, error)
|
|
// Close closes a terminal for the given alias, SIGKILL'ing all child processes
|
|
// before closing the pseudo-terminal.
|
|
Close(context.Context, *CloseTerminalRequest) (*CloseTerminalResponse, error)
|
|
// List lists all open terminals
|
|
List(context.Context, *ListTerminalsRequest) (*ListTerminalsResponse, error)
|
|
// Listen listens to a terminal
|
|
Listen(*ListenTerminalRequest, TerminalService_ListenServer) error
|
|
// Write writes to a terminal
|
|
Write(context.Context, *WriteTerminalRequest) (*WriteTerminalResponse, error)
|
|
// SetSize sets the terminal's size
|
|
SetSize(context.Context, *SetTerminalSizeRequest) (*SetTerminalSizeResponse, error)
|
|
}
|
|
|
|
// UnimplementedTerminalServiceServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedTerminalServiceServer struct {
|
|
}
|
|
|
|
func (*UnimplementedTerminalServiceServer) Open(ctx context.Context, req *OpenTerminalRequest) (*OpenTerminalResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Open not implemented")
|
|
}
|
|
func (*UnimplementedTerminalServiceServer) Close(ctx context.Context, req *CloseTerminalRequest) (*CloseTerminalResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Close not implemented")
|
|
}
|
|
func (*UnimplementedTerminalServiceServer) List(ctx context.Context, req *ListTerminalsRequest) (*ListTerminalsResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
|
|
}
|
|
func (*UnimplementedTerminalServiceServer) Listen(req *ListenTerminalRequest, srv TerminalService_ListenServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method Listen not implemented")
|
|
}
|
|
func (*UnimplementedTerminalServiceServer) Write(ctx context.Context, req *WriteTerminalRequest) (*WriteTerminalResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
|
|
}
|
|
func (*UnimplementedTerminalServiceServer) SetSize(ctx context.Context, req *SetTerminalSizeRequest) (*SetTerminalSizeResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetSize not implemented")
|
|
}
|
|
|
|
func RegisterTerminalServiceServer(s *grpc.Server, srv TerminalServiceServer) {
|
|
s.RegisterService(&_TerminalService_serviceDesc, srv)
|
|
}
|
|
|
|
func _TerminalService_Open_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(OpenTerminalRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TerminalServiceServer).Open(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/supervisor.TerminalService/Open",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TerminalServiceServer).Open(ctx, req.(*OpenTerminalRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TerminalService_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CloseTerminalRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TerminalServiceServer).Close(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/supervisor.TerminalService/Close",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TerminalServiceServer).Close(ctx, req.(*CloseTerminalRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TerminalService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListTerminalsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TerminalServiceServer).List(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/supervisor.TerminalService/List",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TerminalServiceServer).List(ctx, req.(*ListTerminalsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TerminalService_Listen_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
m := new(ListenTerminalRequest)
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
return err
|
|
}
|
|
return srv.(TerminalServiceServer).Listen(m, &terminalServiceListenServer{stream})
|
|
}
|
|
|
|
type TerminalService_ListenServer interface {
|
|
Send(*ListenTerminalResponse) error
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type terminalServiceListenServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *terminalServiceListenServer) Send(m *ListenTerminalResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func _TerminalService_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(WriteTerminalRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TerminalServiceServer).Write(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/supervisor.TerminalService/Write",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TerminalServiceServer).Write(ctx, req.(*WriteTerminalRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _TerminalService_SetSize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SetTerminalSizeRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(TerminalServiceServer).SetSize(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/supervisor.TerminalService/SetSize",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(TerminalServiceServer).SetSize(ctx, req.(*SetTerminalSizeRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _TerminalService_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "supervisor.TerminalService",
|
|
HandlerType: (*TerminalServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Open",
|
|
Handler: _TerminalService_Open_Handler,
|
|
},
|
|
{
|
|
MethodName: "Close",
|
|
Handler: _TerminalService_Close_Handler,
|
|
},
|
|
{
|
|
MethodName: "List",
|
|
Handler: _TerminalService_List_Handler,
|
|
},
|
|
{
|
|
MethodName: "Write",
|
|
Handler: _TerminalService_Write_Handler,
|
|
},
|
|
{
|
|
MethodName: "SetSize",
|
|
Handler: _TerminalService_SetSize_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "Listen",
|
|
Handler: _TerminalService_Listen_Handler,
|
|
ServerStreams: true,
|
|
},
|
|
},
|
|
Metadata: "terminal.proto",
|
|
}
|