payload

package
v1.0.0-rc1.0...-c90ccdb Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoding

type Encoding int

Encoding represents the type of encoding of the message payload

const (
	// Binary represents unencoded binary data
	Binary Encoding = iota

	// Utf8 represents UTF8 encoding
	Utf8

	// Utf16 represents UTF16 encoding
	Utf16
)

func (Encoding) String

func (enc Encoding) String() string

String stringifies the encoding type

type Payload

type Payload struct {
	Encoding Encoding
	Data     []byte
}

Payload represents an encoded message payload

func (*Payload) Utf8

func (pld *Payload) Utf8() ([]byte, error)

Utf8 returns a UTF8 representation of the payload data

Jump to

Keyboard shortcuts

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