amf0

package
v0.0.0-...-288c2a5 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

The oryx amf0 package support AMF0 codec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNull

func NewNull() *null

Types

type Amf0

type Amf0 interface {
	// Binary marshaler and unmarshaler.
	encoding.BinaryUnmarshaler
	encoding.BinaryMarshaler
	// Get the size of bytes to marshal this object.
	Size() int
	// contains filtered or unexported methods
}

All AMF0 things.

func Discovery

func Discovery(p []byte) (a Amf0, err error)

Discovery the amf0 object from the bytes b.

func NewBoolean

func NewBoolean(b bool) Amf0

func NewUndefined

func NewUndefined() Amf0

type Boolean

type Boolean bool

The AMF0 boolean, please read @doc amf0_spec_121207.pdf, @page 5, @section 2.3 Boolean Type

func (*Boolean) MarshalBinary

func (v *Boolean) MarshalBinary() (data []byte, err error)

func (*Boolean) Size

func (v *Boolean) Size() int

func (*Boolean) UnmarshalBinary

func (v *Boolean) UnmarshalBinary(data []byte) (err error)

type EcmaArray

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

The AMF0 ecma array, please read @doc amf0_spec_121207.pdf, @page 6, @section 2.10 ECMA Array Type

func NewEcmaArray

func NewEcmaArray() *EcmaArray

func (*EcmaArray) Get

func (v *EcmaArray) Get(key string) Amf0

func (*EcmaArray) MarshalBinary

func (v *EcmaArray) MarshalBinary() (data []byte, err error)

func (*EcmaArray) Set

func (v *EcmaArray) Set(key string, value Amf0) *objectBase

func (*EcmaArray) Size

func (v *EcmaArray) Size() int

func (*EcmaArray) UnmarshalBinary

func (v *EcmaArray) UnmarshalBinary(data []byte) (err error)

type Number

type Number float64

The number object, please read @doc amf0_spec_121207.pdf, @page 5, @section 2.2 Number Type

func NewNumber

func NewNumber(f float64) *Number

func (*Number) MarshalBinary

func (v *Number) MarshalBinary() (data []byte, err error)

func (*Number) Size

func (v *Number) Size() int

func (*Number) UnmarshalBinary

func (v *Number) UnmarshalBinary(data []byte) (err error)

type Object

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

The AMF0 object, please read @doc amf0_spec_121207.pdf, @page 5, @section 2.5 Object Type

func NewObject

func NewObject() *Object

func (*Object) Get

func (v *Object) Get(key string) Amf0

func (*Object) MarshalBinary

func (v *Object) MarshalBinary() (data []byte, err error)

func (*Object) Set

func (v *Object) Set(key string, value Amf0) *objectBase

func (*Object) Size

func (v *Object) Size() int

func (*Object) UnmarshalBinary

func (v *Object) UnmarshalBinary(data []byte) (err error)

type StrictArray

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

The AMF0 strict array, please read @doc amf0_spec_121207.pdf, @page 7, @section 2.12 Strict Array Type

func NewStrictArray

func NewStrictArray() *StrictArray

func (*StrictArray) Get

func (v *StrictArray) Get(key string) Amf0

func (*StrictArray) MarshalBinary

func (v *StrictArray) MarshalBinary() (data []byte, err error)

func (*StrictArray) Set

func (v *StrictArray) Set(key string, value Amf0) *objectBase

func (*StrictArray) Size

func (v *StrictArray) Size() int

func (*StrictArray) UnmarshalBinary

func (v *StrictArray) UnmarshalBinary(data []byte) (err error)

type String

type String string

The string objet, please read @doc amf0_spec_121207.pdf, @page 5, @section 2.4 String Type

func NewString

func NewString(s string) *String

func (*String) MarshalBinary

func (v *String) MarshalBinary() (data []byte, err error)

func (*String) Size

func (v *String) Size() int

func (*String) UnmarshalBinary

func (v *String) UnmarshalBinary(data []byte) (err error)

Jump to

Keyboard shortcuts

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