parser

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiPattern

func ApiPattern(method string) string

ApiPattern GetShelves_ShelfBooks_Book shelves/:shelf/books/:book

func ExprStringP

func ExprStringP(expr ast.Expr) string

ExprStringP Support all built-in type referenced from https://golang.org/pkg/builtin/ Support map with string key Support structs of vo and dto package Support slice of types mentioned above Not support alias type (all alias type fields of a struct will be outputted as v3.Any in openapi 3.0 json document) Support anonymous struct type as struct field type in vo and dto package or as parameter type in method signature in svc.go file besides context.Context, multipart.FileHeader, v3.FileModel, os.File when go-doudou command line flag doc is true

func GenDoc

func GenDoc(dir string, ic astutils.InterfaceCollector, config GenDocConfig)

GenDoc generates OpenAPI 3.0 description json file. Not support alias type in vo or dto file.

func NoSplitPattern

func NoSplitPattern(method string) string

func ParseDto

func ParseDto(dir string, dtoDir string)

func ParseDtoGrpc

func ParseDtoGrpc(dir string, p protov3.ProtoGenerator, dtoDir string)

Types

type GenDocConfig

type GenDocConfig struct {
	RoutePatternStrategy int
	AllowGetWithReqBody  bool
}

Jump to

Keyboard shortcuts

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