Documentation ¶
Overview ¶
Package protomodule defines a Starlark module of Protobuf-related functions.
type_conversions.go provides protomodule-to-starlark and starlark-to-protomodule conversions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsProtoMessage ¶
AsProtoMessage returns a Protobuf message underlying the given Starlark value, which must have been created by NewProtoMessage(). Returns (_, false) if the value is not a valid message.
func NewMessage ¶
NewMessage returns a Starlark value representing the given Protobuf message. It can be returned back to a proto.Message() via AsProtoMessage().
NewMessage copies the input proto.Message and therefore does not modify it
func NewModule ¶
func NewModule(registry *protoregistry.Types) *starlarkstruct.Module
NewModule returns a Starlark module of Protobuf-related functions.
proto = module( clear, clone, decode_any, decode_json, decode_text, encode_any, encode_json, encode_text, merge, set_defaults, )
See `docs/modules.asciidoc` for details on the API of each function.
func NewProtoPackage ¶
func NewProtoPackage( registry *protoregistry.Types, packageName protoreflect.FullName, ) *protoPackage
Types ¶
This section is empty.