github.com/koko1123/flow-go-1@v0.29.6/engine/ghost/protobuf/ghost.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: ghost.proto 3 4 package ghost 5 6 import ( 7 context "context" 8 fmt "fmt" 9 math "math" 10 11 proto "github.com/golang/protobuf/proto" 12 empty "github.com/golang/protobuf/ptypes/empty" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 28 29 type SubscribeRequest struct { 30 XXX_NoUnkeyedLiteral struct{} `json:"-"` 31 XXX_unrecognized []byte `json:"-"` 32 XXX_sizecache int32 `json:"-"` 33 } 34 35 func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } 36 func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) } 37 func (*SubscribeRequest) ProtoMessage() {} 38 func (*SubscribeRequest) Descriptor() ([]byte, []int) { 39 return fileDescriptor_77edc9f77fb63d46, []int{0} 40 } 41 42 func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error { 43 return xxx_messageInfo_SubscribeRequest.Unmarshal(m, b) 44 } 45 func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 46 return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic) 47 } 48 func (m *SubscribeRequest) XXX_Merge(src proto.Message) { 49 xxx_messageInfo_SubscribeRequest.Merge(m, src) 50 } 51 func (m *SubscribeRequest) XXX_Size() int { 52 return xxx_messageInfo_SubscribeRequest.Size(m) 53 } 54 func (m *SubscribeRequest) XXX_DiscardUnknown() { 55 xxx_messageInfo_SubscribeRequest.DiscardUnknown(m) 56 } 57 58 var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo 59 60 type SendEventRequest struct { 61 ChannelId string `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` 62 Message []byte `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 63 TargetID [][]byte `protobuf:"bytes,3,rep,name=targetID,proto3" json:"targetID,omitempty"` 64 XXX_NoUnkeyedLiteral struct{} `json:"-"` 65 XXX_unrecognized []byte `json:"-"` 66 XXX_sizecache int32 `json:"-"` 67 } 68 69 func (m *SendEventRequest) Reset() { *m = SendEventRequest{} } 70 func (m *SendEventRequest) String() string { return proto.CompactTextString(m) } 71 func (*SendEventRequest) ProtoMessage() {} 72 func (*SendEventRequest) Descriptor() ([]byte, []int) { 73 return fileDescriptor_77edc9f77fb63d46, []int{1} 74 } 75 76 func (m *SendEventRequest) XXX_Unmarshal(b []byte) error { 77 return xxx_messageInfo_SendEventRequest.Unmarshal(m, b) 78 } 79 func (m *SendEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 80 return xxx_messageInfo_SendEventRequest.Marshal(b, m, deterministic) 81 } 82 func (m *SendEventRequest) XXX_Merge(src proto.Message) { 83 xxx_messageInfo_SendEventRequest.Merge(m, src) 84 } 85 func (m *SendEventRequest) XXX_Size() int { 86 return xxx_messageInfo_SendEventRequest.Size(m) 87 } 88 func (m *SendEventRequest) XXX_DiscardUnknown() { 89 xxx_messageInfo_SendEventRequest.DiscardUnknown(m) 90 } 91 92 var xxx_messageInfo_SendEventRequest proto.InternalMessageInfo 93 94 func (m *SendEventRequest) GetChannelId() string { 95 if m != nil { 96 return m.ChannelId 97 } 98 return "" 99 } 100 101 func (m *SendEventRequest) GetMessage() []byte { 102 if m != nil { 103 return m.Message 104 } 105 return nil 106 } 107 108 func (m *SendEventRequest) GetTargetID() [][]byte { 109 if m != nil { 110 return m.TargetID 111 } 112 return nil 113 } 114 115 type FlowMessage struct { 116 SenderID []byte `protobuf:"bytes,1,opt,name=senderID,proto3" json:"senderID,omitempty"` 117 Message []byte `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 118 XXX_NoUnkeyedLiteral struct{} `json:"-"` 119 XXX_unrecognized []byte `json:"-"` 120 XXX_sizecache int32 `json:"-"` 121 } 122 123 func (m *FlowMessage) Reset() { *m = FlowMessage{} } 124 func (m *FlowMessage) String() string { return proto.CompactTextString(m) } 125 func (*FlowMessage) ProtoMessage() {} 126 func (*FlowMessage) Descriptor() ([]byte, []int) { 127 return fileDescriptor_77edc9f77fb63d46, []int{2} 128 } 129 130 func (m *FlowMessage) XXX_Unmarshal(b []byte) error { 131 return xxx_messageInfo_FlowMessage.Unmarshal(m, b) 132 } 133 func (m *FlowMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 134 return xxx_messageInfo_FlowMessage.Marshal(b, m, deterministic) 135 } 136 func (m *FlowMessage) XXX_Merge(src proto.Message) { 137 xxx_messageInfo_FlowMessage.Merge(m, src) 138 } 139 func (m *FlowMessage) XXX_Size() int { 140 return xxx_messageInfo_FlowMessage.Size(m) 141 } 142 func (m *FlowMessage) XXX_DiscardUnknown() { 143 xxx_messageInfo_FlowMessage.DiscardUnknown(m) 144 } 145 146 var xxx_messageInfo_FlowMessage proto.InternalMessageInfo 147 148 func (m *FlowMessage) GetSenderID() []byte { 149 if m != nil { 150 return m.SenderID 151 } 152 return nil 153 } 154 155 func (m *FlowMessage) GetMessage() []byte { 156 if m != nil { 157 return m.Message 158 } 159 return nil 160 } 161 162 func init() { 163 proto.RegisterType((*SubscribeRequest)(nil), "ghost.SubscribeRequest") 164 proto.RegisterType((*SendEventRequest)(nil), "ghost.SendEventRequest") 165 proto.RegisterType((*FlowMessage)(nil), "ghost.FlowMessage") 166 } 167 168 func init() { proto.RegisterFile("ghost.proto", fileDescriptor_77edc9f77fb63d46) } 169 170 var fileDescriptor_77edc9f77fb63d46 = []byte{ 171 // 257 bytes of a gzipped FileDescriptorProto 172 0x1f, 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 0x4f, 0xda, 0x09, 0xa1, 0xf0, 0x7c, 0x78, 0xc0, 0xcd, 0x2f, 0x83, 184 0xf0, 0x79, 0x73, 0xe8, 0xab, 0x91, 0xf4, 0xf0, 0x96, 0xe3, 0x3d, 0x04, 0x7e, 0x7d, 0xbc, 0xe0, 185 0x9d, 0x91, 0xfd, 0x83, 0xe2, 0x73, 0xde, 0x69, 0xe1, 0x5b, 0x2d, 0x7c, 0xba, 0xd1, 0x82, 0x77, 186 0x10, 0x78, 0x21, 0xbb, 0xdf, 0x7b, 0x8a, 0x62, 0xec, 0x1f, 0xfe, 0xad, 0x7f, 0xcd, 0xca, 0x93, 187 0xb6, 0xd7, 0xed, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x01, 0x2b, 0x26, 0xce, 0x86, 0x01, 0x00, 188 0x00, 189 } 190 191 // Reference imports to suppress errors if they are not otherwise used. 192 var _ context.Context 193 var _ grpc.ClientConn 194 195 // This is a compile-time assertion to ensure that this generated file 196 // is compatible with the grpc package it is being compiled against. 197 const _ = grpc.SupportPackageIsVersion4 198 199 // GhostNodeAPIClient is the client API for GhostNodeAPI service. 200 // 201 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 202 type GhostNodeAPIClient interface { 203 // SendEvent submits and event to the internal Flow Libp2p network 204 SendEvent(ctx context.Context, in *SendEventRequest, opts ...grpc.CallOption) (*empty.Empty, error) 205 // Subscribe returns all network messages 206 Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (GhostNodeAPI_SubscribeClient, error) 207 } 208 209 type ghostNodeAPIClient struct { 210 cc *grpc.ClientConn 211 } 212 213 func NewGhostNodeAPIClient(cc *grpc.ClientConn) GhostNodeAPIClient { 214 return &ghostNodeAPIClient{cc} 215 } 216 217 func (c *ghostNodeAPIClient) SendEvent(ctx context.Context, in *SendEventRequest, opts ...grpc.CallOption) (*empty.Empty, error) { 218 out := new(empty.Empty) 219 err := c.cc.Invoke(ctx, "/ghost.GhostNodeAPI/SendEvent", in, out, opts...) 220 if err != nil { 221 return nil, err 222 } 223 return out, nil 224 } 225 226 func (c *ghostNodeAPIClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (GhostNodeAPI_SubscribeClient, error) { 227 stream, err := c.cc.NewStream(ctx, &_GhostNodeAPI_serviceDesc.Streams[0], "/ghost.GhostNodeAPI/Subscribe", opts...) 228 if err != nil { 229 return nil, err 230 } 231 x := &ghostNodeAPISubscribeClient{stream} 232 if err := x.ClientStream.SendMsg(in); err != nil { 233 return nil, err 234 } 235 if err := x.ClientStream.CloseSend(); err != nil { 236 return nil, err 237 } 238 return x, nil 239 } 240 241 type GhostNodeAPI_SubscribeClient interface { 242 Recv() (*FlowMessage, error) 243 grpc.ClientStream 244 } 245 246 type ghostNodeAPISubscribeClient struct { 247 grpc.ClientStream 248 } 249 250 func (x *ghostNodeAPISubscribeClient) Recv() (*FlowMessage, error) { 251 m := new(FlowMessage) 252 if err := x.ClientStream.RecvMsg(m); err != nil { 253 return nil, err 254 } 255 return m, nil 256 } 257 258 // GhostNodeAPIServer is the server API for GhostNodeAPI service. 259 type GhostNodeAPIServer interface { 260 // SendEvent submits and event to the internal Flow Libp2p network 261 SendEvent(context.Context, *SendEventRequest) (*empty.Empty, error) 262 // Subscribe returns all network messages 263 Subscribe(*SubscribeRequest, GhostNodeAPI_SubscribeServer) error 264 } 265 266 // UnimplementedGhostNodeAPIServer can be embedded to have forward compatible implementations. 267 type UnimplementedGhostNodeAPIServer struct { 268 } 269 270 func (*UnimplementedGhostNodeAPIServer) SendEvent(ctx context.Context, req *SendEventRequest) (*empty.Empty, error) { 271 return nil, status.Errorf(codes.Unimplemented, "method SendEvent not implemented") 272 } 273 func (*UnimplementedGhostNodeAPIServer) Subscribe(req *SubscribeRequest, srv GhostNodeAPI_SubscribeServer) error { 274 return status.Errorf(codes.Unimplemented, "method Subscribe not implemented") 275 } 276 277 func RegisterGhostNodeAPIServer(s *grpc.Server, srv GhostNodeAPIServer) { 278 s.RegisterService(&_GhostNodeAPI_serviceDesc, srv) 279 } 280 281 func _GhostNodeAPI_SendEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 282 in := new(SendEventRequest) 283 if err := dec(in); err != nil { 284 return nil, err 285 } 286 if interceptor == nil { 287 return srv.(GhostNodeAPIServer).SendEvent(ctx, in) 288 } 289 info := &grpc.UnaryServerInfo{ 290 Server: srv, 291 FullMethod: "/ghost.GhostNodeAPI/SendEvent", 292 } 293 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 294 return srv.(GhostNodeAPIServer).SendEvent(ctx, req.(*SendEventRequest)) 295 } 296 return interceptor(ctx, in, info, handler) 297 } 298 299 func _GhostNodeAPI_Subscribe_Handler(srv interface{}, stream grpc.ServerStream) error { 300 m := new(SubscribeRequest) 301 if err := stream.RecvMsg(m); err != nil { 302 return err 303 } 304 return srv.(GhostNodeAPIServer).Subscribe(m, &ghostNodeAPISubscribeServer{stream}) 305 } 306 307 type GhostNodeAPI_SubscribeServer interface { 308 Send(*FlowMessage) error 309 grpc.ServerStream 310 } 311 312 type ghostNodeAPISubscribeServer struct { 313 grpc.ServerStream 314 } 315 316 func (x *ghostNodeAPISubscribeServer) Send(m *FlowMessage) error { 317 return x.ServerStream.SendMsg(m) 318 } 319 320 var _GhostNodeAPI_serviceDesc = grpc.ServiceDesc{ 321 ServiceName: "ghost.GhostNodeAPI", 322 HandlerType: (*GhostNodeAPIServer)(nil), 323 Methods: []grpc.MethodDesc{ 324 { 325 MethodName: "SendEvent", 326 Handler: _GhostNodeAPI_SendEvent_Handler, 327 }, 328 }, 329 Streams: []grpc.StreamDesc{ 330 { 331 StreamName: "Subscribe", 332 Handler: _GhostNodeAPI_Subscribe_Handler, 333 ServerStreams: true, 334 }, 335 }, 336 Metadata: "ghost.proto", 337 }