-
Notifications
You must be signed in to change notification settings - Fork 165
/
provider.go
47 lines (42 loc) · 1 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
package shakeAround
import "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
func RegisterProvider(app kernel.ApplicationInterface) (*ShakeAround, error) {
client, err := NewClient(app)
if err != nil {
return nil, err
}
deviceClientClient, err := NewDeviceClient(app)
if err != nil {
return nil, err
}
pageClientClient, err := NewPageClient(app)
if err != nil {
return nil, err
}
materialClientClient, err := NewMaterialClient(app)
if err != nil {
return nil, err
}
groupClientClient, err := NewGroupClient(app)
if err != nil {
return nil, err
}
relationClientClient, err := NewRelationClient(app)
if err != nil {
return nil, err
}
statsClientClient, err := NewStatsClient(app)
if err != nil {
return nil, err
}
shakeAround := &ShakeAround{
Client: client,
Device: deviceClientClient,
Page: pageClientClient,
Material: materialClientClient,
Group: groupClientClient,
Relation: relationClientClient,
Stats: statsClientClient,
}
return shakeAround, nil
}