// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.21.2 // source: events.proto package events 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.32.0 or later. const _ = grpc.SupportPackageIsVersion7 // EventsServiceClient is the client API for EventsService 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. type EventsServiceClient interface { Latest(ctx context.Context, in *LatestRequest, opts ...grpc.CallOption) (*LatestResponse, error) Create(ctx context.Context, in *EventCreate, opts ...grpc.CallOption) (*NullResponse, error) Clean(ctx context.Context, in *NullResponse, opts ...grpc.CallOption) (*NullResponse, error) } type eventsServiceClient struct { cc grpc.ClientConnInterface } func NewEventsServiceClient(cc grpc.ClientConnInterface) EventsServiceClient { return &eventsServiceClient{cc} } func (c *eventsServiceClient) Latest(ctx context.Context, in *LatestRequest, opts ...grpc.CallOption) (*LatestResponse, error) { out := new(LatestResponse) err := c.cc.Invoke(ctx, "/events.EventsService/Latest", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *eventsServiceClient) Create(ctx context.Context, in *EventCreate, opts ...grpc.CallOption) (*NullResponse, error) { out := new(NullResponse) err := c.cc.Invoke(ctx, "/events.EventsService/Create", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *eventsServiceClient) Clean(ctx context.Context, in *NullResponse, opts ...grpc.CallOption) (*NullResponse, error) { out := new(NullResponse) err := c.cc.Invoke(ctx, "/events.EventsService/Clean", in, out, opts...) if err != nil { return nil, err } return out, nil } // EventsServiceServer is the server API for EventsService service. // All implementations must embed UnimplementedEventsServiceServer // for forward compatibility type EventsServiceServer interface { Latest(context.Context, *LatestRequest) (*LatestResponse, error) Create(context.Context, *EventCreate) (*NullResponse, error) Clean(context.Context, *NullResponse) (*NullResponse, error) mustEmbedUnimplementedEventsServiceServer() } // UnimplementedEventsServiceServer must be embedded to have forward compatible implementations. type UnimplementedEventsServiceServer struct { } func (UnimplementedEventsServiceServer) Latest(context.Context, *LatestRequest) (*LatestResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Latest not implemented") } func (UnimplementedEventsServiceServer) Create(context.Context, *EventCreate) (*NullResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") } func (UnimplementedEventsServiceServer) Clean(context.Context, *NullResponse) (*NullResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Clean not implemented") } func (UnimplementedEventsServiceServer) mustEmbedUnimplementedEventsServiceServer() {} // UnsafeEventsServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EventsServiceServer will // result in compilation errors. type UnsafeEventsServiceServer interface { mustEmbedUnimplementedEventsServiceServer() } func RegisterEventsServiceServer(s grpc.ServiceRegistrar, srv EventsServiceServer) { s.RegisterService(&EventsService_ServiceDesc, srv) } func _EventsService_Latest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(LatestRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventsServiceServer).Latest(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/events.EventsService/Latest", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventsServiceServer).Latest(ctx, req.(*LatestRequest)) } return interceptor(ctx, in, info, handler) } func _EventsService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EventCreate) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventsServiceServer).Create(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/events.EventsService/Create", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventsServiceServer).Create(ctx, req.(*EventCreate)) } return interceptor(ctx, in, info, handler) } func _EventsService_Clean_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(NullResponse) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(EventsServiceServer).Clean(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/events.EventsService/Clean", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EventsServiceServer).Clean(ctx, req.(*NullResponse)) } return interceptor(ctx, in, info, handler) } // EventsService_ServiceDesc is the grpc.ServiceDesc for EventsService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var EventsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "events.EventsService", HandlerType: (*EventsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Latest", Handler: _EventsService_Latest_Handler, }, { MethodName: "Create", Handler: _EventsService_Create_Handler, }, { MethodName: "Clean", Handler: _EventsService_Clean_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "events.proto", }