Documentation ¶
Index ¶
- Constants
- func AMF3_ReadByteArray(r Reader) ([]byte, error)
- func AMF3_ReadDouble(r Reader) (num float64, err error)
- func AMF3_ReadInteger(r Reader) (num uint32, err error)
- func AMF3_ReadObjectName(r Reader) (name string, err error)
- func AMF3_ReadString(r Reader) (str string, err error)
- func AMF3_ReadU29(r Reader) (n uint32, err error)
- func AMF3_ReadUTF8(r Reader) (string, error)
- func AMF3_ReadValue(r Reader) (value interface{}, err error)
- func AMF3_WriteBoolean(w Writer, b bool) (n int, err error)
- func AMF3_WriteDouble(w Writer, num float64) (n int, err error)
- func AMF3_WriteNull(w Writer) (n int, err error)
- func AMF3_WriteObject(w Writer, obj Object) (n int, err error)
- func AMF3_WriteObjectEndMarker(w Writer) (n int, err error)
- func AMF3_WriteObjectMarker(w Writer) (n int, err error)
- func AMF3_WriteObjectName(w Writer, name string) (n int, err error)
- func AMF3_WriteString(w Writer, str string) (n int, err error)
- func AMF3_WriteU29(w Writer, n uint32) (num int, err error)
- func AMF3_WriteUTF8(w Writer, str string) (num int, err error)
- func AMF3_WriteUndefined(w Writer) (n int, err error)
- func AMF3_WriteValue(w Writer, value interface{}) (n int, err error)
- func AMF3_readByteArray(r Reader) ([]byte, error)
- func MetaDataReform(p []byte, flag byte) ([]byte, error)
- func ReadBoolean(r Reader) (b bool, err error)
- func ReadDate(r Reader) (t time.Time, err error)
- func ReadDouble(r Reader) (num float64, err error)
- func ReadMarker(r Reader) (mark byte, err error)
- func ReadObjectName(r Reader) (name string, err error)
- func ReadStrictArray(r Reader) (arr []interface{}, err error)
- func ReadString(r Reader) (str string, err error)
- func ReadUTF8(r Reader) (string, error)
- func ReadUTF8Long(r Reader) (string, error)
- func ReadValue(r Reader) (value interface{}, err error)
- func WriteBoolean(w Writer, b bool) (n int, err error)
- func WriteDouble(w Writer, num float64) (n int, err error)
- func WriteEcmaArray(w Writer, arr []interface{}) (n int, err error)
- func WriteMarker(w Writer, mark byte) (n int, err error)
- func WriteNull(w Writer) (n int, err error)
- func WriteObject(w Writer, obj Object) (n int, err error)
- func WriteObjectEndMarker(w Writer) (n int, err error)
- func WriteObjectMarker(w Writer) (n int, err error)
- func WriteObjectName(w Writer, name string) (n int, err error)
- func WriteString(w Writer, str string) (n int, err error)
- func WriteStruct(w Writer, value reflect.Value) (n int, err error)
- func WriteUTF8(w Writer, s string, length uint16) error
- func WriteUTF8Long(w Writer, s string, length uint32) error
- func WriteUndefined(w Writer) (n int, err error)
- func WriteValue(w Writer, value interface{}) (n int, err error)
- type Object
- type Reader
- type Undefined
- type Writer
Constants ¶
const ( AMF0 = uint(0) AMF3 = uint(3) )
const ( AMF0_NUMBER_MARKER = 0x00 AMF0_BOOLEAN_MARKER = 0x01 AMF0_STRING_MARKER = 0x02 AMF0_OBJECT_MARKER = 0x03 AMF0_MOVIECLIP_MARKER = 0x04 AMF0_NULL_MARKER = 0x05 AMF0_UNDEFINED_MARKER = 0x06 AMF0_REFERENCE_MARKER = 0x07 AMF0_ECMA_ARRAY_MARKER = 0x08 AMF0_OBJECT_END_MARKER = 0x09 AMF0_STRICT_ARRAY_MARKER = 0x0a AMF0_DATE_MARKER = 0x0b AMF0_LONG_STRING_MARKER = 0x0c AMF0_UNSUPPORTED_MARKER = 0x0d AMF0_RECORDSET_MARKER = 0x0e AMF0_XML_DOCUMENT_MARKER = 0x0f AMF0_TYPED_OBJECT_MARKER = 0x10 AMF0_ACMPLUS_OBJECT_MARKER = 0x11 )
const ( AMF3_UNDEFINED_MARKER = 0x00 AMF3_NULL_MARKER = 0x01 AMF3_FALSE_MARKER = 0x02 AMF3_TRUE_MARKER = 0x03 AMF3_INTEGER_MARKER = 0x04 AMF3_DOUBLE_MARKER = 0x05 AMF3_STRING_MARKER = 0x06 AMF3_XMLDOC_MARKER = 0x07 AMF3_DATE_MARKER = 0x08 AMF3_ARRAY_MARKER = 0x09 AMF3_OBJECT_MARKER = 0x0a AMF3_XML_MARKER = 0x0b AMF3_BYTEARRAY_MARKER = 0x0c )
const ( ADD = 0x0 DEL = 0x3 )
const ( SetDataFrame string = "@setDataFrame" OnMetaData string = "onMetaData" )
const (
AMF0_MAX_STRING_LEN = 65535
)
Variables ¶
This section is empty.
Functions ¶
func AMF3_ReadByteArray ¶
func AMF3_ReadDouble ¶
func AMF3_ReadInteger ¶
func AMF3_ReadObjectName ¶
func AMF3_ReadString ¶
func AMF3_ReadU29 ¶
----------------------------------------------------------------------- AMF3 Read functions
func AMF3_ReadUTF8 ¶
func AMF3_ReadValue ¶
func AMF3_WriteNull ¶
func AMF3_WriteObject ¶
Object's item order is uncertainty.
func AMF3_WriteObjectMarker ¶
func AMF3_WriteU29 ¶
----------------------------------------------------------------------- AMF3 Write functions
func AMF3_WriteUndefined ¶
func AMF3_WriteValue ¶
func AMF3_readByteArray ¶
func ReadBoolean ¶
func ReadDate ¶
An ActionScript Date is serialized as the number of milliseconds elapsed since the epoch of midnight on 1st Jan 1970 in the UTC time zone. While the design of this type reserves room for time zone offset information, it should not be filled in, nor used, as it is unconventional to change time zones when serializing dates on a network. It is suggested that the time zone be queried independently as needed. time-zone = S16 ; reserved,
; not supported ; should be set
Keng-die: time-zone = int16 * -60 (seconds)
; to 0x0000
date-type = date-marker DOUBLE time-zone
func ReadDouble ¶
func ReadMarker ¶
----------------------------------------------------------------------- AMF0 Read functions
func ReadObjectName ¶
func ReadStrictArray ¶
A strict Array contains only ordinal indices; however, in AMF 0 the indices can be dense or sparse. Undefined entries in the sparse regions between indices are serialized as undefined.
array-count = U32 strict-array-type = array-count *(value-type)
A 32-bit array-count implies a theoretical maximum of 4,294,967,295 array entries.
func ReadString ¶
func ReadUTF8Long ¶
func WriteEcmaArray ¶
func WriteObject ¶
Object's item order is uncertainty.
func WriteObjectEndMarker ¶
func WriteObjectMarker ¶
func WriteUndefined ¶
func WriteValue ¶
Types ¶
type Object ¶
type Object map[string]interface{}
Object Type