feat: incr sync version.
This commit is contained in:
@@ -0,0 +1,120 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/server_api_params"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/sdk_struct"
|
||||
)
|
||||
|
||||
type FindMessageListParams []*ConversationArgs
|
||||
type ConversationArgs struct {
|
||||
ConversationID string `json:"conversationID"`
|
||||
ClientMsgIDList []string `json:"clientMsgIDList"`
|
||||
}
|
||||
type FindMessageListCallback struct {
|
||||
TotalCount int `json:"totalCount"`
|
||||
FindResultItems []*SearchByConversationResult `json:"findResultItems"`
|
||||
}
|
||||
type GetHistoryMessageListParams struct {
|
||||
UserID string `json:"userID"`
|
||||
GroupID string `json:"groupID"`
|
||||
ConversationID string `json:"conversationID"`
|
||||
StartClientMsgID string `json:"startClientMsgID"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
type GetHistoryMessageListCallback []*sdk_struct.MsgStruct
|
||||
type GetAdvancedHistoryMessageListParams struct {
|
||||
LastMinSeq int64 `json:"lastMinSeq"`
|
||||
ConversationID string `json:"conversationID"`
|
||||
StartClientMsgID string `json:"startClientMsgID"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
type GetAdvancedHistoryMessageListCallback struct {
|
||||
MessageList []*sdk_struct.MsgStruct `json:"messageList"`
|
||||
LastMinSeq int64 `json:"lastMinSeq"`
|
||||
IsEnd bool `json:"isEnd"`
|
||||
ErrCode int32 `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
}
|
||||
|
||||
type SetConversationStatusParams struct {
|
||||
UserId string `json:"userID" validate:"required"`
|
||||
Status int `json:"status" validate:"required"`
|
||||
}
|
||||
type SearchLocalMessagesParams struct {
|
||||
ConversationID string `json:"conversationID"`
|
||||
KeywordList []string `json:"keywordList"`
|
||||
KeywordListMatchType int `json:"keywordListMatchType"`
|
||||
SenderUserIDList []string `json:"senderUserIDList"`
|
||||
MessageTypeList []int `json:"messageTypeList"`
|
||||
SearchTimePosition int64 `json:"searchTimePosition"`
|
||||
SearchTimePeriod int64 `json:"searchTimePeriod"`
|
||||
PageIndex int `json:"pageIndex"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
type SearchLocalMessagesCallback struct {
|
||||
TotalCount int `json:"totalCount"`
|
||||
SearchResultItems []*SearchByConversationResult `json:"searchResultItems"`
|
||||
}
|
||||
type SearchByConversationResult struct {
|
||||
ConversationID string `json:"conversationID"`
|
||||
ConversationType int32 `json:"conversationType"`
|
||||
ShowName string `json:"showName"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
LatestMsgSendTime int64 `json:"latestMsgSendTime,omitempty"`
|
||||
MessageCount int `json:"messageCount"`
|
||||
MessageList []*sdk_struct.MsgStruct `json:"messageList"`
|
||||
}
|
||||
type SetMessageReactionExtensionsParams []*server_api_params.KeyValue
|
||||
|
||||
type SetMessageReactionExtensionsCallback struct {
|
||||
Key string `json:"key" validate:"required"`
|
||||
Value string `json:"value" validate:"required"`
|
||||
ErrCode int32 `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
}
|
||||
|
||||
type AddMessageReactionExtensionsParams []*server_api_params.KeyValue
|
||||
|
||||
type AddMessageReactionExtensionsCallback struct {
|
||||
Key string `json:"key" validate:"required"`
|
||||
Value string `json:"value" validate:"required"`
|
||||
ErrCode int32 `json:"errCode"`
|
||||
ErrMsg string `json:"errMsg"`
|
||||
}
|
||||
type DeleteMessageReactionExtensionsParams []string
|
||||
|
||||
type GetTypekeyListResp struct {
|
||||
TypeKeyInfoList []*SingleTypeKeyInfoSum `json:"TypeKeyListInfo"`
|
||||
}
|
||||
type SingleTypeKeyInfoSum struct {
|
||||
TypeKey string `json:"typeKey"`
|
||||
Counter int64 `json:"counter"`
|
||||
InfoList []*Info `json:"infoList"`
|
||||
IsContainSelf bool `json:"isContainSelf"`
|
||||
}
|
||||
|
||||
type SingleTypeKeyInfo struct {
|
||||
TypeKey string `json:"typeKey"`
|
||||
Counter int64 `json:"counter"`
|
||||
IsCanRepeat bool `json:"isCanRepeat"`
|
||||
Index int `json:"index"`
|
||||
InfoList map[string]*Info `json:"infoList"`
|
||||
}
|
||||
type Info struct {
|
||||
UserID string `json:"userID"`
|
||||
Ex string `json:"ex"`
|
||||
}
|
||||
109
go/chao-sdk-core/pkg/sdk_params_callback/friend_sdk_struct.go
Normal file
109
go/chao-sdk-core/pkg/sdk_params_callback/friend_sdk_struct.go
Normal file
@@ -0,0 +1,109 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/constant"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/server_api_params"
|
||||
"github.com/openimsdk/protocol/wrapperspb"
|
||||
)
|
||||
|
||||
// 1
|
||||
type GetDesignatedFriendsInfoParams []string
|
||||
type GetDesignatedFriendsInfoCallback []server_api_params.FullUserInfo
|
||||
|
||||
// 1
|
||||
type AddFriendParams struct {
|
||||
ToUserID string `json:"toUserID" validate:"required"`
|
||||
ReqMsg string `json:"reqMsg"`
|
||||
}
|
||||
|
||||
const AddFriendCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// 1
|
||||
// type GetRecvFriendApplicationListParams struct{}
|
||||
type GetRecvFriendApplicationListCallback []*model_struct.LocalFriendRequest
|
||||
|
||||
// 1
|
||||
// type GetSendFriendApplicationListParams struct{}
|
||||
type GetSendFriendApplicationListCallback []*model_struct.LocalFriendRequest
|
||||
|
||||
// 1
|
||||
type ProcessFriendApplicationParams struct {
|
||||
ToUserID string `json:"toUserID" validate:"required"`
|
||||
HandleMsg string `json:"handleMsg"`
|
||||
}
|
||||
|
||||
const ProcessFriendApplicationCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// 1
|
||||
type CheckFriendParams []string
|
||||
type CheckFriendCallback []server_api_params.UserIDResult
|
||||
|
||||
// 1
|
||||
type DeleteFriendParams string
|
||||
|
||||
// type DeleteFriendCallback struct{}
|
||||
const DeleteFriendCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// 1
|
||||
// type GetFriendListParams struct{}
|
||||
type GetFriendListCallback []server_api_params.FullUserInfo
|
||||
|
||||
type SearchFriendsParam struct {
|
||||
KeywordList []string `json:"keywordList"`
|
||||
IsSearchUserID bool `json:"isSearchUserID"`
|
||||
IsSearchNickname bool `json:"isSearchNickname"`
|
||||
IsSearchRemark bool `json:"isSearchRemark"`
|
||||
}
|
||||
|
||||
type GetFriendListPage struct {
|
||||
}
|
||||
|
||||
type SearchFriendsCallback []*SearchFriendItem
|
||||
type SearchFriendItem struct {
|
||||
model_struct.LocalFriend
|
||||
Relationship int `json:"relationship"`
|
||||
}
|
||||
|
||||
// 1
|
||||
type SetFriendRemarkParams struct {
|
||||
ToUserID string `json:"toUserID" validate:"required"`
|
||||
Remark string `json:"remark" validate:"required"`
|
||||
}
|
||||
type SetFriendPinParams struct {
|
||||
ToUserIDs []string `json:"toUserIDs" validate:"required"`
|
||||
IsPinned *wrapperspb.BoolValue `json:"isPinned" validate:"required"`
|
||||
}
|
||||
|
||||
// type SetFriendRemarkCallback struct{}
|
||||
const SetFriendRemarkCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// 1
|
||||
type AddBlackParams string
|
||||
|
||||
// type AddBlackCallback struct{}
|
||||
const AddBlackCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// 1
|
||||
// type GetBlackListParams struct{}
|
||||
type GetBlackListCallback []server_api_params.FullUserInfo
|
||||
|
||||
// 1
|
||||
type RemoveBlackParams string
|
||||
|
||||
// type DeleteBlackCallback struct{}
|
||||
const RemoveBlackCallback = constant.SuccessCallbackDefault
|
||||
113
go/chao-sdk-core/pkg/sdk_params_callback/group_sdk_struct.go
Normal file
113
go/chao-sdk-core/pkg/sdk_params_callback/group_sdk_struct.go
Normal file
@@ -0,0 +1,113 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/constant"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/server_api_params"
|
||||
)
|
||||
|
||||
type CreateGroupBaseInfoParam struct {
|
||||
GroupType int32 `json:"groupType"`
|
||||
SetGroupInfoParam
|
||||
}
|
||||
|
||||
type CreateGroupMemberRoleParam []*server_api_params.GroupAddMemberInfo
|
||||
type CreateGroupCallback map[string]interface{}
|
||||
|
||||
// param groupID reqMsg
|
||||
const JoinGroupCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// type QuitGroupParam // groupID
|
||||
const QuitGroupCallback = constant.SuccessCallbackDefault
|
||||
|
||||
const DismissGroupCallback = constant.SuccessCallbackDefault
|
||||
|
||||
const GroupMuteChangeCallback = constant.SuccessCallbackDefault
|
||||
|
||||
const GroupMemberMuteChangeCallback = constant.SuccessCallbackDefault
|
||||
|
||||
const SetGroupMemberNicknameCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// type GetJoinedGroupListParam null
|
||||
type GetJoinedGroupListCallback []*model_struct.LocalGroup
|
||||
|
||||
type GetGroupsInfoParam []string
|
||||
type GetGroupsInfoCallback []*model_struct.LocalGroup
|
||||
type SearchGroupsParam struct {
|
||||
KeywordList []string `json:"keywordList"`
|
||||
IsSearchGroupID bool `json:"isSearchGroupID"`
|
||||
IsSearchGroupName bool `json:"isSearchGroupName"`
|
||||
}
|
||||
type SearchGroupsCallback []*model_struct.LocalGroup
|
||||
|
||||
type SearchGroupMembersParam struct {
|
||||
GroupID string `json:"groupID"`
|
||||
KeywordList []string `json:"keywordList"`
|
||||
IsSearchUserID bool `json:"isSearchUserID"`
|
||||
IsSearchMemberNickname bool `json:"isSearchMemberNickname"`
|
||||
//offset, count int
|
||||
Offset int `json:"offset"`
|
||||
Count int `json:"count"`
|
||||
PageNumber int `json:"pageNumber"`
|
||||
}
|
||||
|
||||
type SearchGroupMembersCallback []*model_struct.LocalGroupMember
|
||||
|
||||
type SetGroupInfoParam struct {
|
||||
GroupName string `json:"groupName"`
|
||||
Notification string `json:"notification"`
|
||||
Introduction string `json:"introduction"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
Ex string `json:"ex"`
|
||||
NeedVerification *int32 `json:"needVerification" binding:"oneof=0 1 2"`
|
||||
}
|
||||
|
||||
type SetGroupMemberInfoParam struct {
|
||||
GroupID string `json:"groupID"`
|
||||
UserID string `json:"userID"`
|
||||
Ex *string `json:"ex"`
|
||||
}
|
||||
|
||||
const SetGroupMemberInfoCallback = constant.SuccessCallbackDefault
|
||||
|
||||
const SetGroupInfoCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// type GetGroupMemberListParam groupID ...
|
||||
type GetGroupMemberListCallback []*model_struct.LocalGroupMember
|
||||
|
||||
type GetGroupMembersInfoParam []string
|
||||
type GetGroupMembersInfoCallback []*model_struct.LocalGroupMember
|
||||
|
||||
type KickGroupMemberParam []string
|
||||
type KickGroupMemberCallback []*server_api_params.UserIDResult
|
||||
|
||||
// type TransferGroupOwnerParam
|
||||
const TransferGroupOwnerCallback = constant.SuccessCallbackDefault
|
||||
|
||||
type InviteUserToGroupParam []string
|
||||
type InviteUserToGroupCallback []*server_api_params.UserIDResult
|
||||
|
||||
// type GetGroupApplicationListParam
|
||||
type GetGroupApplicationListCallback []*model_struct.LocalAdminGroupRequest
|
||||
|
||||
type GetSendGroupApplicationListCallback []*model_struct.LocalGroupRequest
|
||||
|
||||
// type AcceptGroupApplicationParam
|
||||
const AcceptGroupApplicationCallback = constant.SuccessCallbackDefault
|
||||
|
||||
// type RefuseGroupApplicationParam
|
||||
const RefuseGroupApplicationCallback = constant.SuccessCallbackDefault
|
||||
@@ -0,0 +1,68 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct"
|
||||
)
|
||||
|
||||
// //////////////////////////////friend////////////////////////////////////
|
||||
type FriendApplicationAddedCallback model_struct.LocalFriendRequest
|
||||
type FriendApplicationAcceptCallback model_struct.LocalFriendRequest
|
||||
type FriendApplicationRejectCallback model_struct.LocalFriendRequest
|
||||
type FriendApplicationDeletedCallback model_struct.LocalFriendRequest
|
||||
type FriendAddedCallback model_struct.LocalFriend
|
||||
type FriendDeletedCallback model_struct.LocalFriend
|
||||
type FriendInfoChangedCallback model_struct.LocalFriend
|
||||
type BlackAddCallback model_struct.LocalBlack
|
||||
type BlackDeletedCallback model_struct.LocalBlack
|
||||
|
||||
////////////////////////////////group////////////////////////////////////
|
||||
|
||||
type JoinedGroupAddedCallback model_struct.LocalGroup
|
||||
type JoinedGroupDeletedCallback model_struct.LocalGroup
|
||||
type GroupMemberAddedCallback model_struct.LocalGroupMember
|
||||
type GroupMemberDeletedCallback model_struct.LocalGroupMember
|
||||
type GroupApplicationAddedCallback model_struct.LocalAdminGroupRequest
|
||||
type GroupApplicationDeletedCallback model_struct.LocalAdminGroupRequest
|
||||
type GroupApplicationAcceptCallback model_struct.LocalAdminGroupRequest
|
||||
type GroupApplicationRejectCallback model_struct.LocalAdminGroupRequest
|
||||
type GroupInfoChangedCallback model_struct.LocalGroup
|
||||
type GroupMemberInfoChangedCallback model_struct.LocalGroupMember
|
||||
|
||||
// ////////////////////////////user////////////////////////////////////////
|
||||
type SelfInfoUpdatedCallback model_struct.LocalUser
|
||||
|
||||
// ////////////////////////////user////////////////////////////////////////
|
||||
type ConversationUpdateCallback model_struct.LocalConversation
|
||||
type ConversationDeleteCallback model_struct.LocalConversation
|
||||
|
||||
// ///////////////////////////signaling/////////////////////////////////////
|
||||
type InvitationInfo struct {
|
||||
InviterUserID string
|
||||
InviteeUserIDList []string
|
||||
CustomData string
|
||||
GroupID string
|
||||
}
|
||||
|
||||
//type ReceiveNewInvitationCallback sdkws.SignalInviteReq
|
||||
//
|
||||
//type InviteeAcceptedCallback sdkws.SignalAcceptReq
|
||||
//
|
||||
//type InviteeRejectedCallback sdkws.SignalRejectReq
|
||||
//
|
||||
//type InvitationCancelledCallback sdkws.SignalCancelReq
|
||||
//
|
||||
//type InvitationTimeoutCallback sdkws.SignalInviteReq
|
||||
27
go/chao-sdk-core/pkg/sdk_params_callback/third_sdk_struct.go
Normal file
27
go/chao-sdk-core/pkg/sdk_params_callback/third_sdk_struct.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/constant"
|
||||
)
|
||||
|
||||
const UpdateFcmTokenCallback = constant.SuccessCallbackDefault
|
||||
const SetAppBadgeCallback = constant.SuccessCallbackDefault
|
||||
|
||||
type UploadLogParams struct {
|
||||
SystemType string `json:"system_type"`
|
||||
Ex string `json:"ex"`
|
||||
}
|
||||
32
go/chao-sdk-core/pkg/sdk_params_callback/user_sdk_struct.go
Normal file
32
go/chao-sdk-core/pkg/sdk_params_callback/user_sdk_struct.go
Normal file
@@ -0,0 +1,32 @@
|
||||
// Copyright © 2023 OpenIM SDK. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package sdk_params_callback
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/constant"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/db/model_struct"
|
||||
"github.com/openimsdk/openim-sdk-core/v3/pkg/server_api_params"
|
||||
)
|
||||
|
||||
// other user
|
||||
type GetUsersInfoParam []string
|
||||
type GetUsersInfoCallback []server_api_params.FullUserInfo
|
||||
|
||||
// type GetSelfUserInfoParam string
|
||||
type GetSelfUserInfoCallback *model_struct.LocalUser
|
||||
|
||||
type SetSelfUserInfoParam server_api_params.ApiUserInfo
|
||||
|
||||
const SetSelfUserInfoCallback = constant.SuccessCallbackDefault
|
||||
Reference in New Issue
Block a user