message

package
v1.0.51 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: MulanPSL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Unmarshal

func Unmarshal(msgType MessageType, b []byte, v any) error

Types

type CustomMessage added in v1.0.45

type CustomMessage interface {
	Decode(b []byte) error

	Encode() ([]byte, error)
}

func Json

func Json(v any) CustomMessage

type MessageType added in v1.0.45

type MessageType uint32
const (
	MessageTypePB     MessageType = 0 // ProtoBuffer
	MessageTypeJson   MessageType = 1 // Json
	MessageTypeCustom MessageType = 2 // Custom
)

Jump to

Keyboard shortcuts

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