Documentation ¶
Index ¶
- Constants
- type BaseEvent
- type Callback
- type EventAddBot
- type EventAddUserToChat
- type EventAppOpen
- type EventAppStatusChange
- type EventAppTicket
- type EventAppUninstalled
- type EventChallenge
- type EventChatDisband
- type EventContactScopeChange
- type EventDeptAdd
- type EventEventReply
- type EventLeaveApproval
- type EventLeaveApprovalV2
- type EventMessage
- type EventMessageFile
- type EventMessageImage
- type EventMessageMergeForward
- type EventMessagePost
- type EventMessageRead
- type EventMessageText
- type EventOrderPaid
- type EventP2PChatCreate
- type EventRemedyApproval
- type EventRemoveBot
- type EventShiftApproval
- type EventTripApproval
- type EventUserAdd
- type EventUserStatusChange
- type EventWorkApproval
Constants ¶
View Source
const ( CallbackTypeUrlVerification = "url_verification" CallbackTypeEventCallback = "event_callback" )
View Source
const EventTypeAddBot = "add_bot"
View Source
const EventTypeAddUserToChat = "add_user_to_chat"
View Source
const EventTypeAppOpen = "app_open"
View Source
const EventTypeAppStatusChange = "app_status_change"
View Source
const EventTypeAppTicket = "app_ticket"
View Source
const EventTypeAppUninstalled = "app_uninstalled"
View Source
const EventTypeChatDisband = "chat_disband"
View Source
const EventTypeContactScopeChange = "contact_scope_change"
View Source
const EventTypeDeptAdd = "dept_add"
View Source
const (
EventTypeEventReply = "event_reply"
)
View Source
const EventTypeLeaveApproval = "leave_approval"
View Source
const EventTypeLeaveApprovalV2 = "leave_approvalV2"
View Source
const (
EventTypeMessage = "message"
)
View Source
const EventTypeMessageRead = "message_read"
View Source
const EventTypeOrderPaid = "order_paid"
View Source
const EventTypeP2PChatCreate = "p2p_chat_create"
View Source
const EventTypeRemedyApproval = "remedy_approval"
View Source
const EventTypeRemoveBot = "remove_bot"
View Source
const EventTypeShiftApproval = "shift_approval"
View Source
const EventTypeTripApproval = "trip_approval"
View Source
const EventTypeUserAdd = "user_add"
View Source
const EventTypeUserStatusChange = "user_status_change"
View Source
const EventTypeWorkApproval = "work_approval"
View Source
const MsgTypeFile = "file"
View Source
const MsgTypeImage = "image"
View Source
const MsgTypeMergeForward = "merge_forward"
View Source
const MsgTypePost = "post"
View Source
const MsgTypeText = "text"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventAddBot ¶
type EventAddBot struct { BaseEvent Event struct { AppID string `json:"app_id"` ChatI18NNames struct { EnUs string `json:"en_us"` ZhCn string `json:"zh_cn"` } `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"` TenantKey string `json:"tenant_key"` Type string `json:"type"` } `json:"event"` }
type EventAddUserToChat ¶
type EventAddUserToChat struct { BaseEvent Event struct { AppID string `json:"app_id"` ChatID string `json:"chat_id"` Operator struct { OpenID string `json:"open_id"` UserID string `json:"user_id"` } `json:"operator"` TenantKey string `json:"tenant_key"` Type string `json:"type"` Users []struct { Name string `json:"name"` OpenID string `json:"open_id"` UserID string `json:"user_id"` } `json:"users"` } `json:"event"` }
type EventAppOpen ¶
type EventAppOpen struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` 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"` } `json:"event"` }
type EventAppStatusChange ¶
type EventAppTicket ¶
type EventAppUninstalled ¶
type EventChallenge ¶
type EventChatDisband ¶
type EventContactScopeChange ¶
type EventDeptAdd ¶
type EventEventReply ¶
type EventEventReply struct { BaseEvent Event struct { AppID string `json:"app_id"` Type string `json:"type"` TenantKey string `json:"tenant_key"` EventID string `json:"event_id"` Attendee struct { OpenID string `json:"open_id"` EmployeeID string `json:"employee_id"` UnionID string `json:"union_id"` } `json:"attendee"` Status string `json:"status"` DisplayName string `json:"display_name"` ReplyTimestmap string `json:"reply_timestmap"` } `json:"event"` }
{ "ts": "1502199207.7171419", //时间戳 "uuid": "bc447199585340d1f3728d26b1c0297a", "token": "41a9425ea7df4536a7623e38fa321bae", // 校验 Token "type": "event_callback", // 事件回调此处固定为 event_callback "event": { "app_id" : "cli_xxxxxx", "type" : "event_reply", // 事件类型 "tenant_key" : "xxxxx", "event_id": "xxxx", //日程id "attendee" : { "open_id":"xxx", // 回复此日程的参与人的open_id "employee_id":"yyy", // 回复此日程的参与人的employee_id,仅自建应用才会返回 "union_id": "zzz" // 用户在ISV下的唯一标识,申请了"获取用户统一ID"权限后返回 }, "status": "accept", // 对日程的回复:accept 接受, tentative 待定, decline 拒绝 "display_name":"xxx", "reply_timestmap":"1589097034" // 回复时间 } }
type EventLeaveApproval ¶
type EventLeaveApproval struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` EmployeeID string `json:"employee_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` LeaveType string `json:"leave_type"` LeaveUnit int `json:"leave_unit"` LeaveStartTime string `json:"leave_start_time"` LeaveEndTime string `json:"leave_end_time"` LeaveInterval int `json:"leave_interval"` LeaveReason string `json:"leave_reason"` } `json:"event"` }
type EventLeaveApprovalV2 ¶
type EventLeaveApprovalV2 struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` UserID string `json:"user_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` LeaveName string `json:"leave_name"` LeaveUnit string `json:"leave_unit"` LeaveStartTime string `json:"leave_start_time"` LeaveEndTime string `json:"leave_end_time"` LeaveDetail [][]string `json:"leave_detail"` LeaveInterval int `json:"leave_interval"` LeaveReason string `json:"leave_reason"` I18NResources []struct { Locale string `json:"locale"` IsDefault bool `json:"is_default"` Texts struct { I18N123456 string `json:"@i18n@123456"` } `json:"texts"` } `json:"i18n_resources"` } `json:"event"` }
type EventMessage ¶
type EventMessageFile ¶
type EventMessageFile struct { EventMessage Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` ChatType string `json:"chat_type"` IsMention bool `json:"is_mention"` MsgType string `json:"msg_type"` OpenChatID string `json:"open_chat_id"` OpenID string `json:"open_id"` OpenMessageID string `json:"open_message_id"` ParentID string `json:"parent_id"` RootID string `json:"root_id"` Type string `json:"type"` FileKey string `json:"file_key"` } `json:"event"` }
type EventMessageImage ¶
type EventMessageImage struct { EventMessage Event struct { Type string `json:"type"` 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"` ImageHeight string `json:"image_height"` ImageWidth string `json:"image_width"` OpenID string `json:"open_id"` OpenMessageID string `json:"open_message_id"` IsMention bool `json:"is_mention"` ImageKey string `json:"image_key"` } `json:"event"` }
type EventMessageMergeForward ¶
type EventMessageMergeForward struct { EventMessage Event struct { Type string `json:"type"` 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"` MsgType string `json:"msg_type"` OpenID string `json:"open_id"` OpenMessageID string `json:"open_message_id"` IsMention bool `json:"is_mention"` ChatType string `json:"chat_type"` ChatID string `json:"chat_id"` User string `json:"user"` MsgList []struct { RootID string `json:"root_id"` ParentID string `json:"parent_id"` OpenChatID string `json:"open_chat_id"` MsgType string `json:"msg_type"` OpenID string `json:"open_id"` OpenMessageID string `json:"open_message_id"` IsMention bool `json:"is_mention"` ImageKey string `json:"image_key,omitempty"` ImageURL string `json:"image_url,omitempty"` CreateTime int `json:"create_time"` Text string `json:"text,omitempty"` Title string `json:"title,omitempty"` } `json:"msg_list"` } `json:"event"` }
type EventMessagePost ¶
type EventMessagePost struct { EventMessage Event struct { Type string `json:"type"` 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"` } `json:"event"` }
type EventMessageRead ¶
type EventMessageText ¶
type EventMessageText struct { EventMessage Event struct { Type string `json:"type"` 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"` } `json:"event"` }
type EventOrderPaid ¶
type EventOrderPaid struct { BaseEvent Event struct { Type string `json:"type"` AppID string `json:"app_id"` 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 int `json:"order_pay_price"` TenantKey string `json:"tenant_key"` } `json:"event"` }
type EventP2PChatCreate ¶
type EventP2PChatCreate struct { BaseEvent Event struct { AppID string `json:"app_id"` ChatID string `json:"chat_id"` Operator struct { OpenID string `json:"open_id"` UserID string `json:"user_id"` } `json:"operator"` TenantKey string `json:"tenant_key"` Type string `json:"type"` User struct { Name string `json:"name"` OpenID string `json:"open_id"` UserID string `json:"user_id"` } `json:"user"` } `json:"event"` }
type EventRemedyApproval ¶
type EventRemedyApproval struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` EmployeeID string `json:"employee_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` RemedyTime string `json:"remedy_time"` RemedyReason string `json:"remedy_reason"` } `json:"event"` }
type EventRemoveBot ¶
type EventRemoveBot struct { BaseEvent Event struct { AppID string `json:"app_id"` ChatI18NNames struct { EnUs string `json:"en_us"` ZhCn string `json:"zh_cn"` } `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"` TenantKey string `json:"tenant_key"` Type string `json:"type"` } `json:"event"` }
type EventShiftApproval ¶
type EventShiftApproval struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` EmployeeID string `json:"employee_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` ShiftTime string `json:"shift_time"` ReturnTime string `json:"return_time"` ShiftReason string `json:"shift_reason"` } `json:"event"` }
type EventTripApproval ¶
type EventTripApproval struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` EmployeeID string `json:"employee_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` Schedules []struct { TripStartTime string `json:"trip_start_time"` TripEndTime string `json:"trip_end_time"` TripInterval int `json:"trip_interval"` Departure string `json:"departure"` Destination string `json:"destination"` Transportation string `json:"transportation"` TripType string `json:"trip_type"` Remark string `json:"remark"` } `json:"schedules"` TripInterval int `json:"trip_interval"` TripReason string `json:"trip_reason"` TripPeers []string `json:"trip_peers"` } `json:"event"` }
type EventUserAdd ¶
type EventUserStatusChange ¶
type EventUserStatusChange struct { BaseEvent Event struct { Type string `json:"type"` 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"` ChangeTime string `json:"change_time"` CurrentStatus struct { IsActive bool `json:"is_active"` IsFrozen bool `json:"is_frozen"` IsResigned bool `json:"is_resigned"` } `json:"current_status"` } `json:"event"` }
type EventWorkApproval ¶
type EventWorkApproval struct { BaseEvent Event struct { AppID string `json:"app_id"` TenantKey string `json:"tenant_key"` Type string `json:"type"` InstanceCode string `json:"instance_code"` EmployeeID string `json:"employee_id"` StartTime int `json:"start_time"` EndTime int `json:"end_time"` WorkType string `json:"work_type"` WorkStartTime string `json:"work_start_time"` WorkEndTime string `json:"work_end_time"` WorkInterval int `json:"work_interval"` WorkReason string `json:"work_reason"` } `json:"event"` }
Click to show internal directories.
Click to hide internal directories.