msg

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 22 Imported by: 0

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