converter

package
v0.0.0-...-28a72a9 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	Source      *os.File
	PackageName string
}

func (*Converter) ConvertToYAML

func (c *Converter) ConvertToYAML() (string, error)

ConvertToYAML converts the Source proto file to YAML format and returns it as a string

func (*Converter) GetYAMLComment

func (c *Converter) GetYAMLComment(comment *proto.Comment, indentLvl int) string

GetYAMLComment returns a properly formatted YAML comment for the given proto comment (or an empty string if the comment is nil)

func (Converter) GetYAMLMapField

func (c Converter) GetYAMLMapField(field *proto.MapField) string

GetYAMLMapField returns a YAML formatted field for a given 'normal' field

func (Converter) GetYAMLNormalField

func (c Converter) GetYAMLNormalField(field *proto.NormalField) string

GetYAMLNormalField returns a YAML formatted field for a given 'normal' field

func (*Converter) GetYAMLPreamble

func (c *Converter) GetYAMLPreamble() string

GetYAMLPreamble emits the OpenAPI YAML schema preamble

func (*Converter) GetYAMLTypeFromMessage

func (c *Converter) GetYAMLTypeFromMessage(message *proto.Message) string

GetYAMLTypeFromMessage emits OpenAPI YAML type information for a proto message

Jump to

Keyboard shortcuts

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