-
Notifications
You must be signed in to change notification settings - Fork 44
/
service.go
39 lines (35 loc) · 1.04 KB
/
service.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package service
import (
"github.com/go-kratos/kratos/v2/log"
"github.com/google/wire"
v1 "github.com/the-zion/matrix-core/api/bff/interface/v1"
"github.com/the-zion/matrix-core/app/bff/interface/internal/biz"
)
var ProviderSet = wire.NewSet(NewBffService)
type BffService struct {
v1.UnimplementedBffServer
ac *biz.ArticleUseCase
tc *biz.TalkUseCase
cc *biz.CreationUseCase
coc *biz.ColumnUseCase
uc *biz.UserUseCase
achc *biz.AchievementUseCase
nc *biz.NewsUseCase
commc *biz.CommentUseCase
mc *biz.MessageUseCase
log *log.Helper
}
func NewBffService(uc *biz.UserUseCase, cc *biz.CreationUseCase, tc *biz.TalkUseCase, ac *biz.ArticleUseCase, coc *biz.ColumnUseCase, achc *biz.AchievementUseCase, nc *biz.NewsUseCase, commc *biz.CommentUseCase, mc *biz.MessageUseCase, logger log.Logger) *BffService {
return &BffService{
log: log.NewHelper(log.With(logger, "module", "bff/interface")),
uc: uc,
ac: ac,
tc: tc,
cc: cc,
coc: coc,
achc: achc,
nc: nc,
mc: mc,
commc: commc,
}
}