rust

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GeneratedFieldPrivacyPrivate = "private"
	GeneratedFieldPrivacyPublic  = "public"
	GeneratedFieldPrivacyCrate   = "crate"
)

Variables

This section is empty.

Functions

func FileName

func FileName(name string) string

Types

type Dependencies

type Dependencies struct {
	Enums bool
	Maps  bool
}

func DependencyAnalysis

func DependencyAnalysis(file *protogen.File) *Dependencies

type File

type File interface {
	P(v ...interface{})
}

type GeneratedFieldPrivacy

type GeneratedFieldPrivacy string

type Generator

type Generator struct {
	CustomFields func() string
	CustomEncode func() string
	CustomDecode func() string
	// contains filtered or unexported fields
}

func New

func New() *Generator

func (*Generator) ExecuteTemplate

func (g *Generator) ExecuteTemplate(
	genFile *protogen.GeneratedFile,
	protoFile *protogen.File,
	packageName string,
	header bool,
) error

func (*Generator) Generate

func (*Generator) MarshalResponse

func (*Generator) MarshalResponse(res *pluginpb.CodeGeneratorResponse) ([]byte, error)

func (*Generator) UnmarshalRequest

func (*Generator) UnmarshalRequest(buf []byte) (*pluginpb.CodeGeneratorRequest, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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