session

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgTypeText  = "text"
	MsgTypeImage = "image"
	MsgTypeVoice = "voice"
	MsgTypeVideo = "video"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FileMessage

type FileMessage struct {
	SessionId string     `json:"sessionId,omitempty"`
	Receiver  string     `json:"receiver,omitempty"`
	Sender    string     `json:"sender"`
	MsgType   string     `json:"msgType"`
	File      *MediaItem `json:"file"`
}

type ImageMessage

type ImageMessage struct {
	SessionId string     `json:"sessionId,omitempty"`
	Receiver  string     `json:"receiver,omitempty"`
	Sender    string     `json:"sender"`
	MsgType   string     `json:"msgType"`
	Image     *MediaItem `json:"image"`
}

type MediaItem

type MediaItem struct {
	MediaId string `json:"media_id"`
}

type Message

type Message interface {
}

type Session

type Session struct {
	SessionId  string   `json:"sessionId"`
	Type       string   `json:"type"`
	Owner      string   `json:"owner"`
	Title      string   `json:"title"`
	Version    int      `json:"version"`
	Member     []string `json:"member"`
	LastMsgId  int      `json:"lastMsgId"`
	ActiveTime int      `json:"activeTime"`
}

type TextItem

type TextItem struct {
	Content string `json:"content"`
}

type TextMessage

type TextMessage struct {
	SessionId string    `json:"sessionId,omitempty"`
	Receiver  string    `json:"receiver,omitempty"`
	Sender    string    `json:"sender"`
	MsgType   string    `json:"msgType"`
	Text      *TextItem `json:"text"`
}

type VideoMessage

type VideoMessage struct {
	SessionId string     `json:"sessionId,omitempty"`
	Receiver  string     `json:"receiver,omitempty"`
	Sender    string     `json:"sender"`
	MsgType   string     `json:"msgType"`
	Video     *MediaItem `json:"video"`
}

type VoiceMessage

type VoiceMessage struct {
	SessionId string     `json:"sessionId,omitempty"`
	Receiver  string     `json:"receiver,omitempty"`
	Sender    string     `json:"sender"`
	MsgType   string     `json:"msgType"`
	Voice     *MediaItem `json:"voice"`
}

Jump to

Keyboard shortcuts

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