msg

package
v0.0.0-...-9e0b26f Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: MIT Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Msg

type Msg struct {
	Data     []byte
	Err      error
	CID      int
	IsPublic bool
}

func (Msg) IsEvent

func (m Msg) IsEvent() bool

func (Msg) IsRaw

func (m Msg) IsRaw() bool

func (Msg) PreprocessRaw

func (m Msg) PreprocessRaw() (raw []interface{}, pld interface{}, chID int64, msgType string, err error)

PreprocessRaw takes raw slice of bytes and splits it into: 1. raw payload data - always last element of the slice 2. chanID - always 1st element of the slice 3. msg type - in 3 element msg slice, type is always at index 1

func (Msg) ProcessEvent

func (m Msg) ProcessEvent() (i event.Info, err error)

func (Msg) ProcessPrivate

func (m Msg) ProcessPrivate(raw []interface{}, pld interface{}, chID int64, op string) (interface{}, error)

func (Msg) ProcessPublic

func (m Msg) ProcessPublic(raw []interface{}, pld interface{}, chID int64, inf event.Info) (interface{}, error)

Jump to

Keyboard shortcuts

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