amf0

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Overview

Package amf0 contains an AMF0 decoder and encoder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data added in v1.11.0

type Data []interface{}

Data is a list of ActionScript object graphs.

func Unmarshal

func Unmarshal(buf []byte) (Data, error)

Unmarshal decodes AMF0 data.

func (Data) Marshal added in v1.11.0

func (data Data) Marshal() ([]byte, error)

Marshal encodes AMF0 data.

func (Data) MarshalSize added in v1.11.0

func (data Data) MarshalSize() (int, error)

MarshalSize returns the size needed to encode data in AMF0.

func (Data) MarshalTo added in v1.11.0

func (data Data) MarshalTo(buf []byte) (int, error)

MarshalTo encodes AMF0 data into an existing buffer.

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