event

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: BSD-3-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessage

func GetMessage(call func(ev *Message))

Types

type Id

type Id uint16

type Message

type Message struct {
	ID   Id              `json:"e"`
	Data json.RawMessage `json:"d"`
	Err  *string         `json:"err,omitempty"`
}

func (*Message) Body

func (v *Message) Body(b []byte)

func (*Message) Decode

func (v *Message) Decode(in interface{}) error

func (*Message) Encode

func (v *Message) Encode(in interface{})

func (*Message) EncodeEvent

func (v *Message) EncodeEvent(id Id, in interface{})

func (*Message) Error

func (v *Message) Error(e error)

func (*Message) EventID

func (v *Message) EventID() Id

func (Message) MarshalEasyJSON

func (v Message) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Message) MarshalJSON

func (v Message) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Message) Reset

func (v *Message) Reset() *Message

func (*Message) UnmarshalEasyJSON

func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Message) UnmarshalJSON

func (v *Message) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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