amf0

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package amf0 contains an AMF0 marshaler and unmarshaler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Marshal

func Marshal(data []interface{}) ([]byte, error)

Marshal encodes AMF0 data.

func Unmarshal

func Unmarshal(buf []byte) ([]interface{}, error)

Unmarshal decodes AMF0 data.

Types

type ECMAArray

type ECMAArray Object

ECMAArray is an AMF0 ECMA Array.

type Object

type Object []ObjectEntry

Object is an AMF0 object.

func (Object) Get

func (o Object) Get(key string) (interface{}, bool)

Get returns the value corresponding to key.

func (Object) GetFloat64

func (o Object) GetFloat64(key string) (float64, bool)

GetFloat64 returns the value corresponding to key, only if that is a float64.

func (Object) GetString

func (o Object) GetString(key string) (string, bool)

GetString returns the value corresponding to key, only if that is a string.

type ObjectEntry

type ObjectEntry struct {
	Key   string
	Value interface{}
}

ObjectEntry is an entry of Object.

type StrictArray added in v1.7.0

type StrictArray []interface{}

StrictArray is an AMF0 Strict Array.

Jump to

Keyboard shortcuts

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