72 lines
3.0 KiB
Go
72 lines
3.0 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: notification.proto
|
|
|
|
package notificationservice
|
|
|
|
import (
|
|
"context"
|
|
|
|
"juwan-backend/app/notification/rpc/pb"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
AddNotificationsReq = pb.AddNotificationsReq
|
|
AddNotificationsResp = pb.AddNotificationsResp
|
|
DelNotificationsReq = pb.DelNotificationsReq
|
|
DelNotificationsResp = pb.DelNotificationsResp
|
|
GetNotificationsByIdReq = pb.GetNotificationsByIdReq
|
|
GetNotificationsByIdResp = pb.GetNotificationsByIdResp
|
|
Notifications = pb.Notifications
|
|
SearchNotificationsReq = pb.SearchNotificationsReq
|
|
SearchNotificationsResp = pb.SearchNotificationsResp
|
|
UpdateNotificationsReq = pb.UpdateNotificationsReq
|
|
UpdateNotificationsResp = pb.UpdateNotificationsResp
|
|
|
|
NotificationService interface {
|
|
AddNotifications(ctx context.Context, in *AddNotificationsReq, opts ...grpc.CallOption) (*AddNotificationsResp, error)
|
|
UpdateNotifications(ctx context.Context, in *UpdateNotificationsReq, opts ...grpc.CallOption) (*UpdateNotificationsResp, error)
|
|
DelNotifications(ctx context.Context, in *DelNotificationsReq, opts ...grpc.CallOption) (*DelNotificationsResp, error)
|
|
GetNotificationsById(ctx context.Context, in *GetNotificationsByIdReq, opts ...grpc.CallOption) (*GetNotificationsByIdResp, error)
|
|
SearchNotifications(ctx context.Context, in *SearchNotificationsReq, opts ...grpc.CallOption) (*SearchNotificationsResp, error)
|
|
}
|
|
|
|
defaultNotificationService struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewNotificationService(cli zrpc.Client) NotificationService {
|
|
return &defaultNotificationService{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultNotificationService) AddNotifications(ctx context.Context, in *AddNotificationsReq, opts ...grpc.CallOption) (*AddNotificationsResp, error) {
|
|
client := pb.NewNotificationServiceClient(m.cli.Conn())
|
|
return client.AddNotifications(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultNotificationService) UpdateNotifications(ctx context.Context, in *UpdateNotificationsReq, opts ...grpc.CallOption) (*UpdateNotificationsResp, error) {
|
|
client := pb.NewNotificationServiceClient(m.cli.Conn())
|
|
return client.UpdateNotifications(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultNotificationService) DelNotifications(ctx context.Context, in *DelNotificationsReq, opts ...grpc.CallOption) (*DelNotificationsResp, error) {
|
|
client := pb.NewNotificationServiceClient(m.cli.Conn())
|
|
return client.DelNotifications(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultNotificationService) GetNotificationsById(ctx context.Context, in *GetNotificationsByIdReq, opts ...grpc.CallOption) (*GetNotificationsByIdResp, error) {
|
|
client := pb.NewNotificationServiceClient(m.cli.Conn())
|
|
return client.GetNotificationsById(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultNotificationService) SearchNotifications(ctx context.Context, in *SearchNotificationsReq, opts ...grpc.CallOption) (*SearchNotificationsResp, error) {
|
|
client := pb.NewNotificationServiceClient(m.cli.Conn())
|
|
return client.SearchNotifications(ctx, in, opts...)
|
|
}
|