Add the file command with read subcommand
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
|
||||
// protoc-gen-go-drpc version: v0.0.26
|
||||
// protoc-gen-go-drpc version: v0.0.30
|
||||
// source: portal/portal.proto
|
||||
|
||||
package portal
|
||||
@@ -44,6 +44,7 @@ type DRPCPortalClient interface {
|
||||
ServiceStatus(ctx context.Context, in *ServiceRequest) (*ServiceStatusResponse, error)
|
||||
RunCommand(ctx context.Context, in *CommandRequest) (*CommandResponse, error)
|
||||
CPUusage(ctx context.Context, in *CPUusageRequest) (*CPUusageResponse, error)
|
||||
FileRead(ctx context.Context, in *FileReadRequest) (*FileReadResponse, error)
|
||||
}
|
||||
|
||||
type drpcPortalClient struct {
|
||||
@@ -110,6 +111,15 @@ func (c *drpcPortalClient) CPUusage(ctx context.Context, in *CPUusageRequest) (*
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *drpcPortalClient) FileRead(ctx context.Context, in *FileReadRequest) (*FileReadResponse, error) {
|
||||
out := new(FileReadResponse)
|
||||
err := c.cc.Invoke(ctx, "/portal.Portal/FileRead", drpcEncoding_File_portal_portal_proto{}, in, out)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
type DRPCPortalServer interface {
|
||||
ServiceRestart(context.Context, *ServiceRequest) (*ServiceResponse, error)
|
||||
ServiceStart(context.Context, *ServiceRequest) (*ServiceResponse, error)
|
||||
@@ -117,6 +127,7 @@ type DRPCPortalServer interface {
|
||||
ServiceStatus(context.Context, *ServiceRequest) (*ServiceStatusResponse, error)
|
||||
RunCommand(context.Context, *CommandRequest) (*CommandResponse, error)
|
||||
CPUusage(context.Context, *CPUusageRequest) (*CPUusageResponse, error)
|
||||
FileRead(context.Context, *FileReadRequest) (*FileReadResponse, error)
|
||||
}
|
||||
|
||||
type DRPCPortalUnimplementedServer struct{}
|
||||
@@ -145,9 +156,13 @@ func (s *DRPCPortalUnimplementedServer) CPUusage(context.Context, *CPUusageReque
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
|
||||
}
|
||||
|
||||
func (s *DRPCPortalUnimplementedServer) FileRead(context.Context, *FileReadRequest) (*FileReadResponse, error) {
|
||||
return nil, drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
|
||||
}
|
||||
|
||||
type DRPCPortalDescription struct{}
|
||||
|
||||
func (DRPCPortalDescription) NumMethods() int { return 6 }
|
||||
func (DRPCPortalDescription) NumMethods() int { return 7 }
|
||||
|
||||
func (DRPCPortalDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
|
||||
switch n {
|
||||
@@ -205,6 +220,15 @@ func (DRPCPortalDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver
|
||||
in1.(*CPUusageRequest),
|
||||
)
|
||||
}, DRPCPortalServer.CPUusage, true
|
||||
case 6:
|
||||
return "/portal.Portal/FileRead", drpcEncoding_File_portal_portal_proto{},
|
||||
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
|
||||
return srv.(DRPCPortalServer).
|
||||
FileRead(
|
||||
ctx,
|
||||
in1.(*FileReadRequest),
|
||||
)
|
||||
}, DRPCPortalServer.FileRead, true
|
||||
default:
|
||||
return "", nil, nil, nil, false
|
||||
}
|
||||
@@ -309,3 +333,19 @@ func (x *drpcPortal_CPUusageStream) SendAndClose(m *CPUusageResponse) error {
|
||||
}
|
||||
return x.CloseSend()
|
||||
}
|
||||
|
||||
type DRPCPortal_FileReadStream interface {
|
||||
drpc.Stream
|
||||
SendAndClose(*FileReadResponse) error
|
||||
}
|
||||
|
||||
type drpcPortal_FileReadStream struct {
|
||||
drpc.Stream
|
||||
}
|
||||
|
||||
func (x *drpcPortal_FileReadStream) SendAndClose(m *FileReadResponse) error {
|
||||
if err := x.MsgSend(m, drpcEncoding_File_portal_portal_proto{}); err != nil {
|
||||
return err
|
||||
}
|
||||
return x.CloseSend()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user