amf

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNumber byte = iota
	TypeBoolean
	TypeString
	TypeObject
	TypeNull      = 5
	TypeEcmaArray = 8
	TypeObjectEnd = 9
)

Variables

View Source
var ErrRead = errors.New("amf: read error")

Functions

func EncodeItems added in v1.8.0

func EncodeItems(items ...any) []byte

Types

type AMF

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

AMF spec: http://download.macromedia.com/pub/labs/amf/amf0_spec_121207.pdf

func NewReader

func NewReader(b []byte) *AMF

func NewWriter

func NewWriter() *AMF

func (*AMF) Bytes

func (a *AMF) Bytes() []byte

func (*AMF) ReadByte

func (a *AMF) ReadByte() (byte, error)

func (*AMF) ReadEcmaArray

func (a *AMF) ReadEcmaArray() (map[string]any, error)

func (*AMF) ReadItem

func (a *AMF) ReadItem() (any, error)

func (*AMF) ReadItems

func (a *AMF) ReadItems() ([]any, error)

func (*AMF) ReadNumber

func (a *AMF) ReadNumber() (float64, error)

func (*AMF) ReadObject

func (a *AMF) ReadObject() (map[string]any, error)

func (*AMF) ReadString

func (a *AMF) ReadString() (string, error)

func (*AMF) WriteBool

func (a *AMF) WriteBool(b bool)

func (*AMF) WriteEcmaArray added in v1.8.0

func (a *AMF) WriteEcmaArray(obj map[string]any)

func (*AMF) WriteNull

func (a *AMF) WriteNull()

func (*AMF) WriteNumber

func (a *AMF) WriteNumber(n float64)

func (*AMF) WriteObject

func (a *AMF) WriteObject(obj map[string]any)

func (*AMF) WriteString

func (a *AMF) WriteString(s string)

Jump to

Keyboard shortcuts

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