Documentation ¶
Index ¶
- Variables
- type API
- func (a *API) AddUser(user *User) (err error)
- func (a *API) CorpID() string
- func (a *API) DeleteUser(userId string) (err error)
- func (a *API) GetOAuth2User(agentID int, code string) (ou *OAuth2UserInfo, err error)
- func (a *API) GetUser(userId string) (*User, error)
- func (a *API) ListDepartment(id int) (data Departments, err error)
- func (a *API) ListUser(deptId int, incChild bool) (data []User, err error)
- type CAPI
- type CheckInData
- type CheckInReq
- type CheckInResult
- type Department
- type Departments
- type OAuth2UserInfo
- type Status
- type User
- type UserAttribute
- type UserAttributes
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) DeleteUser ¶
func (*API) GetOAuth2User ¶
func (a *API) GetOAuth2User(agentID int, code string) (ou *OAuth2UserInfo, err error)
func (*API) ListDepartment ¶
func (a *API) ListDepartment(id int) (data Departments, err error)
type CAPI ¶
type CAPI struct {
// contains filtered or unexported fields
}
func (*CAPI) ListCheckin ¶
func (a *CAPI) ListCheckin(days int, userIDs ...string) (result *CheckInResult, err error)
type CheckInData ¶
type CheckInData struct { UserID string `json:"userid,omitempty"` GroupName string `json:"groupname,omitempty"` CheckInType string `json:"checkin_type,omitempty"` ExceptionType string `json:"exception_type,omitempty"` CheckInTime int64 `json:"checkin_time,omitempty"` LocationTitle string `json:"location_title,omitempty"` LocationDetail string `json:"location_detail,omitempty"` WifiName string `json:"wifiname,omitempty"` Notes string `json:"notes,omitempty"` WifiMac string `json:"wifimac,omitempty"` Mediaids []string `json:"mediaids,omitempty"` }
type CheckInReq ¶
type CheckInResult ¶
type CheckInResult struct { ErrCode int `json:"errcode,omitempty"` ErrMsg string `json:"errmsg,omitempty"` CheckInData []CheckInData `json:"checkindata,omitempty"` }
type Department ¶
type Department struct { Id int `json:"id"` // 部门id,32位整型,指定时必须大于1。若不填该参数,将自动生成id Name string `json:"name"` // 部门名称。长度限制为1~32个字符 ParentId int `json:"parentid"` // 父部门id,32位整型 Order int `json:"order"` // 在父部门中的次序值。order值大的排序靠前。有效的值范围是[0, 2^32) }
部门
func FilterDepartment ¶
func FilterDepartment(data []Department, id int) (*Department, error)
FilterDepartment Deprecated with Departments.WithID()
type Departments ¶
type Departments []Department
func (Departments) Less ¶ added in v0.1.1
func (z Departments) Less(i, j int) bool
func (Departments) Swap ¶ added in v0.1.1
func (z Departments) Swap(i, j int)
func (Departments) WithID ¶
func (z Departments) WithID(id int) *Department
type OAuth2UserInfo ¶
type OAuth2UserInfo struct { UserID string `json:"UserId,omitempty"` DeviceID string `json:"DeviceId,omitempty"` UserTicket string `json:"user_ticket,omitempty"` OpenId string `json:"OpenId,omitempty"` // 非企业成员 client.Error }
OAuth2UserInfo 为用户 OAuth2 验证登录后的简单信息
type User ¶
type User struct { UID string `json:"userid"` Name string `json:"name,omitempty"` Alias string `json:"alias,omitempty"` EnglishName string `json:"english_name,omitempty"` DepartmentIds []int `json:"department,omitempty"` Title string `json:"position,omitempty"` Mobile string `json:"mobile,omitempty"` Email string `json:"email,omitempty"` Tel string `json:"telephone,omitempty"` Gender gender.Gender `json:"gender,omitempty"` Status Status `json:"status,omitempty"` Enabled int8 `json:"enable,emitempty"` Avatar string `json:"avatar,omitempty"` IsLeader uint8 `json:"isleader,omitempty"` LeaderDepts []int `json:"is_leader_in_dept,omitempty"` ExtAttr UserAttributes `json:"extattr,omitempty"` ExternalPosition string `json:"external_position,omitempty"` client.Error }
User 为企业用户信息
type UserAttribute ¶
UserAttribute 为用户扩展信息
type UserAttributes ¶
type UserAttributes struct {
Attrs []*UserAttribute `json:"attrs,omitempty"`
}
UserAttributes 为用户扩展信息列表
Click to show internal directories.
Click to hide internal directories.