-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwps_api.go
More file actions
31 lines (26 loc) · 847 Bytes
/
Copy pathwps_api.go
File metadata and controls
31 lines (26 loc) · 847 Bytes
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
package wpsApi
import (
"github.com/YuanJey/wps-api/avatar"
"github.com/YuanJey/wps-api/dept"
"github.com/YuanJey/wps-api/pkg/api_resp"
"github.com/YuanJey/wps-api/pkg/config"
"github.com/YuanJey/wps-api/pkg/sign"
"github.com/YuanJey/wps-api/user"
)
type AllWpsUser struct {
WidUserList map[string]*api_resp.Member
TidUserList map[string]*api_resp.Member
}
type sdk struct {
Dept *dept.Dept
User *user.User
Avatar *avatar.Avatar
}
func newSDK(dept *dept.Dept, user *user.User, avatar *avatar.Avatar) *sdk {
return &sdk{Dept: dept, User: user, Avatar: avatar}
}
var Sdk sdk
func init() {
wps4Sign := sign.NewWps4Sign(config.Config.Env.AK, config.Config.Env.SK)
Sdk = *newSDK(dept.NewDept(wps4Sign, config.Config.WPS.Addr), user.NewUser(wps4Sign, config.Config.WPS.Addr), avatar.NewAvatar(config.Config.WPS.Addr, wps4Sign))
}