callbacks

package
v0.0.0-...-9935dc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2019 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UrlParamCallbackCommand = "CallbackCommand"
	UrlParamSdkAppid        = "SdkAppid"
	UrlParamContentType     = "contenttype"
	UrlParamClientIP        = "ClientIP"
	UrlParamOptPlatform     = "OptPlatform"
)
View Source
const (
	PlatformRESTAPI = "RESTAPI"
	PlatformWeb     = "Web"
	PlatformAndroid = "Android"
	PlatformiOS     = "iOS"
	PlatformWindows = "Windows"
	PlatformMac     = "Mac"
	PlatformUnkown  = "Unkown"
)
View Source
const (
	// 申请入群之前回调
	CallbackBeforeApplyJoinGroup = groupCommandPrefix + "CallbackBeforeApplyJoinGroup"
	// 拉人入群之前回调
	CallbackBeforeInviteJoinGroup = groupCommandPrefix + "CallbackBeforeInviteJoinGroup"
	// 新成员入群之后回调
	CallbackAfterNewMemberJoin = groupCommandPrefix + "CallbackAfterNewMemberJoin"
	// 群成员离开之后回调
	CallbackAfterMemberExit = groupCommandPrefix + "CallbackAfterMemberExit"
	// 创建群组之前回调
	CallbackBeforeCreateGroup = groupCommandPrefix + "CallbackBeforeCreateGroup"
	// 群组资料修改之后回调
	CallbackAfterGroupInfoChanged = groupCommandPrefix + "CallbackAfterGroupInfoChanged"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackAfterGroupInfoChangedPayload

type CallbackAfterGroupInfoChangedPayload struct {
	CallbackCommand     string                    `json:"CallbackCommand"`
	GroupID             string                    `json:"GroupId"`
	Type                string                    `json:"Type"`
	OperatorAccount     string                    `json:"Operator_Account"`
	Name                string                    `json:"Name"`
	Introduction        string                    `json:"Introduction"`
	Notification        string                    `json:"Notification"`
	FaceURL             string                    `json:"FaceUrl"`
	UserDefinedDataList []UserDefinedDataListItem `json:"UserDefinedDataList"`
}

type CallbackAfterMemberExitPayload

type CallbackAfterMemberExitPayload struct {
	CallbackCommand string                `json:"CallbackCommand"`
	GroupID         string                `json:"GroupId"`
	Type            string                `json:"Type"`
	ExitType        string                `json:"ExitType"`
	OperatorAccount string                `json:"Operator_Account"`
	ExitMemberList  []types.MinimalMember `json:"ExitMemberList"`
}

================ 群成员离开之后回调 ================

type CallbackAfterNewMemberJoinPayload

type CallbackAfterNewMemberJoinPayload struct {
	CallbackCommand string                `json:"CallbackCommand"`
	GroupID         string                `json:"GroupId"`
	Type            string                `json:"Type"`
	JoinType        string                `json:"JoinType"`
	OperatorAccount string                `json:"Operator_Account"`
	NewMemberList   []types.MinimalMember `json:"NewMemberList"`
}

================ 新成员入群之后回调 ================

type CallbackBeforeApplyJoinGroupPayload

type CallbackBeforeApplyJoinGroupPayload struct {
	CallbackCommand  string `json:"CallbackCommand"`
	GroupID          string `json:"GroupId"`
	Type             string `json:"Type"`
	RequestorAccount string `json:"Requestor_Account"`
}

================ 申请入群之前回调 ================

type CallbackBeforeCreateGroupPayload

type CallbackBeforeCreateGroupPayload struct {
	CallbackCommand string                `json:"CallbackCommand"`
	OperatorAccount string                `json:"Operator_Account"`
	OwnerAccount    string                `json:"Owner_Account"`
	Type            consts.GroupType      `json:"Type"`
	Name            string                `json:"Name"`
	CreatedNum      int                   `json:"CreatedNum"`
	MemberList      []types.MinimalMember `json:"MemberList"`
}

================ 创建群组之前回调 ================

type CallbackBeforeInviteJoinGroupPayload

type CallbackBeforeInviteJoinGroupPayload struct {
	CallbackCommand    string                `json:"CallbackCommand"`
	GroupID            string                `json:"GroupId"`
	Type               string                `json:"Type"`
	OperatorAccount    string                `json:"Operator_Account"`
	DestinationMembers []types.MinimalMember `json:"DestinationMembers"`
}

================ 拉人入群之前回调 ================ 拉人入群之前回调请求内容

type CallbackBeforeInviteJoinGroupResponse

type CallbackBeforeInviteJoinGroupResponse struct {
	CallbackCommonResponse
	RefusedMembers_Account []string `json:"RefusedMembers_Account"`
}

拉人入群之前回调响应内容

type CallbackCommonResponse

type CallbackCommonResponse struct {
	ActionStatus string `json:"ActionStatus"`
	ErrorInfo    string `json:"ErrorInfo"`
	ErrorCode    int    `json:"ErrorCode"`
}

func ResponseFail

func ResponseFail(code int, reason string) CallbackCommonResponse

func ResponseOK

func ResponseOK() CallbackCommonResponse

type UserDefinedDataListItem

type UserDefinedDataListItem struct {
	Key   string `json:"Key"`
	Value string `json:"Value"`
}

================ 群组资料修改之后回调 ================

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL