protobufjs

package module
v0.0.0-...-ab8931a Latest Latest
Warning

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

Go to latest
Published: May 29, 2017 License: MIT Imports: 1 Imported by: 6

README

jspb

GopherJS bindings for Google ProtobufJS

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

type ProtoMessage interface {
	Call(string, ...interface{}) *js.Object
}

ProtoMessage is implemented by... all *js.Objects. But it'll do for an interface to Serialize and Deserialize

Jump to

Keyboard shortcuts

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