[+] add function GetSubscriberByUser for the agenda-widget
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
//COOPGO Agenda gRPC service definition
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v3.12.4
|
||||
// source: agenda.proto
|
||||
|
||||
@@ -18,6 +20,18 @@ import (
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Agenda_CreateEvent_FullMethodName = "/Agenda/CreateEvent"
|
||||
Agenda_GetEvent_FullMethodName = "/Agenda/GetEvent"
|
||||
Agenda_GetEvents_FullMethodName = "/Agenda/GetEvents"
|
||||
Agenda_DeleteEvent_FullMethodName = "/Agenda/DeleteEvent"
|
||||
Agenda_UpdateEvent_FullMethodName = "/Agenda/UpdateEvent"
|
||||
Agenda_SubscribeEvent_FullMethodName = "/Agenda/SubscribeEvent"
|
||||
Agenda_UnsubscribeEvent_FullMethodName = "/Agenda/UnsubscribeEvent"
|
||||
Agenda_DeleteSubscription_FullMethodName = "/Agenda/DeleteSubscription"
|
||||
Agenda_GetSubscriptionByUser_FullMethodName = "/Agenda/GetSubscriptionByUser"
|
||||
)
|
||||
|
||||
// AgendaClient is the client API for Agenda 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.
|
||||
@@ -30,6 +44,7 @@ type AgendaClient interface {
|
||||
SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error)
|
||||
GetSubscriptionByUser(ctx context.Context, in *GetSubscriptionByUserRequest, opts ...grpc.CallOption) (*GetSubscriptionByUserResponse, error)
|
||||
}
|
||||
|
||||
type agendaClient struct {
|
||||
@@ -42,7 +57,7 @@ func NewAgendaClient(cc grpc.ClientConnInterface) AgendaClient {
|
||||
|
||||
func (c *agendaClient) CreateEvent(ctx context.Context, in *CreateEventRequest, opts ...grpc.CallOption) (*CreateEventResponse, error) {
|
||||
out := new(CreateEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/CreateEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_CreateEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -51,7 +66,7 @@ func (c *agendaClient) CreateEvent(ctx context.Context, in *CreateEventRequest,
|
||||
|
||||
func (c *agendaClient) GetEvent(ctx context.Context, in *GetEventRequest, opts ...grpc.CallOption) (*GetEventResponse, error) {
|
||||
out := new(GetEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -60,7 +75,7 @@ func (c *agendaClient) GetEvent(ctx context.Context, in *GetEventRequest, opts .
|
||||
|
||||
func (c *agendaClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts ...grpc.CallOption) (*GetEventsResponse, error) {
|
||||
out := new(GetEventsResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/GetEvents", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetEvents_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -69,7 +84,7 @@ func (c *agendaClient) GetEvents(ctx context.Context, in *GetEventsRequest, opts
|
||||
|
||||
func (c *agendaClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest, opts ...grpc.CallOption) (*DeleteEventResponse, error) {
|
||||
out := new(DeleteEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_DeleteEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -78,7 +93,7 @@ func (c *agendaClient) DeleteEvent(ctx context.Context, in *DeleteEventRequest,
|
||||
|
||||
func (c *agendaClient) UpdateEvent(ctx context.Context, in *UpdateEventRequest, opts ...grpc.CallOption) (*UpdateEventResponse, error) {
|
||||
out := new(UpdateEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/UpdateEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_UpdateEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -87,7 +102,7 @@ func (c *agendaClient) UpdateEvent(ctx context.Context, in *UpdateEventRequest,
|
||||
|
||||
func (c *agendaClient) SubscribeEvent(ctx context.Context, in *SubscribeEventRequest, opts ...grpc.CallOption) (*SubscribeEventResponse, error) {
|
||||
out := new(SubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/SubscribeEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_SubscribeEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -96,7 +111,7 @@ func (c *agendaClient) SubscribeEvent(ctx context.Context, in *SubscribeEventReq
|
||||
|
||||
func (c *agendaClient) UnsubscribeEvent(ctx context.Context, in *UnsubscribeEventRequest, opts ...grpc.CallOption) (*UnsubscribeEventResponse, error) {
|
||||
out := new(UnsubscribeEventResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/UnsubscribeEvent", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_UnsubscribeEvent_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -105,7 +120,16 @@ func (c *agendaClient) UnsubscribeEvent(ctx context.Context, in *UnsubscribeEven
|
||||
|
||||
func (c *agendaClient) DeleteSubscription(ctx context.Context, in *DeleteSubscriptionRequest, opts ...grpc.CallOption) (*DeleteSubscriptionResponse, error) {
|
||||
out := new(DeleteSubscriptionResponse)
|
||||
err := c.cc.Invoke(ctx, "/Agenda/DeleteSubscription", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, Agenda_DeleteSubscription_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *agendaClient) GetSubscriptionByUser(ctx context.Context, in *GetSubscriptionByUserRequest, opts ...grpc.CallOption) (*GetSubscriptionByUserResponse, error) {
|
||||
out := new(GetSubscriptionByUserResponse)
|
||||
err := c.cc.Invoke(ctx, Agenda_GetSubscriptionByUser_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -124,6 +148,7 @@ type AgendaServer interface {
|
||||
SubscribeEvent(context.Context, *SubscribeEventRequest) (*SubscribeEventResponse, error)
|
||||
UnsubscribeEvent(context.Context, *UnsubscribeEventRequest) (*UnsubscribeEventResponse, error)
|
||||
DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error)
|
||||
GetSubscriptionByUser(context.Context, *GetSubscriptionByUserRequest) (*GetSubscriptionByUserResponse, error)
|
||||
mustEmbedUnimplementedAgendaServer()
|
||||
}
|
||||
|
||||
@@ -155,6 +180,9 @@ func (UnimplementedAgendaServer) UnsubscribeEvent(context.Context, *UnsubscribeE
|
||||
func (UnimplementedAgendaServer) DeleteSubscription(context.Context, *DeleteSubscriptionRequest) (*DeleteSubscriptionResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method DeleteSubscription not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) GetSubscriptionByUser(context.Context, *GetSubscriptionByUserRequest) (*GetSubscriptionByUserResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetSubscriptionByUser not implemented")
|
||||
}
|
||||
func (UnimplementedAgendaServer) mustEmbedUnimplementedAgendaServer() {}
|
||||
|
||||
// UnsafeAgendaServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -178,7 +206,7 @@ func _Agenda_CreateEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/CreateEvent",
|
||||
FullMethod: Agenda_CreateEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).CreateEvent(ctx, req.(*CreateEventRequest))
|
||||
@@ -196,7 +224,7 @@ func _Agenda_GetEvent_Handler(srv interface{}, ctx context.Context, dec func(int
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvent",
|
||||
FullMethod: Agenda_GetEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvent(ctx, req.(*GetEventRequest))
|
||||
@@ -214,7 +242,7 @@ func _Agenda_GetEvents_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/GetEvents",
|
||||
FullMethod: Agenda_GetEvents_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetEvents(ctx, req.(*GetEventsRequest))
|
||||
@@ -232,7 +260,7 @@ func _Agenda_DeleteEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteEvent",
|
||||
FullMethod: Agenda_DeleteEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteEvent(ctx, req.(*DeleteEventRequest))
|
||||
@@ -250,7 +278,7 @@ func _Agenda_UpdateEvent_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/UpdateEvent",
|
||||
FullMethod: Agenda_UpdateEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).UpdateEvent(ctx, req.(*UpdateEventRequest))
|
||||
@@ -268,7 +296,7 @@ func _Agenda_SubscribeEvent_Handler(srv interface{}, ctx context.Context, dec fu
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/SubscribeEvent",
|
||||
FullMethod: Agenda_SubscribeEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).SubscribeEvent(ctx, req.(*SubscribeEventRequest))
|
||||
@@ -286,7 +314,7 @@ func _Agenda_UnsubscribeEvent_Handler(srv interface{}, ctx context.Context, dec
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/UnsubscribeEvent",
|
||||
FullMethod: Agenda_UnsubscribeEvent_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).UnsubscribeEvent(ctx, req.(*UnsubscribeEventRequest))
|
||||
@@ -304,7 +332,7 @@ func _Agenda_DeleteSubscription_Handler(srv interface{}, ctx context.Context, de
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/Agenda/DeleteSubscription",
|
||||
FullMethod: Agenda_DeleteSubscription_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).DeleteSubscription(ctx, req.(*DeleteSubscriptionRequest))
|
||||
@@ -312,6 +340,24 @@ func _Agenda_DeleteSubscription_Handler(srv interface{}, ctx context.Context, de
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Agenda_GetSubscriptionByUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetSubscriptionByUserRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(AgendaServer).GetSubscriptionByUser(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Agenda_GetSubscriptionByUser_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(AgendaServer).GetSubscriptionByUser(ctx, req.(*GetSubscriptionByUserRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Agenda_ServiceDesc is the grpc.ServiceDesc for Agenda service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -351,6 +397,10 @@ var Agenda_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "DeleteSubscription",
|
||||
Handler: _Agenda_DeleteSubscription_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetSubscriptionByUser",
|
||||
Handler: _Agenda_GetSubscriptionByUser_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "agenda.proto",
|
||||
|
||||
Reference in New Issue
Block a user