model

package
v0.0.0-...-367dd01 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	// contains filtered or unexported fields
}

Message is the event sent or received from a Channel

func NewMessage

func NewMessage(name string, d []byte) Message

NewMessage creates a new Message

func (*Message) Data

func (e *Message) Data() []byte

Data returns the message data

func (*Message) MarshalJSON

func (e *Message) MarshalJSON() ([]byte, error)

MarshalJSON marshal a model.Message into an byte slice

func (*Message) Name

func (e *Message) Name() string

Name returns the message name

func (*Message) UnmarshalJSON

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

UnmarshalJSON unmarshal byte slice into a model.Message

func (*Message) Write

func (e *Message) Write(w io.Writer)

Jump to

Keyboard shortcuts

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