common

package
v3.8.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrChanNil = errs.New("channal == nil")
	ErrTimeout = errors.New("send cmd timeout")
)

Functions

func DoListener

func DoListener(ctx context.Context, li goroutine)

func GetCaller added in v3.8.1

func GetCaller(skip int) string

func TriggerCmdConnected

func TriggerCmdConnected(ctx context.Context, ch chan Cmd2Value) error

TriggerCmdConnected Connection success trigger

func TriggerCmdLogOut

func TriggerCmdLogOut(ctx context.Context, ch chan Cmd2Value) error

func TriggerCmdMsgSyncInReinstall added in v3.8.0

func TriggerCmdMsgSyncInReinstall(ctx context.Context, msg sdk_struct.CmdMsgSyncInReinstall, conversationCh chan Cmd2Value) error

func TriggerCmdNewMsgCome

func TriggerCmdNewMsgCome(ctx context.Context, msg sdk_struct.CmdNewMsgComeToConversation, conversationCh chan Cmd2Value) error

func TriggerCmdNotification

func TriggerCmdNotification(ctx context.Context, msg sdk_struct.CmdNewMsgComeToConversation, conversationCh chan Cmd2Value)

func TriggerCmdPushMsg

func TriggerCmdPushMsg(ctx context.Context, msg *sdkws.PushMessages, ch chan Cmd2Value) error

TriggerCmdPushMsg Push message, msg for msgData slice

func TriggerCmdSyncData added in v3.8.0

func TriggerCmdSyncData(ctx context.Context, ch chan Cmd2Value)

func TriggerCmdSyncFlag added in v3.8.0

func TriggerCmdSyncFlag(ctx context.Context, syncFlag int, conversationCh chan Cmd2Value)

func TriggerCmdUpdateConversation

func TriggerCmdUpdateConversation(ctx context.Context, node UpdateConNode, conversationCh chan<- Cmd2Value) error

func TriggerCmdUpdateMessage

func TriggerCmdUpdateMessage(ctx context.Context, node UpdateMessageNode, conversationCh chan Cmd2Value) error

func TriggerCmdWakeUpDataSync added in v3.8.1

func TriggerCmdWakeUpDataSync(ctx context.Context, ch chan Cmd2Value) error

Types

type Cmd2Value

type Cmd2Value struct {
	Cmd    string
	Value  any
	Caller string
	Ctx    context.Context
}

type DeleteConNode

type DeleteConNode struct {
	SourceID       string
	ConversationID string
	SessionType    int
}

type SourceIDAndSessionType

type SourceIDAndSessionType struct {
	SourceID    string
	SessionType int32
	FaceURL     string
	Nickname    string
}

type SyncReactionExtensionsNode

type SyncReactionExtensionsNode struct {
	OperationID string
	Action      int
	Args        interface{}
}

type UpdateConInfo

type UpdateConInfo struct {
	UserID  string
	GroupID string
}

type UpdateConNode

type UpdateConNode struct {
	ConID  string
	Action int //1 Delete the conversation; 2 Update the latest news in the conversation or add a conversation; 3 Put a conversation on the top;
	// 4 Cancel a conversation on the top, 5 Messages are not read and set to 0, 6 New conversations
	Args interface{}
}

type UpdateMessageInfo

type UpdateMessageInfo struct {
	SessionType int32
	UserID      string
	FaceURL     string
	Nickname    string
	GroupID     string
}

type UpdateMessageNode

type UpdateMessageNode struct {
	Action int
	Args   interface{}
}

Jump to

Keyboard shortcuts

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