Postman the notifier

This commit is contained in:
2024-07-21 13:51:46 +08:00
parent 037fc8a18c
commit d74cdddbaf
22 changed files with 1361 additions and 195 deletions

View File

@ -1,6 +1,6 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.27.1
// source: notify.proto
@ -15,14 +15,8 @@ import (
// 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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8
const (
Notifier_NotifyUser_FullMethodName = "/proto.Notifier/NotifyUser"
Notifier_NotifyUserBatch_FullMethodName = "/proto.Notifier/NotifyUserBatch"
Notifier_NotifyAllUser_FullMethodName = "/proto.Notifier/NotifyAllUser"
)
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// NotifierClient is the client API for Notifier service.
//
@ -42,9 +36,8 @@ func NewNotifierClient(cc grpc.ClientConnInterface) NotifierClient {
}
func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUser_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUser", in, out, opts...)
if err != nil {
return nil, err
}
@ -52,9 +45,8 @@ func (c *notifierClient) NotifyUser(ctx context.Context, in *NotifyUserRequest,
}
func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatchRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyUserBatch_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyUserBatch", in, out, opts...)
if err != nil {
return nil, err
}
@ -62,9 +54,8 @@ func (c *notifierClient) NotifyUserBatch(ctx context.Context, in *NotifyUserBatc
}
func (c *notifierClient) NotifyAllUser(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyResponse)
err := c.cc.Invoke(ctx, Notifier_NotifyAllUser_FullMethodName, in, out, cOpts...)
err := c.cc.Invoke(ctx, "/proto.Notifier/NotifyAllUser", in, out, opts...)
if err != nil {
return nil, err
}
@ -117,7 +108,7 @@ func _Notifier_NotifyUser_Handler(srv interface{}, ctx context.Context, dec func
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUser_FullMethodName,
FullMethod: "/proto.Notifier/NotifyUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUser(ctx, req.(*NotifyUserRequest))
@ -135,7 +126,7 @@ func _Notifier_NotifyUserBatch_Handler(srv interface{}, ctx context.Context, dec
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyUserBatch_FullMethodName,
FullMethod: "/proto.Notifier/NotifyUserBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyUserBatch(ctx, req.(*NotifyUserBatchRequest))
@ -153,7 +144,7 @@ func _Notifier_NotifyAllUser_Handler(srv interface{}, ctx context.Context, dec f
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Notifier_NotifyAllUser_FullMethodName,
FullMethod: "/proto.Notifier/NotifyAllUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NotifierServer).NotifyAllUser(ctx, req.(*NotifyRequest))