internal

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldOptions

type FieldOptions struct {
	IsRequired bool
}

type FieldOptionsFunc

type FieldOptionsFunc = func(MessageOptions, *desc.FieldDescriptor) FieldOptions

type Generator

type Generator struct {
	*bytes.Buffer

	Request  *plugin.CodeGeneratorRequest
	Response *plugin.CodeGeneratorResponse
	// contains filtered or unexported fields
}

func New

func New() *Generator

Create a new Generator

func (*Generator) GenerateAllFiles

func (g *Generator) GenerateAllFiles(params *Parameters)

func (*Generator) W

func (g *Generator) W(s string)

W is an alias for WriteLine

func (*Generator) WriteLine

func (g *Generator) WriteLine(s string)

WriteLine is used to add one line into the buffer

type MessageOptions

type MessageOptions struct {
	DefaultFieldOptions *FieldOptions
}

type MessageOptionsFunc

type MessageOptionsFunc = func(*desc.MessageDescriptor) MessageOptions

type OutputNameContext

type OutputNameContext struct {
	Dir        string
	BaseName   string
	Descriptor *desc.FileDescriptor
	Request    *plugin.CodeGeneratorRequest
}

type Parameters

type Parameters struct {
	AsyncIterators        bool
	OutputNamePattern     string
	DumpRequestDescriptor bool
	EnumsAsInt            bool
	OriginalNames         bool
	Verbose               int
	Int64AsString         bool

	MessageOptionsFunc MessageOptionsFunc
	FieldOptionsFunc   FieldOptionsFunc
}

Jump to

Keyboard shortcuts

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