优化结构
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"context"
|
||||
"kra/internal/biz/system"
|
||||
)
|
||||
|
||||
type EmailService struct{ uc *system.EmailUsecase }
|
||||
|
||||
func NewEmailService(uc *system.EmailUsecase) *EmailService { return &EmailService{uc: uc} }
|
||||
|
||||
func (s *EmailService) Test(ctx context.Context) error { return s.uc.Test(ctx) }
|
||||
|
||||
func (s *EmailService) Send(ctx context.Context, to, subject, body string) error {
|
||||
return s.uc.Send(ctx, to, subject, body)
|
||||
}
|
||||
|
||||
func (s *EmailService) Alert(ctx context.Context, subject, body string) error {
|
||||
return s.uc.Alert(ctx, subject, body)
|
||||
}
|
||||
Reference in New Issue
Block a user