converter

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PatternIpv6WithMask = "" /* 418-byte string literal not displayed */
	PatternIpv4WithMask = "" /* 134-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	AllFieldsRequired            bool
	AllowNullValues              bool
	DisallowAdditionalProperties bool
	DisallowBigIntsAsStrings     bool
	PrefixSchemaFilesWithPackage bool
	UseJSONFieldnamesOnly        bool
	UseProtoAndJSONFieldnames    bool
	// contains filtered or unexported fields
}

Converter is everything you need to convert protos to JSONSchemas:

func New

func New(logger *logrus.Logger) *Converter

New returns a configured *Converter:

func (*Converter) ConvertFrom

func (c *Converter) ConvertFrom(rd io.Reader) (*pluginpb.CodeGeneratorResponse, error)

ConvertFrom tells the convert to work on the given input:

type ProtoPackage

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

ProtoPackage describes a package of Protobuf, which is an container of message types.

Jump to

Keyboard shortcuts

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