convert

package
v3.5.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlackDB2Pb

func BlackDB2Pb(
	ctx context.Context,
	blackDBs []*relation.BlackModel,
	f func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
) (blackPbs []*sdk.BlackInfo, err error)

func ConversationDB2Pb

func ConversationDB2Pb(conversationDB *relation.ConversationModel) *conversation.Conversation

func ConversationPb2DB

func ConversationPb2DB(conversationPB *conversation.Conversation) *relation.ConversationModel

func ConversationsDB2Pb

func ConversationsDB2Pb(conversationsDB []*relation.ConversationModel) (conversationsPB []*conversation.Conversation)

func ConversationsPb2DB

func ConversationsPb2DB(conversationsPB []*conversation.Conversation) (conversationsDB []*relation.ConversationModel)

func Db2PbCMSGroup

func Db2PbCMSGroup(
	m *relation.GroupModel,
	ownerUserID string,
	ownerUserName string,
	memberCount uint32,
) *pbgroup.CMSGroup

func Db2PbGroupAbstractInfo

func Db2PbGroupAbstractInfo(
	groupID string,
	groupMemberNumber uint32,
	groupMemberListHash uint64,
) *pbgroup.GroupAbstractInfo

func Db2PbGroupInfo

func Db2PbGroupInfo(m *relation.GroupModel, ownerUserID string, memberCount uint32) *sdkws.GroupInfo

func FriendDB2Pb

func FriendDB2Pb(
	ctx context.Context,
	friendDB *relation.FriendModel,
	getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
) (*sdkws.FriendInfo, error)

func FriendPb2DB

func FriendPb2DB(friend *sdkws.FriendInfo) *relation.FriendModel

func FriendRequestDB2Pb

func FriendRequestDB2Pb(
	ctx context.Context,
	friendRequests []*relation.FriendRequestModel,
	getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
) ([]*sdkws.FriendRequest, error)

func FriendsDB2Pb

func FriendsDB2Pb(
	ctx context.Context,
	friendsDB []*relation.FriendModel,
	getUsers func(ctx context.Context, userIDs []string) (map[string]*sdkws.UserInfo, error),
) (friendsPb []*sdkws.FriendInfo, err error)

func MsgDB2Pb

func MsgDB2Pb(msgModel *unrelation.MsgDataModel) *sdkws.MsgData

func MsgPb2DB

func MsgPb2DB(msg *sdkws.MsgData) *unrelation.MsgDataModel

func Pb2DBGroupInfo

func Pb2DBGroupInfo(m *sdkws.GroupInfo) *relation.GroupModel

func Pb2DbGroupRequest

func Pb2DbGroupRequest(req *pbgroup.GroupApplicationResponseReq, handleUserID string) *relation.GroupRequestModel

func UserPb2DB

func UserPb2DB(user *sdkws.UserInfo) *relationtb.UserModel

func UsersDB2Pb

func UsersDB2Pb(users []*relationtb.UserModel) (result []*sdkws.UserInfo)

Types

This section is empty.

Jump to

Keyboard shortcuts

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