internal

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

Functions

func GenerateFile

func GenerateFile(gen *protogen.Plugin, file *protogen.File) *protogen.GeneratedFile

GenerateFile generates a .lava.pb.go file containing service definitions.

func GenerateTag

func GenerateTag(gen *protogen.Plugin, file *protogen.File)

func Retag

func Retag(n ast.Node, tags StructTags) error

Retag updates the existing tags with the map passed and modifies existing tags if any of the keys are matched. First key to the tags argument is the name of the struct, the second key corresponds to field names.

Types

type StructTags

type StructTags map[string]map[string]*structtag.Tags

func (StructTags) HandleField

func (t StructTags) HandleField(field *protogen.Field) (string, *structtag.Tags)

func (StructTags) HandleMessage

func (t StructTags) HandleMessage(msg *protogen.Message) (string, map[string]*structtag.Tags)

func (StructTags) HandleOneOf

func (t StructTags) HandleOneOf(one *protogen.Oneof) *structtag.Tags

HandleOneOf TODO 未实现

type Visit

type Visit func(node ast.Node) (w ast.Visitor)

func (Visit) Visit

func (v Visit) Visit(node ast.Node) (w ast.Visitor)

Jump to

Keyboard shortcuts

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