Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Department ¶
type Department struct { Name string `json:"name"` I18NName struct { ZhCn string `json:"zh_cn"` JaJp string `json:"ja_jp"` EnUs string `json:"en_us"` } `json:"i18n_name"` ParentDepartmentId string `json:"parent_department_id"` DepartmentId string `json:"department_id"` OpenDepartmentId string `json:"open_department_id"` LeaderUserId string `json:"leader_user_id"` ChatId string `json:"chat_id"` Order string `json:"order"` UnitIds []string `json:"unit_ids"` MemberCount int `json:"member_count"` Status struct { IsDeleted bool `json:"is_deleted"` } `json:"status"` CreateGroupChat bool `json:"create_group_chat"` Leaders []struct { LeaderType int `json:"leaderType"` LeaderID string `json:"leaderID"` } `json:"leaders"` DepartmentHrbps []string `json:"department_hrbps"` }
type Event ¶
type Event struct { Schema string `json:"schema"` Header EventHeader `json:"header"` Event json.RawMessage `json:"event"` Type string `json:"type"` Token string `json:"token"` Challenge string `json:"challenge"` }
type EventHeader ¶
type Fs ¶
Fs 飞书缩写
func (Fs) GetTenantAccessToken ¶
func (f Fs) GetTenantAccessToken() (*TenantAccessTokenResp, error)
func (Fs) LoadDepartmentList ¶
func (f Fs) LoadDepartmentList() (*ListDepartmentResp, error)
func (Fs) LoadUserList ¶
LoadUserList 键名为部门 OpenID,只能挨个部门获取用户列表
type FsUser ¶
type FsUser struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int64 `json:"expires_in"` Name string `json:"name"` AvatarUrl string `json:"avatar_url"` AvatarThumb string `json:"avatar_thumb"` AvatarMiddle string `json:"avatar_middle"` AvatarBig string `json:"avatar_big"` OpenId string `json:"open_id"` UnionId string `json:"union_id"` Email string `json:"email"` EnterpriseEmail string `json:"enterprise_email"` UserId string `json:"user_id"` Mobile string `json:"mobile"` TenantKey string `json:"tenant_key"` RefreshExpiresIn int `json:"refresh_expires_in"` RefreshToken string `json:"refresh_token"` Sid string `json:"sid"` // contains filtered or unexported fields }
func (FsUser) Info ¶
func (u FsUser) Info() (*UserInfoResp, error)
type ListDepartmentResp ¶
type ListDepartmentResp struct { HasMore bool `json:"has_more"` PageToken string `json:"page_token"` Items []Department `json:"items"` }
type ListUserResp ¶
type TenantAccessTokenResp ¶
type TenantToken ¶
type TenantToken struct { sync.Mutex Token string ExpireAt int64 // contains filtered or unexported fields }
func NewTenant ¶
func NewTenant(fs *Fs) *TenantToken
func (*TenantToken) Load ¶
func (t *TenantToken) Load() (string, error)
type User ¶
type User struct { UserId string `json:"user_id"` Avatar struct { Avatar240 string `json:"avatar_240"` Avatar640 string `json:"avatar_640"` Avatar72 string `json:"avatar_72"` AvatarOrigin string `json:"avatar_origin"` } `json:"avatar"` City string `json:"city"` Country string `json:"country"` CustomAttrs []struct { Type string `json:"type"` Id string `json:"id"` Value struct { Text string `json:"text"` Url string `json:"url"` PcUrl string `json:"pc_url"` OptionValue string `json:"option_value"` Name string `json:"name"` PictureUrl string `json:"picture_url"` GenericUser struct { Id string `json:"id"` Type int `json:"type"` } `json:"generic_user"` } `json:"value"` } `json:"custom_attrs"` DepartmentIds []string `json:"department_ids"` Description string `json:"description"` EmployeeNo string `json:"employee_no"` EmployeeType int `json:"employee_type"` EnName string `json:"en_name"` EnterpriseEmail string `json:"enterprise_email"` Gender int `json:"gender"` IsTenantManager bool `json:"is_tenant_manager"` JobTitle string `json:"job_title"` JoinTime int `json:"join_time"` Email string `json:"email"` Mobile string `json:"mobile"` MobileVisible bool `json:"mobile_visible"` Name string `json:"name"` OpenId string `json:"open_id"` Orders []struct { DepartmentId string `json:"department_id"` DepartmentOrder int `json:"department_order"` UserOrder int `json:"user_order"` } `json:"orders"` Status struct { IsActivated bool `json:"is_activated"` IsExited bool `json:"is_exited"` IsFrozen bool `json:"is_frozen"` IsResigned bool `json:"is_resigned"` IsUnjoin bool `json:"is_unjoin"` } `json:"status"` UnionId string `json:"union_id"` WorkStation string `json:"work_station"` }
type UserDeletedEvent ¶
type UserInfoResp ¶
type UserInfoResp struct {
User User `json:"user"`
}
type UserUpdatedEvent ¶
Click to show internal directories.
Click to hide internal directories.