pbutil

package
v0.639.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownExtension = errors.New("unknown extension")

Functions

func FJSONPB

func FJSONPB(w io.Writer, m protoreflect.ProtoMessage) error

FJSONPB ...

func FJSONPBWithOpt added in v0.630.0

func FJSONPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error

func FTextPB

func FTextPB(w io.Writer, m protoreflect.ProtoMessage) error

FTextPB ...

func FTextPBWithOpt added in v0.630.0

func FTextPBWithOpt(w io.Writer, m protoreflect.ProtoMessage, o OutputOptions) error

func FromPB added in v0.374.0

func FromPB(pbPath string, fs afero.Fs) (*sysl.Module, error)

FromPB unmarshals a Sysl module from an encoded protobuf message file.

func FromPBByteContents added in v0.533.0

func FromPBByteContents(pbPath string, contents []byte) (*sysl.Module, error)

FromPBByteContents unmarshals a Sysl module from an encoded protobuf message.

func FromPBStringContents added in v0.533.0

func FromPBStringContents(pbPath, contents string) (*sysl.Module, error)

FromPBStringContents unmarshals a Sysl module from an encoded protobuf message.

func GeneratePBBinaryMessage added in v0.122.0

func GeneratePBBinaryMessage(w io.Writer, m protoreflect.ProtoMessage) error

GeneratePBBinaryMessage generates binary message to IO writer specified by `w`.

func GeneratePBBinaryMessageFile added in v0.122.0

func GeneratePBBinaryMessageFile(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error

GeneratePBBinaryMessageFile generates binary message to the file specified by `filename`.

func JSONPB

func JSONPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error

JSONPB ...

func JSONPBWithOpt added in v0.630.0

func JSONPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error

func TextPB

func TextPB(m protoreflect.ProtoMessage, filename string, fs afero.Fs) error

TextPB ...

func TextPBWithOpt added in v0.630.0

func TextPBWithOpt(m protoreflect.ProtoMessage, filename string, fs afero.Fs, o OutputOptions) error

Types

type OutputOptions added in v0.630.0

type OutputOptions struct {
	Compact bool
}

Jump to

Keyboard shortcuts

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