-
Notifications
You must be signed in to change notification settings - Fork 156
/
provider.go
97 lines (93 loc) · 3.09 KB
/
provider.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package externalContact
import (
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/contactWay"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/customerStrategy"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/groupChat"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/groupWelcomeTemplate"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/messageTemplate"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/moment"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/momentStrategy"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/school"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/statistics"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/tag"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/externalContact/transfer"
)
func RegisterProvider(app kernel.ApplicationInterface) (
*Client,
*contactWay.Client,
*customerStrategy.Client,
*groupChat.Client,
*groupWelcomeTemplate.Client,
*messageTemplate.Client,
*moment.Client,
*momentStrategy.Client,
*school.Client,
*statistics.Client,
*tag.Client,
*transfer.Client,
error,
) {
//config := app.GetConfig()
Client, err := NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
ContactWayClient, err := contactWay.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
CustomerStrategy, err := customerStrategy.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
GroupChat, err := groupChat.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
GroupWelcomeTemplate, err := groupWelcomeTemplate.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
MessageTemplate, err := messageTemplate.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
Moment, err := moment.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
MomentStrategy, err := momentStrategy.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
School, err := school.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
Statistics, err := statistics.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
Tag, err := tag.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
Transfer, err := transfer.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, err
}
return Client,
ContactWayClient,
CustomerStrategy,
GroupChat,
GroupWelcomeTemplate,
MessageTemplate,
Moment,
MomentStrategy,
School,
Statistics,
Tag,
Transfer,
nil
}