-
Notifications
You must be signed in to change notification settings - Fork 157
/
provider.go
55 lines (51 loc) · 1.33 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
package accountService
import (
"github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/accountService/customer"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/accountService/message"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/accountService/serviceState"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/accountService/servicer"
"github.com/ArtisanCloud/PowerWeChat/v3/src/work/accountService/tag"
)
func RegisterProvider(app kernel.ApplicationInterface) (
*Client,
*customer.Client,
*message.Client,
*servicer.Client,
*serviceState.Client,
*tag.Client,
error,
) {
//config := app.GetConfig()
Client, err := NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
Customer, err := customer.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
Message, err := message.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
Servicer, err := servicer.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
ServiceState, err := serviceState.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
Tag, err := tag.NewClient(app)
if err != nil {
return nil, nil, nil, nil, nil, nil, err
}
return Client,
Customer,
Message,
Servicer,
ServiceState,
Tag,
nil
}