mirror of https://github.com/poanetwork/gecko.git
195 lines
6.7 KiB
Go
195 lines
6.7 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: messenger.proto
|
|
|
|
package messengerproto
|
|
|
|
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 NotifyRequest struct {
|
|
Message uint32 `protobuf:"varint,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NotifyRequest) Reset() { *m = NotifyRequest{} }
|
|
func (m *NotifyRequest) String() string { return proto.CompactTextString(m) }
|
|
func (*NotifyRequest) ProtoMessage() {}
|
|
func (*NotifyRequest) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_b99aba0cbf4e4b91, []int{0}
|
|
}
|
|
|
|
func (m *NotifyRequest) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NotifyRequest.Unmarshal(m, b)
|
|
}
|
|
func (m *NotifyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NotifyRequest.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NotifyRequest) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NotifyRequest.Merge(m, src)
|
|
}
|
|
func (m *NotifyRequest) XXX_Size() int {
|
|
return xxx_messageInfo_NotifyRequest.Size(m)
|
|
}
|
|
func (m *NotifyRequest) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NotifyRequest.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NotifyRequest proto.InternalMessageInfo
|
|
|
|
func (m *NotifyRequest) GetMessage() uint32 {
|
|
if m != nil {
|
|
return m.Message
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type NotifyResponse struct {
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *NotifyResponse) Reset() { *m = NotifyResponse{} }
|
|
func (m *NotifyResponse) String() string { return proto.CompactTextString(m) }
|
|
func (*NotifyResponse) ProtoMessage() {}
|
|
func (*NotifyResponse) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_b99aba0cbf4e4b91, []int{1}
|
|
}
|
|
|
|
func (m *NotifyResponse) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_NotifyResponse.Unmarshal(m, b)
|
|
}
|
|
func (m *NotifyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_NotifyResponse.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *NotifyResponse) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_NotifyResponse.Merge(m, src)
|
|
}
|
|
func (m *NotifyResponse) XXX_Size() int {
|
|
return xxx_messageInfo_NotifyResponse.Size(m)
|
|
}
|
|
func (m *NotifyResponse) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_NotifyResponse.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_NotifyResponse proto.InternalMessageInfo
|
|
|
|
func init() {
|
|
proto.RegisterType((*NotifyRequest)(nil), "messengerproto.NotifyRequest")
|
|
proto.RegisterType((*NotifyResponse)(nil), "messengerproto.NotifyResponse")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("messenger.proto", fileDescriptor_b99aba0cbf4e4b91) }
|
|
|
|
var fileDescriptor_b99aba0cbf4e4b91 = []byte{
|
|
// 126 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0x4d, 0x2d, 0x2e,
|
|
0x4e, 0xcd, 0x4b, 0x4f, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x83, 0x0b, 0x80,
|
|
0xf9, 0x4a, 0x9a, 0x5c, 0xbc, 0x7e, 0xf9, 0x25, 0x99, 0x69, 0x95, 0x41, 0xa9, 0x85, 0xa5, 0xa9,
|
|
0xc5, 0x25, 0x42, 0x12, 0x5c, 0xec, 0x20, 0x25, 0x89, 0xe9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a,
|
|
0xbc, 0x41, 0x30, 0xae, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0x69, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa,
|
|
0x51, 0x08, 0x17, 0xa7, 0x2f, 0xcc, 0x38, 0x21, 0x77, 0x2e, 0x36, 0x88, 0xb4, 0x90, 0xac, 0x1e,
|
|
0xaa, 0x25, 0x7a, 0x28, 0x36, 0x48, 0xc9, 0xe1, 0x92, 0x86, 0x98, 0x9a, 0xc4, 0x06, 0x16, 0x35,
|
|
0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x0b, 0xb8, 0x8d, 0x52, 0xbc, 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
|
|
|
|
// MessengerClient is the client API for Messenger service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
type MessengerClient interface {
|
|
Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
|
|
}
|
|
|
|
type messengerClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMessengerClient(cc grpc.ClientConnInterface) MessengerClient {
|
|
return &messengerClient{cc}
|
|
}
|
|
|
|
func (c *messengerClient) Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
|
|
out := new(NotifyResponse)
|
|
err := c.cc.Invoke(ctx, "/messengerproto.Messenger/Notify", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// MessengerServer is the server API for Messenger service.
|
|
type MessengerServer interface {
|
|
Notify(context.Context, *NotifyRequest) (*NotifyResponse, error)
|
|
}
|
|
|
|
// UnimplementedMessengerServer can be embedded to have forward compatible implementations.
|
|
type UnimplementedMessengerServer struct {
|
|
}
|
|
|
|
func (*UnimplementedMessengerServer) Notify(ctx context.Context, req *NotifyRequest) (*NotifyResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Notify not implemented")
|
|
}
|
|
|
|
func RegisterMessengerServer(s *grpc.Server, srv MessengerServer) {
|
|
s.RegisterService(&_Messenger_serviceDesc, srv)
|
|
}
|
|
|
|
func _Messenger_Notify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(NotifyRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(MessengerServer).Notify(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/messengerproto.Messenger/Notify",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(MessengerServer).Notify(ctx, req.(*NotifyRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Messenger_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "messengerproto.Messenger",
|
|
HandlerType: (*MessengerServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Notify",
|
|
Handler: _Messenger_Notify_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "messenger.proto",
|
|
}
|