Documentation ¶
Index ¶
- Constants
- func MessageToJson(v proto.Message, pretty ...bool) string
- func NewDiskSourceTree(dir string, filter func(filename string) bool) (map[string][]byte, error)
- func NewProtobufDiskSourceTree(dir string) (map[string][]byte, error)
- func ParsePBFileDesc(file []byte, ops ...OptionFunc) (*descriptor.FileDescriptorProto, error)
- func ParsePBMultiFileDesc(idl *IDLConfig, ops ...OptionFunc) (*descriptor.FileDescriptorSet, error)
- func UnsafeBytes(str string) []byte
- func UnsafeString(bytes []byte) string
- type ErrorMessage
- type ErrorMessages
- type IDLConfig
- type MessageType
- type Option
- type OptionFunc
Constants ¶
View Source
const ( MessageType_PB = iota MessageType_JSON )
Variables ¶
This section is empty.
Functions ¶
func NewDiskSourceTree ¶ added in v1.0.2
func NewProtobufDiskSourceTree ¶ added in v1.0.2
func ParsePBFileDesc ¶
func ParsePBFileDesc(file []byte, ops ...OptionFunc) (*descriptor.FileDescriptorProto, error)
func ParsePBMultiFileDesc ¶ added in v1.0.2
func ParsePBMultiFileDesc(idl *IDLConfig, ops ...OptionFunc) (*descriptor.FileDescriptorSet, error)
func UnsafeBytes ¶
func UnsafeString ¶ added in v1.0.2
Types ¶
type ErrorMessages ¶
type ErrorMessages []*ErrorMessage
func (ErrorMessages) Error ¶
func (e ErrorMessages) Error() string
type MessageType ¶
type MessageType int
type Option ¶
type Option struct { MessageType MessageType RequireSyntaxIdentifier bool WithSourceCodeInfo bool WithJsonTag bool WithGoogleProtobuf bool }
func LoadOptions ¶ added in v1.0.2
func LoadOptions(ops ...OptionFunc) *Option
type OptionFunc ¶
type OptionFunc func(*Option)
func WithGoogleProtobuf ¶ added in v1.0.2
func WithGoogleProtobuf() OptionFunc
func WithJsonTag ¶ added in v1.0.2
func WithJsonTag() OptionFunc
func WithMessageType ¶
func WithMessageType(t MessageType) OptionFunc
func WithRequireSyntaxIdentifier ¶
func WithRequireSyntaxIdentifier() OptionFunc
func WithSourceCodeInfo ¶ added in v1.0.2
func WithSourceCodeInfo() OptionFunc
Directories ¶
Path | Synopsis |
---|---|
deps
|
|
darwin_x86_64
Package darwin_x86_64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package darwin_x86_64 is required to provide support for vendoring modules DO NOT REMOVE |
linux_x86_64
Package linux_x86_64 is required to provide support for vendoring modules DO NOT REMOVE
|
Package linux_x86_64 is required to provide support for vendoring modules DO NOT REMOVE |
internal
|
|
Click to show internal directories.
Click to hide internal directories.