beam: github.com/apache/beam/sdks/go/pkg/beam/core/util/protox Index | Files

package protox

import "github.com/apache/beam/sdks/go/pkg/beam/core/util/protox"

Package protox contains utilities for working with protobufs.

Index

Package Files

any.go base64.go protox.go

func DecodeBase64 Uses

func DecodeBase64(data string, ret proto.Message) error

DecodeBase64 decodes a base64 wrapped proto.

func EncodeBase64 Uses

func EncodeBase64(msg proto.Message) (string, error)

EncodeBase64 encodes a proto wrapped in base64.

func MustEncode Uses

func MustEncode(msg proto.Message) []byte

MustEncode encode the message and panics on failure.

func MustEncodeBase64 Uses

func MustEncodeBase64(msg proto.Message) string

MustEncodeBase64 encodes a proto wrapped in base64 and panics on failure.

func PackBase64Proto Uses

func PackBase64Proto(in proto.Message) (*protobuf.Any, error)

PackBase64Proto encodes a proto message into a base64-encoded BytesValue message.

func PackBytes Uses

func PackBytes(in []byte) (*protobuf.Any, error)

PackBytes applies a BytesValue wrapper to the supplied bytes.

func PackProto Uses

func PackProto(in proto.Message) (*protobuf.Any, error)

PackProto encodes a proto message and wraps into a BytesValue.

func Unpack Uses

func Unpack(data *protobuf.Any, url string, ret proto.Message) error

Unpack decodes a proto.

func UnpackBase64Proto Uses

func UnpackBase64Proto(data *protobuf.Any, ret proto.Message) error

UnpackBase64Proto decodes a BytesValue + base64 wrapped proto.

func UnpackBytes Uses

func UnpackBytes(data *protobuf.Any) ([]byte, error)

UnpackBytes removes the BytesValue wrapper.

func UnpackProto Uses

func UnpackProto(data *protobuf.Any, ret proto.Message) error

UnpackProto decodes a BytesValue wrapped proto.

Package protox imports 5 packages (graph) and is imported by 5 packages. Updated 2019-05-23. Refresh now. Tools for package owners.