proto2json

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: BSD-2-Clause Imports: 4 Imported by: 0

README

proto2json

proto2json is a CLI tool converting proto files to a JSON file.

Usage:

proto2json -IPATH1 -IPATH2 ... PROTO_FILES

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnumType

type EnumType struct {
	*descriptorpb.EnumDescriptorProto
}

type Field added in v0.0.2

type Field struct {
	*descriptorpb.FieldDescriptorProto
}

func (*Field) IsMessageType added in v0.0.2

func (f *Field) IsMessageType() bool

func (*Field) Repeated added in v0.0.2

func (f *Field) Repeated() bool

type MessageType

type MessageType struct {
	*descriptorpb.DescriptorProto
	File *descriptorpb.FileDescriptorProto
}

func (*MessageType) Fields added in v0.0.2

func (t *MessageType) Fields() []Field

func (*MessageType) GoPackage

func (t *MessageType) GoPackage() string

type TypeSet

type TypeSet struct {
	// contains filtered or unexported fields
}

func LoadTypeSet

func LoadTypeSet(filename string) (*TypeSet, error)

func (*TypeSet) GetEnumType

func (s *TypeSet) GetEnumType(longName string) (*EnumType, bool)

func (*TypeSet) GetMsgType

func (s *TypeSet) GetMsgType(longName string) (*MessageType, bool)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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