Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterGnetcliServer(s grpc.ServiceRegistrar, srv GnetcliServer)
- type CMD
- func (*CMD) Descriptor() ([]byte, []int)deprecated
- func (x *CMD) GetCmd() string
- func (x *CMD) GetCmdTimeout() float64
- func (x *CMD) GetHost() string
- func (x *CMD) GetQa() []*QA
- func (x *CMD) GetReadTimeout() float64
- func (x *CMD) GetStringResult() bool
- func (x *CMD) GetTrace() bool
- func (*CMD) ProtoMessage()
- func (x *CMD) ProtoReflect() protoreflect.Message
- func (x *CMD) Reset()
- func (x *CMD) String() string
- type CMDNetconf
- func (*CMDNetconf) Descriptor() ([]byte, []int)deprecated
- func (x *CMDNetconf) GetCmd() string
- func (x *CMDNetconf) GetCmdTimeout() float64
- func (x *CMDNetconf) GetHost() string
- func (x *CMDNetconf) GetJson() bool
- func (x *CMDNetconf) GetReadTimeout() float64
- func (*CMDNetconf) ProtoMessage()
- func (x *CMDNetconf) ProtoReflect() protoreflect.Message
- func (x *CMDNetconf) Reset()
- func (x *CMDNetconf) String() string
- type CMDResult
- func (*CMDResult) Descriptor() ([]byte, []int)deprecated
- func (x *CMDResult) GetError() []byte
- func (x *CMDResult) GetErrorStr() string
- func (x *CMDResult) GetOut() []byte
- func (x *CMDResult) GetOutStr() string
- func (x *CMDResult) GetStatus() int32
- func (x *CMDResult) GetTrace() []*CMDTraceItem
- func (*CMDResult) ProtoMessage()
- func (x *CMDResult) ProtoReflect() protoreflect.Message
- func (x *CMDResult) Reset()
- func (x *CMDResult) String() string
- type CMDTraceItem
- func (*CMDTraceItem) Descriptor() ([]byte, []int)deprecated
- func (x *CMDTraceItem) GetData() []byte
- func (x *CMDTraceItem) GetOperation() TraceOperation
- func (*CMDTraceItem) ProtoMessage()
- func (x *CMDTraceItem) ProtoReflect() protoreflect.Message
- func (x *CMDTraceItem) Reset()
- func (x *CMDTraceItem) String() string
- type Credentials
- func (*Credentials) Descriptor() ([]byte, []int)deprecated
- func (x *Credentials) GetLogin() string
- func (x *Credentials) GetPassword() string
- func (*Credentials) ProtoMessage()
- func (x *Credentials) ProtoReflect() protoreflect.Message
- func (x *Credentials) Reset()
- func (x *Credentials) String() string
- type Device
- func (*Device) Descriptor() ([]byte, []int)deprecated
- func (x *Device) GetErrorExpression() string
- func (x *Device) GetName() string
- func (x *Device) GetPagerExpression() string
- func (x *Device) GetPromptExpression() string
- func (*Device) ProtoMessage()
- func (x *Device) ProtoReflect() protoreflect.Message
- func (x *Device) Reset()
- func (x *Device) String() string
- type DeviceResult
- func (*DeviceResult) Descriptor() ([]byte, []int)deprecated
- func (x *DeviceResult) GetError() string
- func (x *DeviceResult) GetRes() DeviceResultStatus
- func (*DeviceResult) ProtoMessage()
- func (x *DeviceResult) ProtoReflect() protoreflect.Message
- func (x *DeviceResult) Reset()
- func (x *DeviceResult) String() string
- type DeviceResultStatus
- func (DeviceResultStatus) Descriptor() protoreflect.EnumDescriptor
- func (x DeviceResultStatus) Enum() *DeviceResultStatus
- func (DeviceResultStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x DeviceResultStatus) Number() protoreflect.EnumNumber
- func (x DeviceResultStatus) String() string
- func (DeviceResultStatus) Type() protoreflect.EnumType
- type FileData
- func (*FileData) Descriptor() ([]byte, []int)deprecated
- func (x *FileData) GetData() []byte
- func (x *FileData) GetPath() string
- func (x *FileData) GetStatus() FileStatus
- func (*FileData) ProtoMessage()
- func (x *FileData) ProtoReflect() protoreflect.Message
- func (x *FileData) Reset()
- func (x *FileData) String() string
- type FileDownloadRequest
- func (*FileDownloadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileDownloadRequest) GetCredentials() *Credentials
- func (x *FileDownloadRequest) GetDevice() string
- func (x *FileDownloadRequest) GetHost() string
- func (x *FileDownloadRequest) GetPaths() []string
- func (*FileDownloadRequest) ProtoMessage()
- func (x *FileDownloadRequest) ProtoReflect() protoreflect.Message
- func (x *FileDownloadRequest) Reset()
- func (x *FileDownloadRequest) String() string
- type FileStatus
- type FileUploadRequest
- func (*FileUploadRequest) Descriptor() ([]byte, []int)deprecated
- func (x *FileUploadRequest) GetCredentials() *Credentials
- func (x *FileUploadRequest) GetDevice() string
- func (x *FileUploadRequest) GetFiles() []*FileData
- func (x *FileUploadRequest) GetHost() string
- func (*FileUploadRequest) ProtoMessage()
- func (x *FileUploadRequest) ProtoReflect() protoreflect.Message
- func (x *FileUploadRequest) Reset()
- func (x *FileUploadRequest) String() string
- type FilesResult
- type GnetcliClient
- type GnetcliServer
- type Gnetcli_ExecChatClient
- type Gnetcli_ExecChatServer
- type Gnetcli_ExecNetconfChatClient
- type Gnetcli_ExecNetconfChatServer
- type HostParams
- func (*HostParams) Descriptor() ([]byte, []int)deprecated
- func (x *HostParams) GetCredentials() *Credentials
- func (x *HostParams) GetDevice() string
- func (x *HostParams) GetHost() string
- func (x *HostParams) GetPort() int32
- func (*HostParams) ProtoMessage()
- func (x *HostParams) ProtoReflect() protoreflect.Message
- func (x *HostParams) Reset()
- func (x *HostParams) String() string
- type QA
- type TraceOperation
- func (TraceOperation) Descriptor() protoreflect.EnumDescriptor
- func (x TraceOperation) Enum() *TraceOperation
- func (TraceOperation) EnumDescriptor() ([]byte, []int)deprecated
- func (x TraceOperation) Number() protoreflect.EnumNumber
- func (x TraceOperation) String() string
- func (TraceOperation) Type() protoreflect.EnumType
- type UnimplementedGnetcliServer
- func (UnimplementedGnetcliServer) AddDevice(context.Context, *Device) (*DeviceResult, error)
- func (UnimplementedGnetcliServer) Download(context.Context, *FileDownloadRequest) (*FilesResult, error)
- func (UnimplementedGnetcliServer) Exec(context.Context, *CMD) (*CMDResult, error)
- func (UnimplementedGnetcliServer) ExecChat(Gnetcli_ExecChatServer) error
- func (UnimplementedGnetcliServer) ExecNetconf(context.Context, *CMDNetconf) (*CMDResult, error)
- func (UnimplementedGnetcliServer) ExecNetconfChat(Gnetcli_ExecNetconfChatServer) error
- func (UnimplementedGnetcliServer) SetupHostParams(context.Context, *HostParams) (*emptypb.Empty, error)
- func (UnimplementedGnetcliServer) Upload(context.Context, *FileUploadRequest) (*emptypb.Empty, error)
- type UnsafeGnetcliServer
Constants ¶
const ( Gnetcli_SetupHostParams_FullMethodName = "/gnetcli.Gnetcli/SetupHostParams" Gnetcli_Exec_FullMethodName = "/gnetcli.Gnetcli/Exec" Gnetcli_ExecChat_FullMethodName = "/gnetcli.Gnetcli/ExecChat" Gnetcli_AddDevice_FullMethodName = "/gnetcli.Gnetcli/AddDevice" Gnetcli_ExecNetconf_FullMethodName = "/gnetcli.Gnetcli/ExecNetconf" Gnetcli_ExecNetconfChat_FullMethodName = "/gnetcli.Gnetcli/ExecNetconfChat" Gnetcli_Download_FullMethodName = "/gnetcli.Gnetcli/Download" Gnetcli_Upload_FullMethodName = "/gnetcli.Gnetcli/Upload" )
Variables ¶
var ( TraceOperation_name = map[int32]string{ 0: "Operation_notset", 1: "Operation_unknown", 2: "Operation_write", 3: "Operation_read", } TraceOperation_value = map[string]int32{ "Operation_notset": 0, "Operation_unknown": 1, "Operation_write": 2, "Operation_read": 3, } )
Enum value maps for TraceOperation.
var ( DeviceResultStatus_name = map[int32]string{ 0: "Device_notset", 1: "Device_ok", 2: "Device_error", } DeviceResultStatus_value = map[string]int32{ "Device_notset": 0, "Device_ok": 1, "Device_error": 2, } )
Enum value maps for DeviceResultStatus.
var ( FileStatus_name = map[int32]string{ 0: "FileStatus_notset", 1: "FileStatus_ok", 2: "FileStatus_error", 3: "FileStatus_not_found", 4: "FileStatus_is_dir", } FileStatus_value = map[string]int32{ "FileStatus_notset": 0, "FileStatus_ok": 1, "FileStatus_error": 2, "FileStatus_not_found": 3, "FileStatus_is_dir": 4, } )
Enum value maps for FileStatus.
var File_server_proto protoreflect.FileDescriptor
var Gnetcli_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gnetcli.Gnetcli", HandlerType: (*GnetcliServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SetupHostParams", Handler: _Gnetcli_SetupHostParams_Handler, }, { MethodName: "Exec", Handler: _Gnetcli_Exec_Handler, }, { MethodName: "AddDevice", Handler: _Gnetcli_AddDevice_Handler, }, { MethodName: "ExecNetconf", Handler: _Gnetcli_ExecNetconf_Handler, }, { MethodName: "Download", Handler: _Gnetcli_Download_Handler, }, { MethodName: "Upload", Handler: _Gnetcli_Upload_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ExecChat", Handler: _Gnetcli_ExecChat_Handler, ServerStreams: true, ClientStreams: true, }, { StreamName: "ExecNetconfChat", Handler: _Gnetcli_ExecNetconfChat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "server.proto", }
Gnetcli_ServiceDesc is the grpc.ServiceDesc for Gnetcli service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGnetcliServer ¶
func RegisterGnetcliServer(s grpc.ServiceRegistrar, srv GnetcliServer)
Types ¶
type CMD ¶
type CMD struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` Trace bool `protobuf:"varint,3,opt,name=trace,proto3" json:"trace,omitempty"` Qa []*QA `protobuf:"bytes,4,rep,name=qa,proto3" json:"qa,omitempty"` ReadTimeout float64 `protobuf:"fixed64,5,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"` CmdTimeout float64 `protobuf:"fixed64,6,opt,name=cmd_timeout,json=cmdTimeout,proto3" json:"cmd_timeout,omitempty"` StringResult bool `protobuf:"varint,8,opt,name=string_result,json=stringResult,proto3" json:"string_result,omitempty"` // contains filtered or unexported fields }
func (*CMD) Descriptor
deprecated
func (*CMD) GetCmdTimeout ¶
func (*CMD) GetReadTimeout ¶
func (*CMD) GetStringResult ¶
func (*CMD) ProtoMessage ¶
func (*CMD) ProtoMessage()
func (*CMD) ProtoReflect ¶
func (x *CMD) ProtoReflect() protoreflect.Message
type CMDNetconf ¶
type CMDNetconf struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Cmd string `protobuf:"bytes,2,opt,name=cmd,proto3" json:"cmd,omitempty"` Json bool `protobuf:"varint,3,opt,name=json,proto3" json:"json,omitempty"` ReadTimeout float64 `protobuf:"fixed64,4,opt,name=read_timeout,json=readTimeout,proto3" json:"read_timeout,omitempty"` // read timeout in seconds CmdTimeout float64 `protobuf:"fixed64,5,opt,name=cmd_timeout,json=cmdTimeout,proto3" json:"cmd_timeout,omitempty"` // command execution timeout in seconds // contains filtered or unexported fields }
func (*CMDNetconf) Descriptor
deprecated
func (*CMDNetconf) Descriptor() ([]byte, []int)
Deprecated: Use CMDNetconf.ProtoReflect.Descriptor instead.
func (*CMDNetconf) GetCmd ¶
func (x *CMDNetconf) GetCmd() string
func (*CMDNetconf) GetCmdTimeout ¶
func (x *CMDNetconf) GetCmdTimeout() float64
func (*CMDNetconf) GetHost ¶
func (x *CMDNetconf) GetHost() string
func (*CMDNetconf) GetJson ¶
func (x *CMDNetconf) GetJson() bool
func (*CMDNetconf) GetReadTimeout ¶
func (x *CMDNetconf) GetReadTimeout() float64
func (*CMDNetconf) ProtoMessage ¶
func (*CMDNetconf) ProtoMessage()
func (*CMDNetconf) ProtoReflect ¶
func (x *CMDNetconf) ProtoReflect() protoreflect.Message
func (*CMDNetconf) Reset ¶
func (x *CMDNetconf) Reset()
func (*CMDNetconf) String ¶
func (x *CMDNetconf) String() string
type CMDResult ¶
type CMDResult struct { Out []byte `protobuf:"bytes,1,opt,name=out,proto3" json:"out,omitempty"` OutStr string `protobuf:"bytes,2,opt,name=out_str,json=outStr,proto3" json:"out_str,omitempty"` Error []byte `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` ErrorStr string `protobuf:"bytes,4,opt,name=error_str,json=errorStr,proto3" json:"error_str,omitempty"` Trace []*CMDTraceItem `protobuf:"bytes,5,rep,name=trace,proto3" json:"trace,omitempty"` Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*CMDResult) Descriptor
deprecated
func (*CMDResult) GetErrorStr ¶
func (*CMDResult) GetTrace ¶
func (x *CMDResult) GetTrace() []*CMDTraceItem
func (*CMDResult) ProtoMessage ¶
func (*CMDResult) ProtoMessage()
func (*CMDResult) ProtoReflect ¶
func (x *CMDResult) ProtoReflect() protoreflect.Message
type CMDTraceItem ¶
type CMDTraceItem struct { Operation TraceOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=gnetcli.TraceOperation" json:"operation,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*CMDTraceItem) Descriptor
deprecated
func (*CMDTraceItem) Descriptor() ([]byte, []int)
Deprecated: Use CMDTraceItem.ProtoReflect.Descriptor instead.
func (*CMDTraceItem) GetData ¶
func (x *CMDTraceItem) GetData() []byte
func (*CMDTraceItem) GetOperation ¶
func (x *CMDTraceItem) GetOperation() TraceOperation
func (*CMDTraceItem) ProtoMessage ¶
func (*CMDTraceItem) ProtoMessage()
func (*CMDTraceItem) ProtoReflect ¶
func (x *CMDTraceItem) ProtoReflect() protoreflect.Message
func (*CMDTraceItem) Reset ¶
func (x *CMDTraceItem) Reset()
func (*CMDTraceItem) String ¶
func (x *CMDTraceItem) String() string
type Credentials ¶
type Credentials struct { Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Credentials) Descriptor
deprecated
func (*Credentials) Descriptor() ([]byte, []int)
Deprecated: Use Credentials.ProtoReflect.Descriptor instead.
func (*Credentials) GetLogin ¶
func (x *Credentials) GetLogin() string
func (*Credentials) GetPassword ¶
func (x *Credentials) GetPassword() string
func (*Credentials) ProtoMessage ¶
func (*Credentials) ProtoMessage()
func (*Credentials) ProtoReflect ¶
func (x *Credentials) ProtoReflect() protoreflect.Message
func (*Credentials) Reset ¶
func (x *Credentials) Reset()
func (*Credentials) String ¶
func (x *Credentials) String() string
type Device ¶
type Device struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` PromptExpression string `protobuf:"bytes,2,opt,name=prompt_expression,json=promptExpression,proto3" json:"prompt_expression,omitempty"` ErrorExpression string `protobuf:"bytes,3,opt,name=error_expression,json=errorExpression,proto3" json:"error_expression,omitempty"` PagerExpression string `protobuf:"bytes,4,opt,name=pager_expression,json=pagerExpression,proto3" json:"pager_expression,omitempty"` // contains filtered or unexported fields }
func (*Device) Descriptor
deprecated
func (*Device) GetErrorExpression ¶
func (*Device) GetPagerExpression ¶
func (*Device) GetPromptExpression ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (*Device) ProtoReflect ¶
func (x *Device) ProtoReflect() protoreflect.Message
type DeviceResult ¶
type DeviceResult struct { Res DeviceResultStatus `protobuf:"varint,1,opt,name=res,proto3,enum=gnetcli.DeviceResultStatus" json:"res,omitempty"` Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // contains filtered or unexported fields }
func (*DeviceResult) Descriptor
deprecated
func (*DeviceResult) Descriptor() ([]byte, []int)
Deprecated: Use DeviceResult.ProtoReflect.Descriptor instead.
func (*DeviceResult) GetError ¶
func (x *DeviceResult) GetError() string
func (*DeviceResult) GetRes ¶
func (x *DeviceResult) GetRes() DeviceResultStatus
func (*DeviceResult) ProtoMessage ¶
func (*DeviceResult) ProtoMessage()
func (*DeviceResult) ProtoReflect ¶
func (x *DeviceResult) ProtoReflect() protoreflect.Message
func (*DeviceResult) Reset ¶
func (x *DeviceResult) Reset()
func (*DeviceResult) String ¶
func (x *DeviceResult) String() string
type DeviceResultStatus ¶
type DeviceResultStatus int32
const ( DeviceResultStatus_Device_notset DeviceResultStatus = 0 DeviceResultStatus_Device_ok DeviceResultStatus = 1 DeviceResultStatus_Device_error DeviceResultStatus = 2 )
func (DeviceResultStatus) Descriptor ¶
func (DeviceResultStatus) Descriptor() protoreflect.EnumDescriptor
func (DeviceResultStatus) Enum ¶
func (x DeviceResultStatus) Enum() *DeviceResultStatus
func (DeviceResultStatus) EnumDescriptor
deprecated
func (DeviceResultStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use DeviceResultStatus.Descriptor instead.
func (DeviceResultStatus) Number ¶
func (x DeviceResultStatus) Number() protoreflect.EnumNumber
func (DeviceResultStatus) String ¶
func (x DeviceResultStatus) String() string
func (DeviceResultStatus) Type ¶
func (DeviceResultStatus) Type() protoreflect.EnumType
type FileData ¶ added in v1.0.4
type FileData struct { Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` Status FileStatus `protobuf:"varint,3,opt,name=status,proto3,enum=gnetcli.FileStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*FileData) Descriptor
deprecated
added in
v1.0.4
func (*FileData) GetStatus ¶ added in v1.0.4
func (x *FileData) GetStatus() FileStatus
func (*FileData) ProtoMessage ¶ added in v1.0.4
func (*FileData) ProtoMessage()
func (*FileData) ProtoReflect ¶ added in v1.0.4
func (x *FileData) ProtoReflect() protoreflect.Message
type FileDownloadRequest ¶
type FileDownloadRequest struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"` Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` Credentials *Credentials `protobuf:"bytes,4,opt,name=credentials,proto3" json:"credentials,omitempty"` // contains filtered or unexported fields }
func (*FileDownloadRequest) Descriptor
deprecated
func (*FileDownloadRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileDownloadRequest.ProtoReflect.Descriptor instead.
func (*FileDownloadRequest) GetCredentials ¶
func (x *FileDownloadRequest) GetCredentials() *Credentials
func (*FileDownloadRequest) GetDevice ¶
func (x *FileDownloadRequest) GetDevice() string
func (*FileDownloadRequest) GetHost ¶
func (x *FileDownloadRequest) GetHost() string
func (*FileDownloadRequest) GetPaths ¶ added in v1.0.4
func (x *FileDownloadRequest) GetPaths() []string
func (*FileDownloadRequest) ProtoMessage ¶
func (*FileDownloadRequest) ProtoMessage()
func (*FileDownloadRequest) ProtoReflect ¶
func (x *FileDownloadRequest) ProtoReflect() protoreflect.Message
func (*FileDownloadRequest) Reset ¶
func (x *FileDownloadRequest) Reset()
func (*FileDownloadRequest) String ¶
func (x *FileDownloadRequest) String() string
type FileStatus ¶ added in v1.0.4
type FileStatus int32
const ( FileStatus_FileStatus_notset FileStatus = 0 FileStatus_FileStatus_ok FileStatus = 1 FileStatus_FileStatus_error FileStatus = 2 FileStatus_FileStatus_not_found FileStatus = 3 FileStatus_FileStatus_is_dir FileStatus = 4 )
func (FileStatus) Descriptor ¶ added in v1.0.4
func (FileStatus) Descriptor() protoreflect.EnumDescriptor
func (FileStatus) Enum ¶ added in v1.0.4
func (x FileStatus) Enum() *FileStatus
func (FileStatus) EnumDescriptor
deprecated
added in
v1.0.4
func (FileStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use FileStatus.Descriptor instead.
func (FileStatus) Number ¶ added in v1.0.4
func (x FileStatus) Number() protoreflect.EnumNumber
func (FileStatus) String ¶ added in v1.0.4
func (x FileStatus) String() string
func (FileStatus) Type ¶ added in v1.0.4
func (FileStatus) Type() protoreflect.EnumType
type FileUploadRequest ¶
type FileUploadRequest struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Device string `protobuf:"bytes,4,opt,name=device,proto3" json:"device,omitempty"` Files []*FileData `protobuf:"bytes,3,rep,name=files,proto3" json:"files,omitempty"` Credentials *Credentials `protobuf:"bytes,5,opt,name=credentials,proto3" json:"credentials,omitempty"` // contains filtered or unexported fields }
func (*FileUploadRequest) Descriptor
deprecated
func (*FileUploadRequest) Descriptor() ([]byte, []int)
Deprecated: Use FileUploadRequest.ProtoReflect.Descriptor instead.
func (*FileUploadRequest) GetCredentials ¶
func (x *FileUploadRequest) GetCredentials() *Credentials
func (*FileUploadRequest) GetDevice ¶
func (x *FileUploadRequest) GetDevice() string
func (*FileUploadRequest) GetFiles ¶ added in v1.0.4
func (x *FileUploadRequest) GetFiles() []*FileData
func (*FileUploadRequest) GetHost ¶
func (x *FileUploadRequest) GetHost() string
func (*FileUploadRequest) ProtoMessage ¶
func (*FileUploadRequest) ProtoMessage()
func (*FileUploadRequest) ProtoReflect ¶
func (x *FileUploadRequest) ProtoReflect() protoreflect.Message
func (*FileUploadRequest) Reset ¶
func (x *FileUploadRequest) Reset()
func (*FileUploadRequest) String ¶
func (x *FileUploadRequest) String() string
type FilesResult ¶
type FilesResult struct { Files []*FileData `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"` // contains filtered or unexported fields }
func (*FilesResult) Descriptor
deprecated
func (*FilesResult) Descriptor() ([]byte, []int)
Deprecated: Use FilesResult.ProtoReflect.Descriptor instead.
func (*FilesResult) GetFiles ¶
func (x *FilesResult) GetFiles() []*FileData
func (*FilesResult) ProtoMessage ¶
func (*FilesResult) ProtoMessage()
func (*FilesResult) ProtoReflect ¶
func (x *FilesResult) ProtoReflect() protoreflect.Message
func (*FilesResult) Reset ¶
func (x *FilesResult) Reset()
func (*FilesResult) String ¶
func (x *FilesResult) String() string
type GnetcliClient ¶
type GnetcliClient interface { SetupHostParams(ctx context.Context, in *HostParams, opts ...grpc.CallOption) (*emptypb.Empty, error) Exec(ctx context.Context, in *CMD, opts ...grpc.CallOption) (*CMDResult, error) ExecChat(ctx context.Context, opts ...grpc.CallOption) (Gnetcli_ExecChatClient, error) AddDevice(ctx context.Context, in *Device, opts ...grpc.CallOption) (*DeviceResult, error) ExecNetconf(ctx context.Context, in *CMDNetconf, opts ...grpc.CallOption) (*CMDResult, error) ExecNetconfChat(ctx context.Context, opts ...grpc.CallOption) (Gnetcli_ExecNetconfChatClient, error) Download(ctx context.Context, in *FileDownloadRequest, opts ...grpc.CallOption) (*FilesResult, error) Upload(ctx context.Context, in *FileUploadRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
GnetcliClient is the client API for Gnetcli 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.
func NewGnetcliClient ¶
func NewGnetcliClient(cc grpc.ClientConnInterface) GnetcliClient
type GnetcliServer ¶
type GnetcliServer interface { SetupHostParams(context.Context, *HostParams) (*emptypb.Empty, error) Exec(context.Context, *CMD) (*CMDResult, error) ExecChat(Gnetcli_ExecChatServer) error AddDevice(context.Context, *Device) (*DeviceResult, error) ExecNetconf(context.Context, *CMDNetconf) (*CMDResult, error) ExecNetconfChat(Gnetcli_ExecNetconfChatServer) error Download(context.Context, *FileDownloadRequest) (*FilesResult, error) Upload(context.Context, *FileUploadRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
GnetcliServer is the server API for Gnetcli service. All implementations must embed UnimplementedGnetcliServer for forward compatibility
type Gnetcli_ExecChatClient ¶
type Gnetcli_ExecChatServer ¶
type Gnetcli_ExecNetconfChatClient ¶
type Gnetcli_ExecNetconfChatClient interface { Send(*CMDNetconf) error Recv() (*CMDResult, error) grpc.ClientStream }
type Gnetcli_ExecNetconfChatServer ¶
type Gnetcli_ExecNetconfChatServer interface { Send(*CMDResult) error Recv() (*CMDNetconf, error) grpc.ServerStream }
type HostParams ¶ added in v1.0.4
type HostParams struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Credentials *Credentials `protobuf:"bytes,2,opt,name=credentials,proto3" json:"credentials,omitempty"` Port int32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"` Device string `protobuf:"bytes,4,opt,name=device,proto3" json:"device,omitempty"` // contains filtered or unexported fields }
func (*HostParams) Descriptor
deprecated
added in
v1.0.4
func (*HostParams) Descriptor() ([]byte, []int)
Deprecated: Use HostParams.ProtoReflect.Descriptor instead.
func (*HostParams) GetCredentials ¶ added in v1.0.4
func (x *HostParams) GetCredentials() *Credentials
func (*HostParams) GetDevice ¶ added in v1.0.4
func (x *HostParams) GetDevice() string
func (*HostParams) GetHost ¶ added in v1.0.4
func (x *HostParams) GetHost() string
func (*HostParams) GetPort ¶ added in v1.0.4
func (x *HostParams) GetPort() int32
func (*HostParams) ProtoMessage ¶ added in v1.0.4
func (*HostParams) ProtoMessage()
func (*HostParams) ProtoReflect ¶ added in v1.0.4
func (x *HostParams) ProtoReflect() protoreflect.Message
func (*HostParams) Reset ¶ added in v1.0.4
func (x *HostParams) Reset()
func (*HostParams) String ¶ added in v1.0.4
func (x *HostParams) String() string
type QA ¶
type QA struct { Question string `protobuf:"bytes,1,opt,name=question,proto3" json:"question,omitempty"` Answer string `protobuf:"bytes,2,opt,name=answer,proto3" json:"answer,omitempty"` // contains filtered or unexported fields }
func (*QA) Descriptor
deprecated
func (*QA) GetQuestion ¶
func (*QA) ProtoMessage ¶
func (*QA) ProtoMessage()
func (*QA) ProtoReflect ¶
func (x *QA) ProtoReflect() protoreflect.Message
type TraceOperation ¶
type TraceOperation int32
const ( TraceOperation_Operation_notset TraceOperation = 0 TraceOperation_Operation_unknown TraceOperation = 1 TraceOperation_Operation_write TraceOperation = 2 TraceOperation_Operation_read TraceOperation = 3 )
func (TraceOperation) Descriptor ¶
func (TraceOperation) Descriptor() protoreflect.EnumDescriptor
func (TraceOperation) Enum ¶
func (x TraceOperation) Enum() *TraceOperation
func (TraceOperation) EnumDescriptor
deprecated
func (TraceOperation) EnumDescriptor() ([]byte, []int)
Deprecated: Use TraceOperation.Descriptor instead.
func (TraceOperation) Number ¶
func (x TraceOperation) Number() protoreflect.EnumNumber
func (TraceOperation) String ¶
func (x TraceOperation) String() string
func (TraceOperation) Type ¶
func (TraceOperation) Type() protoreflect.EnumType
type UnimplementedGnetcliServer ¶
type UnimplementedGnetcliServer struct { }
UnimplementedGnetcliServer must be embedded to have forward compatible implementations.
func (UnimplementedGnetcliServer) AddDevice ¶
func (UnimplementedGnetcliServer) AddDevice(context.Context, *Device) (*DeviceResult, error)
func (UnimplementedGnetcliServer) Download ¶ added in v1.0.4
func (UnimplementedGnetcliServer) Download(context.Context, *FileDownloadRequest) (*FilesResult, error)
func (UnimplementedGnetcliServer) ExecChat ¶
func (UnimplementedGnetcliServer) ExecChat(Gnetcli_ExecChatServer) error
func (UnimplementedGnetcliServer) ExecNetconf ¶
func (UnimplementedGnetcliServer) ExecNetconf(context.Context, *CMDNetconf) (*CMDResult, error)
func (UnimplementedGnetcliServer) ExecNetconfChat ¶
func (UnimplementedGnetcliServer) ExecNetconfChat(Gnetcli_ExecNetconfChatServer) error
func (UnimplementedGnetcliServer) SetupHostParams ¶ added in v1.0.4
func (UnimplementedGnetcliServer) SetupHostParams(context.Context, *HostParams) (*emptypb.Empty, error)
func (UnimplementedGnetcliServer) Upload ¶
func (UnimplementedGnetcliServer) Upload(context.Context, *FileUploadRequest) (*emptypb.Empty, error)
type UnsafeGnetcliServer ¶
type UnsafeGnetcliServer interface {
// contains filtered or unexported methods
}
UnsafeGnetcliServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GnetcliServer will result in compilation errors.