mirror of https://github.com/poanetwork/gecko.git
222 lines
7.3 KiB
Go
222 lines
7.3 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: greader.proto
|
|
|
|
package greaderproto
|
|
|
|
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
|
|
|
|
type ReadRequest struct {
|
|
Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ReadRequest) Reset() { *m = ReadRequest{} }
|
|
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*ReadRequest) ProtoMessage() {}
|
|
func (*ReadRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f71c24e059a66efb, []int{0}
|
|
}
|
|
|
|
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ReadRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *ReadRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ReadRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ReadRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ReadRequest.Merge(m, src)
|
|
}
|
|
func (m *ReadRequest) XXX_Size() int {
|
|
return xxx_messageInfo_ReadRequest.Size(m)
|
|
}
|
|
func (m *ReadRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ReadRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ReadRequest proto.InternalMessageInfo
|
|
|
|
func (m *ReadRequest) GetLength() int32 {
|
|
if m != nil {
|
|
return m.Length
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ReadResponse struct {
|
|
Read []byte `protobuf:"bytes,1,opt,name=read,proto3" json:"read,omitempty"`
|
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
|
Errored bool `protobuf:"varint,3,opt,name=errored,proto3" json:"errored,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *ReadResponse) Reset() { *m = ReadResponse{} }
|
|
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*ReadResponse) ProtoMessage() {}
|
|
func (*ReadResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_f71c24e059a66efb, []int{1}
|
|
}
|
|
|
|
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_ReadResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *ReadResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_ReadResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *ReadResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_ReadResponse.Merge(m, src)
|
|
}
|
|
func (m *ReadResponse) XXX_Size() int {
|
|
return xxx_messageInfo_ReadResponse.Size(m)
|
|
}
|
|
func (m *ReadResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_ReadResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_ReadResponse proto.InternalMessageInfo
|
|
|
|
func (m *ReadResponse) GetRead() []byte {
|
|
if m != nil {
|
|
return m.Read
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *ReadResponse) GetError() string {
|
|
if m != nil {
|
|
return m.Error
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (m *ReadResponse) GetErrored() bool {
|
|
if m != nil {
|
|
return m.Errored
|
|
}
|
|
return false
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*ReadRequest)(nil), "greaderproto.ReadRequest")
|
|
proto.RegisterType((*ReadResponse)(nil), "greaderproto.ReadResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("greader.proto", fileDescriptor_f71c24e059a66efb) }
|
|
|
|
var fileDescriptor_f71c24e059a66efb = []byte{
|
|
// 168 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x8e, 0x31, 0xef, 0x82, 0x30,
|
|
0x10, 0x47, 0xd3, 0xff, 0x1f, 0x50, 0x4f, 0x5c, 0x2e, 0xc6, 0x54, 0x26, 0x42, 0x62, 0xc2, 0xc4,
|
|
0xa0, 0xb3, 0xb3, 0xfb, 0x7d, 0x03, 0x0c, 0x17, 0x1c, 0x0c, 0xc5, 0x6b, 0xfd, 0xfe, 0x86, 0x2b,
|
|
0x26, 0x0c, 0x6e, 0xef, 0xb5, 0xbf, 0x5c, 0x1e, 0xec, 0x7a, 0xe1, 0xb6, 0x63, 0x69, 0x46, 0x71,
|
|
0xc1, 0x61, 0x3e, 0xab, 0x5a, 0x75, 0x82, 0x2d, 0x71, 0xdb, 0x11, 0xbf, 0xde, 0xec, 0x03, 0x1e,
|
|
0x20, 0x7b, 0xf2, 0xd0, 0x87, 0x87, 0x35, 0xa5, 0xa9, 0x53, 0x9a, 0xad, 0x22, 0xc8, 0xe3, 0xcc,
|
|
0x8f, 0x6e, 0xf0, 0x8c, 0x08, 0xc9, 0x74, 0x45, 0x57, 0x39, 0x29, 0xe3, 0x1e, 0x52, 0x16, 0x71,
|
|
0x62, 0xff, 0x4a, 0x53, 0x6f, 0x28, 0x0a, 0x5a, 0x58, 0x29, 0x70, 0x67, 0xff, 0x4b, 0x53, 0xaf,
|
|
0xe9, 0xab, 0xe7, 0x1b, 0x64, 0xa4, 0x25, 0x78, 0x85, 0x64, 0x22, 0x3c, 0x36, 0xcb, 0xb6, 0x66,
|
|
0x11, 0x56, 0x14, 0xbf, 0xbe, 0x62, 0xcc, 0x3d, 0xd3, 0xb7, 0xcb, 0x27, 0x00, 0x00, 0xff, 0xff,
|
|
0xf0, 0x9c, 0xea, 0x36, 0xe9, 0x00, 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
|
|
|
|
// ReaderClient is the client API for Reader service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type ReaderClient interface {
|
|
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
|
|
}
|
|
|
|
type readerClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewReaderClient(cc grpc.ClientConnInterface) ReaderClient {
|
|
return &readerClient{cc}
|
|
}
|
|
|
|
func (c *readerClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
|
|
out := new(ReadResponse)
|
|
err := c.cc.Invoke(ctx, "/greaderproto.Reader/Read", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// ReaderServer is the server API for Reader service.
|
|
type ReaderServer interface {
|
|
Read(context.Context, *ReadRequest) (*ReadResponse, error)
|
|
}
|
|
|
|
// UnimplementedReaderServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedReaderServer struct {
|
|
}
|
|
|
|
func (*UnimplementedReaderServer) Read(ctx context.Context, req *ReadRequest) (*ReadResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
|
|
}
|
|
|
|
func RegisterReaderServer(s *grpc.Server, srv ReaderServer) {
|
|
s.RegisterService(&_Reader_serviceDesc, srv)
|
|
}
|
|
|
|
func _Reader_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ReadRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(ReaderServer).Read(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/greaderproto.Reader/Read",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(ReaderServer).Read(ctx, req.(*ReadRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Reader_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "greaderproto.Reader",
|
|
HandlerType: (*ReaderServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Read",
|
|
Handler: _Reader_Read_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "greader.proto",
|
|
}
|