Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
func Deserialize(m ProtoMessage, rawBytes []byte) (o *js.Object, err error)
Deserialize unmarshals the provided ProtoMessage bytes into a generic *js.Object of the provided type, returning an error if one was thrown.
func Serialize ¶
func Serialize(m ProtoMessage) (resp []byte, err error)
Serialize marshals the provided ProtoMessage into a slice of bytes using the serializeBinary ProtobufJS function, returning an error if one was thrown.
Types ¶
type ProtoMessage ¶
ProtoMessage is implemented by... all *js.Objects. But it'll do for an interface to Serialize and Deserialize
Click to show internal directories.
Click to hide internal directories.