2024-08-20 06:35:14 +00:00
|
|
|
// Code generated by goctl. DO NOT EDIT.
|
2024-08-26 08:34:16 +00:00
|
|
|
// Source: notification.proto
|
2024-08-20 06:35:14 +00:00
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"app-cloudep-notification-service/gen_result/pb/notification"
|
2024-08-20 10:05:39 +00:00
|
|
|
senderservicelogic "app-cloudep-notification-service/internal/logic/senderservice"
|
2024-08-20 06:35:14 +00:00
|
|
|
"app-cloudep-notification-service/internal/svc"
|
|
|
|
)
|
|
|
|
|
|
|
|
type SenderServiceServer struct {
|
|
|
|
svcCtx *svc.ServiceContext
|
|
|
|
notification.UnimplementedSenderServiceServer
|
|
|
|
}
|
|
|
|
|
|
|
|
func NewSenderServiceServer(svcCtx *svc.ServiceContext) *SenderServiceServer {
|
|
|
|
return &SenderServiceServer{
|
|
|
|
svcCtx: svcCtx,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// SendMail 寄信
|
|
|
|
func (s *SenderServiceServer) SendMail(ctx context.Context, in *notification.SendMailReq) (*notification.OKResp, error) {
|
|
|
|
l := senderservicelogic.NewSendMailLogic(ctx, s.svcCtx)
|
|
|
|
return l.SendMail(in)
|
|
|
|
}
|
|
|
|
|
2024-08-20 15:56:21 +00:00
|
|
|
// SendSms 寄簡訊
|
2024-08-20 06:35:14 +00:00
|
|
|
func (s *SenderServiceServer) SendSms(ctx context.Context, in *notification.SendSMSReq) (*notification.OKResp, error) {
|
|
|
|
l := senderservicelogic.NewSendSmsLogic(ctx, s.svcCtx)
|
|
|
|
return l.SendSms(in)
|
|
|
|
}
|
|
|
|
|
2024-09-04 19:09:48 +00:00
|
|
|
// SendMailByTemplateID 寄送模板信件
|
|
|
|
func (s *SenderServiceServer) SendMailByTemplateID(ctx context.Context, in *notification.SendByTemplateIDReq) (*notification.OKResp, error) {
|
|
|
|
l := senderservicelogic.NewSendMailByTemplateIDLogic(ctx, s.svcCtx)
|
|
|
|
return l.SendMailByTemplateID(in)
|
2024-08-20 06:35:14 +00:00
|
|
|
}
|
|
|
|
|
2024-09-04 19:09:48 +00:00
|
|
|
// SendSmsByTemplateID 寄送模板簡訊
|
|
|
|
func (s *SenderServiceServer) SendSmsByTemplateID(ctx context.Context, in *notification.SendByTemplateIDReq) (*notification.OKResp, error) {
|
|
|
|
l := senderservicelogic.NewSendSmsByTemplateIDLogic(ctx, s.svcCtx)
|
|
|
|
return l.SendSmsByTemplateID(in)
|
2024-08-20 06:35:14 +00:00
|
|
|
}
|