Documentation ¶
Index ¶
- Constants
- type CallbackAfterSendSingleMsgReq
- type CallbackBeforeSendSingleMsgReq
- type CallbackMsgModifyCommandReq
- type CallbackUserOfflineReq
- type CallbackUserOnlineReq
- type CommonCallbackReq
- type CommunityParams
- type CreateBotParams
- type CreateUserParams
- type DeleteBotParams
- type DeleteUserParams
- type GetCommunityInfoParams
- type GetUserInfoParams
- type GetUsersStatisticsParams
- type ListPageParams
- type LoginParamsWithAccount
- type MsgAbstract
- type OpenIMCallbackCommand
- type RegisterAdminParams
- type RegisterCustomerParamsInSlack
- type RegisterCustomerParamsInWeb
- type RegisterStaffParams
- type SendToParams
- type UpdateBotParams
- type UpdateCommunityInfoParams
- type UpdateUserInfoParams
- type UpdateUserPasswordParams
- type UserStatusBaseCallback
- type UsersStatisticsType
Constants ¶
const FILE_REQUEST_PARAMS = "file"
FILE_REQUEST_PARAMS xxx file request params.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackAfterSendSingleMsgReq ¶
type CallbackAfterSendSingleMsgReq struct { CommonCallbackReq RecvID string `json:"recvID"` }
CallbackAfterSendSingleMsgReq Request body for AfterSendSingleMsgCommand.
type CallbackBeforeSendSingleMsgReq ¶
type CallbackBeforeSendSingleMsgReq struct { CommonCallbackReq RecvID string `json:"recvID"` }
CallbackBeforeSendSingleMsgReq Request body for BeforeSendSingleMsgCommand.
type CallbackMsgModifyCommandReq ¶
type CallbackMsgModifyCommandReq struct {
CommonCallbackReq
}
CallbackMsgModifyCommandReq Request body for MsgModifyCommand.
type CallbackUserOfflineReq ¶
type CallbackUserOfflineReq struct { UserStatusBaseCallback Seq int64 `json:"seq"` ConnID string `json:"connID"` }
CallbackUserOfflineReq Request body for UserOfflineCommand.
type CallbackUserOnlineReq ¶
type CallbackUserOnlineReq struct { UserStatusBaseCallback // Token string `json:"token"` Seq int64 `json:"seq"` IsAppBackground bool `json:"isAppBackground"` ConnID string `json:"connID"` }
CallbackUserOnlineReq Request body for UserOnlineCommand.
type CommonCallbackReq ¶
type CommonCallbackReq struct { SendID string `json:"sendID"` CallbackCommand string `json:"callbackCommand"` ServerMsgID string `json:"serverMsgID"` ClientMsgID string `json:"clientMsgID"` OperationID string `json:"operationID"` SenderPlatformID int32 `json:"senderPlatformID"` SenderNickname string `json:"senderNickname"` SessionType int32 `json:"sessionType"` MsgFrom int32 `json:"msgFrom"` ContentType int32 `json:"contentType"` Status int32 `json:"status"` CreateTime int64 `json:"createTime"` Content string `json:"content"` Seq uint32 `json:"seq"` AtUserIDList []string `json:"atUserList"` SenderFaceURL string `json:"faceURL"` Ex string `json:"ex"` }
CommonCallbackReq Common callback request command.
type CommunityParams ¶
type CommunityParams struct { Name string `json:"name" binding:"required"` Email string `json:"email" binding:"required"` Description *string `json:"description"` // Description is optional. Avatar *string `json:"avatar"` // Avatar is optional. }
CommunityParams register params for community.
type CreateBotParams ¶
type CreateBotParams struct { BotAddr string `json:"bot_addr" binding:"required"` BotPort int `json:"bot_port" binding:"required"` BotToken string `json:"bot_token" binding:"required"` Nickname string `json:"nickname" binding:"required"` Avatar *string `json:"avatar"` Description *string `json:"description"` }
CreateBotParams register params for bot.
type CreateUserParams ¶
type CreateUserParams struct { Email string `json:"email" binding:"required"` Nickname string `json:"nickname" binding:"required"` Avatar *string `json:"avatar" binding:"required"` // Avatar is optional. Password string `json:"password" binding:"required"` }
CreateUserParams register params for user.
type DeleteBotParams ¶
type DeleteBotParams struct {
UUID string `json:"uuid" binding:"required"`
}
DeleteBotParams delete bot params.
type DeleteUserParams ¶
type DeleteUserParams struct {
UUID string `json:"uuid" binding:"required"`
}
DeleteUserParams delete user params.
type GetCommunityInfoParams ¶
type GetCommunityInfoParams struct {
UUID string `json:"uuid" binding:"required"`
}
GetCommunityInfoParams community info params.
type GetUserInfoParams ¶
type GetUserInfoParams struct {
UUID string `json:"uuid" binding:"required"`
}
GetUserInfoParams user info params.
type GetUsersStatisticsParams ¶
type GetUsersStatisticsParams struct { // online_time, message_count, message_length Type string `json:"type" binding:"required"` StartTimestamp int64 `json:"start_timestamp" binding:"required"` EndTimestamp int64 `json:"end_timestamp" binding:"required"` }
GetUsersStatisticsParams get users statistics params.
type ListPageParams ¶
type ListPageParams struct { Page int `json:"page" binding:"required"` PageSize int `json:"page_size" binding:"required"` }
ListPageParams xxx list page params.
type LoginParamsWithAccount ¶
type LoginParamsWithAccount struct { Email string `json:"email" binding:"required"` Password string `json:"password" binding:"required"` }
LoginParamsWithAccount login params.
type MsgAbstract ¶
type MsgAbstract struct { SendID string `json:"sendID" binding:"required"` RecvID string `json:"recvID" binding:"required"` Content string `json:"content" binding:"required"` }
MsgAbstract msg abstract info.
type OpenIMCallbackCommand ¶
type OpenIMCallbackCommand struct {
Command string `form:"command" json:"command"`
}
OpenIMCallbackCommand OpenIM callback request command.
type RegisterAdminParams ¶
type RegisterAdminParams struct { UserInfo CreateUserParams `json:"user_info" binding:"required"` CommunityInfo CommunityParams `json:"community_info" binding:"required"` Code string `json:"code" binding:"required"` }
RegisterAdminParams register params for admin.
type RegisterCustomerParamsInSlack ¶
type RegisterCustomerParamsInSlack struct{}
RegisterCustomerParamsInSlack register params for user in slack.
type RegisterCustomerParamsInWeb ¶
type RegisterCustomerParamsInWeb struct{}
RegisterCustomerParamsInWeb register params for user in web.
type RegisterStaffParams ¶
type RegisterStaffParams struct {
UserInfo CreateUserParams `json:"user_info" binding:"required"`
}
RegisterStaffParams register params for staff.
type SendToParams ¶
type SendToParams struct {
Email string `json:"email" binding:"required"`
}
SendToParams register params for email.
type UpdateBotParams ¶
type UpdateBotParams struct { UUID string `json:"uuid" binding:"required"` BotAddr *string `json:"bot_addr"` // BotAddr is optional. BotPort *int `json:"bot_port"` // BotPort is optional. BotToken *string `json:"bot_token"` // BotToken is optional. Nickname *string `json:"nickname"` // Nickname is optional. Avatar *string `json:"avatar"` // Avatar is optional. Description *string `json:"description"` // Description is optional. }
UpdateBotParams update bot params.
type UpdateCommunityInfoParams ¶
type UpdateCommunityInfoParams struct { Name *string `json:"name"` // Name is optional. Description *string `json:"description"` // Description is optional. Avatar *string `json:"avatar"` // Avatar is optional. Email *string `json:"email"` // Email is optional. }
UpdateCommunityInfoParams update community info params.
type UpdateUserInfoParams ¶
type UpdateUserInfoParams struct { // uuid is used for admin to update user info. UUID *string `json:"uuid"` // Email can not be updated is this period. Email *string `json:"email"` // Email is optional. Nickname *string `json:"nickname"` // Nickname is optional. Description *string `json:"description"` // Description is optional. Avatar *string `json:"avatar"` // Avatar is optional. // Need to check if the user is admin. IsEnable *bool `json:"is_enable"` // IsEnable is optional. IsAdmin *bool `json:"is_admin"` // IsAdmin is optional. }
UpdateUserInfoParams update user info params.
type UpdateUserPasswordParams ¶
type UpdateUserPasswordParams struct { Password string `json:"password" binding:"required"` RepeatPassword string `json:"repeat_password" binding:"required"` }
UpdateUserPasswordParams update user password params.
type UserStatusBaseCallback ¶
type UserStatusBaseCallback struct { CallbackCommand string `json:"callbackCommand"` OperationID string `json:"operationID"` PlatformID int `json:"platformID"` Platform string `json:"platform"` UserID string `json:"userID"` }
UserStatusBaseCallback Common user callback request command.
type UsersStatisticsType ¶
type UsersStatisticsType string
UsersStatisticsType user statistics type.
const ( USER_STATISTICS_ONLINE_TIME UsersStatisticsType = "online_time" USER_STATISTICS_MESSAGE_COUNT UsersStatisticsType = "message_count" USER_STATISTICS_MESSAGE_LENGTH UsersStatisticsType = "message_length" )
Used for UsersStatisticsType.