// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.29.2 // source: api/proto/im/v1/im.proto package imv1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( RoomBridgeService_PublishRoomEvent_FullMethodName = "/hyapp.im.v1.RoomBridgeService/PublishRoomEvent" RoomBridgeService_PushSystemNotice_FullMethodName = "/hyapp.im.v1.RoomBridgeService/PushSystemNotice" RoomBridgeService_ForceRoomResync_FullMethodName = "/hyapp.im.v1.RoomBridgeService/ForceRoomResync" ) // RoomBridgeServiceClient is the client API for RoomBridgeService 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. // // RoomBridgeService 只承载 room-service 与 im-service 的内部桥接能力。 type RoomBridgeServiceClient interface { PublishRoomEvent(ctx context.Context, in *PublishRoomEventRequest, opts ...grpc.CallOption) (*PublishRoomEventResponse, error) PushSystemNotice(ctx context.Context, in *PushSystemNoticeRequest, opts ...grpc.CallOption) (*PushSystemNoticeResponse, error) ForceRoomResync(ctx context.Context, in *ForceRoomResyncRequest, opts ...grpc.CallOption) (*ForceRoomResyncResponse, error) } type roomBridgeServiceClient struct { cc grpc.ClientConnInterface } func NewRoomBridgeServiceClient(cc grpc.ClientConnInterface) RoomBridgeServiceClient { return &roomBridgeServiceClient{cc} } func (c *roomBridgeServiceClient) PublishRoomEvent(ctx context.Context, in *PublishRoomEventRequest, opts ...grpc.CallOption) (*PublishRoomEventResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PublishRoomEventResponse) err := c.cc.Invoke(ctx, RoomBridgeService_PublishRoomEvent_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *roomBridgeServiceClient) PushSystemNotice(ctx context.Context, in *PushSystemNoticeRequest, opts ...grpc.CallOption) (*PushSystemNoticeResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PushSystemNoticeResponse) err := c.cc.Invoke(ctx, RoomBridgeService_PushSystemNotice_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *roomBridgeServiceClient) ForceRoomResync(ctx context.Context, in *ForceRoomResyncRequest, opts ...grpc.CallOption) (*ForceRoomResyncResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ForceRoomResyncResponse) err := c.cc.Invoke(ctx, RoomBridgeService_ForceRoomResync_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // RoomBridgeServiceServer is the server API for RoomBridgeService service. // All implementations must embed UnimplementedRoomBridgeServiceServer // for forward compatibility. // // RoomBridgeService 只承载 room-service 与 im-service 的内部桥接能力。 type RoomBridgeServiceServer interface { PublishRoomEvent(context.Context, *PublishRoomEventRequest) (*PublishRoomEventResponse, error) PushSystemNotice(context.Context, *PushSystemNoticeRequest) (*PushSystemNoticeResponse, error) ForceRoomResync(context.Context, *ForceRoomResyncRequest) (*ForceRoomResyncResponse, error) mustEmbedUnimplementedRoomBridgeServiceServer() } // UnimplementedRoomBridgeServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedRoomBridgeServiceServer struct{} func (UnimplementedRoomBridgeServiceServer) PublishRoomEvent(context.Context, *PublishRoomEventRequest) (*PublishRoomEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PublishRoomEvent not implemented") } func (UnimplementedRoomBridgeServiceServer) PushSystemNotice(context.Context, *PushSystemNoticeRequest) (*PushSystemNoticeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PushSystemNotice not implemented") } func (UnimplementedRoomBridgeServiceServer) ForceRoomResync(context.Context, *ForceRoomResyncRequest) (*ForceRoomResyncResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ForceRoomResync not implemented") } func (UnimplementedRoomBridgeServiceServer) mustEmbedUnimplementedRoomBridgeServiceServer() {} func (UnimplementedRoomBridgeServiceServer) testEmbeddedByValue() {} // UnsafeRoomBridgeServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RoomBridgeServiceServer will // result in compilation errors. type UnsafeRoomBridgeServiceServer interface { mustEmbedUnimplementedRoomBridgeServiceServer() } func RegisterRoomBridgeServiceServer(s grpc.ServiceRegistrar, srv RoomBridgeServiceServer) { // If the following call pancis, it indicates UnimplementedRoomBridgeServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&RoomBridgeService_ServiceDesc, srv) } func _RoomBridgeService_PublishRoomEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PublishRoomEventRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RoomBridgeServiceServer).PublishRoomEvent(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RoomBridgeService_PublishRoomEvent_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RoomBridgeServiceServer).PublishRoomEvent(ctx, req.(*PublishRoomEventRequest)) } return interceptor(ctx, in, info, handler) } func _RoomBridgeService_PushSystemNotice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PushSystemNoticeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RoomBridgeServiceServer).PushSystemNotice(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RoomBridgeService_PushSystemNotice_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RoomBridgeServiceServer).PushSystemNotice(ctx, req.(*PushSystemNoticeRequest)) } return interceptor(ctx, in, info, handler) } func _RoomBridgeService_ForceRoomResync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ForceRoomResyncRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(RoomBridgeServiceServer).ForceRoomResync(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: RoomBridgeService_ForceRoomResync_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(RoomBridgeServiceServer).ForceRoomResync(ctx, req.(*ForceRoomResyncRequest)) } return interceptor(ctx, in, info, handler) } // RoomBridgeService_ServiceDesc is the grpc.ServiceDesc for RoomBridgeService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var RoomBridgeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hyapp.im.v1.RoomBridgeService", HandlerType: (*RoomBridgeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "PublishRoomEvent", Handler: _RoomBridgeService_PublishRoomEvent_Handler, }, { MethodName: "PushSystemNotice", Handler: _RoomBridgeService_PushSystemNotice_Handler, }, { MethodName: "ForceRoomResync", Handler: _RoomBridgeService_ForceRoomResync_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/im/v1/im.proto", }