Documentation ¶
Overview ¶
Package events 包含各种订阅事件类型
TODO: event 类型未完整
Index ¶
- func Regist(regist func(string, func() interface{}))
- type AddBot
- type AppOpen
- type AppStatusChange
- type AppTicket
- type AppUninstalled
- type ContactScopeChange
- type DeptAdd
- type DeptDelete
- type DeptUpdate
- type Message
- type MessageRead
- type OrderPaid
- type P2pChatCreate
- type RemoveBot
- type Unsupported
- type UserAdd
- type UserLeave
- type UserStatusChange
- type UserUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddBot ¶
type AddBot struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` ChatI18nNames map[string]string `json:"chat_i18n_names"` ChatName string `json:"chat_name"` ChatOwnerEmployeeId string `json:"chat_owner_employee_id` ChatOwnerName string `json:"chat_owner_name"` ChatOwnerOpenId string `json:"chat_owner_open_id"` OpenChatId string `json:"open_chat_id"` OperatorEmployeeId string `json:"operator_employee_id"` OperatorName string `json:"operator_name"` OperatorOpenId string `json:"operator_open_id"` OwnerIsBot bool `json:"owner_is_bot"` }
AddBot 机器人进群 https://open.feishu.cn/document/ukTMukTMukTM/uMTNxYjLzUTM24yM1EjN#%E6%9C%BA%E5%99%A8%E4%BA%BA%E8%BF%9B%E7%BE%A4
type AppOpen ¶
type AppOpen struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` Applicants []struct { OpenId string `json:"open_id"` UserId string `json:"user_id"` } `json:"applicants"` Installer struct { OpenId string `json:"open_id"` UserId string `json:"user_id"` } `json:"installer"` }
AppOpen 首次开通应用 (只有应用商店应用才能订阅此事件) https://open.feishu.cn/document/ukTMukTMukTM/uQTNxYjL0UTM24CN1EjN#%E9%A6%96%E6%AC%A1%E5%BC%80%E9%80%9A%E5%BA%94%E7%94%A8
type AppStatusChange ¶
type AppStatusChange struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` Status string `json:"status"` }
AppStatusChange 应用停启用 (只有应用商店应用才能订阅此事件) https://open.feishu.cn/document/ukTMukTMukTM/uQTNxYjL0UTM24CN1EjN#%E5%BA%94%E7%94%A8%E5%81%9C%E5%90%AF%E7%94%A8
type AppTicket ¶
AppTicket app_ticket 事件 ( 应用商店应用自动订阅此事件;企业自建应用不需要此事件) https://open.feishu.cn/document/ukTMukTMukTM/uQTNxYjL0UTM24CN1EjN#app_ticket%20%E4%BA%8B%E4%BB%B6
type AppUninstalled ¶
AppUninstalled 应用卸载 (应用商店应用开发者应订阅此事件,并在应用卸载后进行相应的账户注销、数据清理等处理) https://open.feishu.cn/document/ukTMukTMukTM/uQTNxYjL0UTM24CN1EjN#%E5%BA%94%E7%94%A8%E5%8D%B8%E8%BD%BD
type ContactScopeChange ¶
type ContactScopeChange struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` }
ContactScopeChange 授权范围变更
type DeptAdd ¶
type DeptAdd struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenDepartmentId string `json:"open_department_id"` }
DeptAdd 新建部门
type DeptDelete ¶
type DeptDelete struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenDepartmentId string `json:"open_department_id"` }
DeptDelete 删除部门
type DeptUpdate ¶
type DeptUpdate struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenDepartmentId string `json:"open_department_id"` }
DeptUpdate 修改部门
type Message ¶
type Message struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` RootId string `json:root_id` ParentId string `json:"parent_id"` OpenChatId string `json:"open_chat_id"` ChatType string `json:"chat_type"` MsgType string `json:"msg_type"` OpenId string `json:"open_id"` OpenMessageId string `json:"open_message_id"` IsMention bool `json:"is_mention"` Text string `json:"text"` TextWithoutAtBot string `json:"text_without_at_bot"` Title string `json:"title"` ImageKeys []string `json:"image_keys"` ImageHeight string `json:""image_height""` ImageWidth string `json:"image_width"` ImageKey string `json:"image_key"` FileKey string `json:"file_key"` }
Message 接收消息 https://open.feishu.cn/document/ukTMukTMukTM/uMTNxYjLzUTM24yM1EjN#%E6%8E%A5%E6%94%B6%E6%B6%88%E6%81%AF
type MessageRead ¶
type MessageRead struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenChatId string `json:"open_chat_id"` OpenId string `json:"open_id"` OpenMessageIds []string `json:"open_message_ids"` }
MessageRead 消息已读 https://open.feishu.cn/document/ukTMukTMukTM/uMTNxYjLzUTM24yM1EjN#%E6%B6%88%E6%81%AF%E5%B7%B2%E8%AF%BB
type OrderPaid ¶
type OrderPaid struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OrderId string `json:"order_id"` PricePlanId string `json:"price_plan_id"` PricePlanType string `json:"price_plan_type"` Seats int `json:"seats"` BuyCount int `json:"buy_count"` CreateTime string `json:"create_time"` PayTime string `json:"pay_time"` BuyType string `json:"buy_type"` SrcOrderId string `json:"src_order_id"` OrderPayPrice uint64 `json:"order_pay_price"` }
OrderPaid 应用商店应用购买 (只有应用商店应用才能订阅此事件) https://open.feishu.cn/document/ukTMukTMukTM/uQTNxYjL0UTM24CN1EjN#%E5%BA%94%E7%94%A8%E5%95%86%E5%BA%97%E5%BA%94%E7%94%A8%E8%B4%AD%E4%B9%B0
type P2pChatCreate ¶
type P2pChatCreate struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` ChatId string `json:"chat_id"` Operator struct { OpenId string `json:"open_id"` UserId string `json:"user_id"` } `json:"operator"` User struct { Name string `json:"name"` OpenId string `json:"open_id"` UserId string `json:"user_id"` } `json:"user"` }
P2pChatCreate 用户和机器人的会话首次被创建 https://open.feishu.cn/document/ukTMukTMukTM/uMTNxYjLzUTM24yM1EjN#%E7%94%A8%E6%88%B7%E5%92%8C%E6%9C%BA%E5%99%A8%E4%BA%BA%E7%9A%84%E4%BC%9A%E8%AF%9D%E9%A6%96%E6%AC%A1%E8%A2%AB%E5%88%9B%E5%BB%BA
type RemoveBot ¶
type RemoveBot struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` ChatI18nNames map[string]string `json:"chat_i18n_names"` ChatName string `json:"chat_name"` ChatOwnerEmployeeId string `json:"chat_owner_employee_id` ChatOwnerName string `json:"chat_owner_name"` ChatOwnerOpenId string `json:"chat_owner_open_id"` OpenChatId string `json:"open_chat_id"` OperatorEmployeeId string `json:"operator_employee_id"` OperatorName string `json:"operator_name"` OperatorOpenId string `json:"operator_open_id"` OwnerIsBot bool `json:"owner_is_bot"` }
RemoveBot 机器人被移出群 https://open.feishu.cn/document/ukTMukTMukTM/uMTNxYjLzUTM24yM1EjN#%E6%9C%BA%E5%99%A8%E4%BA%BA%E8%A2%AB%E7%A7%BB%E5%87%BA%E7%BE%A4
type UserAdd ¶
type UserAdd struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenId string `json:"open_id"` EmployeeId string `json:"employee_id"` UnionId string `json:"union_id"` }
UserAdd 员工加入企业
type UserLeave ¶
type UserLeave struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenId string `json:"open_id"` EmployeeId string `json:"employee_id"` UnionId string `json:"union_id"` }
UserLeave 离职
type UserStatusChange ¶
type UserStatusChange struct { AppId string `json:"app_id"` TenantKey string `json:"tenant_key"` OpenId string `json:"open_id"` EmployeeId string `json:"employee_id"` UnionId string `json:"union_id"` BeforeStatus struct { IsActive bool `json:"is_active"` IsFrozen bool `json:"is_frozen"` IsResigned bool `json:"is_resigned"` } `json:"before_status"` CurrentStatus struct { IsActive bool `json:"is_active"` IsFrozen bool `json:"is_frozen"` IsResigned bool `json:"is_resigned"` } `json:"current_status"` ChangeTime string `json:"change_time"` }
UserStatusChange 用户状态变更