message

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LIVE     = "L"
	STATUS   = "S"
	CLUSTER  = "C"
	USERNAME = "U"
	MESSAGE  = "M"
	TYPE     = "T"

	ACTION        = "AN"
	LOGIN         = "LN"
	NO_USER       = "NU"
	SEND_FAIL     = "SF"
	TO            = "TO"
	FROM          = "FR"
	ALL_MESSAGE   = "AM"
	TRACK         = "TK"
	SUCCESS       = "SC"
	FAIL          = "FL"
	RESULT        = "RT"
	LOGIN_SUCCESS = "LNSC"

	LENGTH = "LEN"
	SYSTEM = "SYS"

	MESSAGE_ID          = "MID"
	SEND_CLUSTER_USER   = "SCU"
	DELETE_CLUSTER_USER = "DCU"

	BODY = "BODY"

	TIME = "TIME"

	START = "START"

	FULL_SUCCESS = "SUCCESS"

	FULL_SYSTEM = "SYSTEM"

	TCP = "TCP"

	FULL_CLUSTER = "CLUSTER"

	FULL_NOUSER = "NOUSER"

	FULL_FAIL = "FAIL"
	WEBSOCKET = "WEBSOCKET"

	HTTP = "HTTP"
)

Variables

This section is empty.

Functions

func ClusterLive

func ClusterLive() []byte

func Live

func Live() []byte

func LoginSuccess

func LoginSuccess() []byte

func SendClusterLiveMessage

func SendClusterLiveMessage(address []string) []byte

func SendMachinesNoUser

func SendMachinesNoUser(userid ...string) []byte

func StartLogin

func StartLogin() []byte

Types

type Head map[string]string

func (Head) Get

func (h Head) Get(key string) string

type Message

type Message struct {
	Heads Head
	Body  []byte
}

func GetMessage

func GetMessage(touserid string, fromuserId, mesg string) *Message

func GetSystemMessage

func GetSystemMessage(userid string, mesg string) *Message

根据用户ID 向用户发送信息

func SendFail

func SendFail(msgid string) *Message

func SendSuccess

func SendSuccess(msgid string) *Message

func (*Message) MessageToByte

func (m *Message) MessageToByte() []byte

Jump to

Keyboard shortcuts

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