Documentation ¶
Index ¶
- func ExprStringP(expr ast.Expr) string
- func GenConfig(dir string)
- func GenDb(dir string)
- func GenDoc(dir string, ic astutils.InterfaceCollector, routePatternStrategy int)
- func GenGoClient(dir string, ic astutils.InterfaceCollector, env string, ...)
- func GenGoClientProxy(dir string, ic astutils.InterfaceCollector)
- func GenHttpHandler(dir string, ic astutils.InterfaceCollector, routePatternStrategy int)
- func GenHttpHandlerImpl(dir string, ic astutils.InterfaceCollector)
- func GenHttpHandlerImplWithImpl(dir string, ic astutils.InterfaceCollector, omitempty bool, ...)
- func GenHttpMiddleware(dir string)
- func GenK8sDeployment(dir string, svcname, image string)
- func GenK8sStatefulset(dir string, svcname, image string)
- func GenMain(dir string, ic astutils.InterfaceCollector)
- func GenSvcImpl(dir string, ic astutils.InterfaceCollector)
- func InitProj(dir string, modName string)
- func InitSvc(dir string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExprStringP ¶ added in v0.2.6
ExprStringP Support all built-in type referenced from https://golang.org/pkg/builtin/ Support map with string key Support structs of vo 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 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, routePatternStrategy int)
GenDoc generates OpenAPI 3.0 description json file. Not support alias type in vo file.
func GenGoClient ¶
func GenGoClient(dir string, ic astutils.InterfaceCollector, env string, routePatternStrategy int)
GenGoClient generates golang http client code from result of parsing svc.go file in project root path
func GenGoClientProxy ¶ added in v0.9.1
func GenGoClientProxy(dir string, ic astutils.InterfaceCollector)
GenGoClientProxy wraps client with resiliency features
func GenHttpHandler ¶
func GenHttpHandler(dir string, ic astutils.InterfaceCollector, routePatternStrategy int)
GenHttpHandler generates http handler interface and routes
func GenHttpHandlerImpl ¶
func GenHttpHandlerImpl(dir string, ic astutils.InterfaceCollector)
GenHttpHandlerImpl generates http handler implementations
func GenHttpHandlerImplWithImpl ¶
func GenHttpHandlerImplWithImpl(dir string, ic astutils.InterfaceCollector, omitempty bool, caseconvertor func(string) string)
GenHttpHandlerImplWithImpl generates http handler implementation Parsed value from query string parameters or application/x-www-form-urlencoded form will be string type. You may need to convert the type by yourself.
func GenHttpMiddleware ¶
func GenHttpMiddleware(dir string)
GenHttpMiddleware generates http middleware file
func GenK8sDeployment ¶ added in v0.5.7
GenK8sDeployment generates deployment kind yaml file for kubernetes deploy.
func GenK8sStatefulset ¶ added in v0.5.7
GenK8sStatefulset generates statefulset kind yaml file for kubernetes deploy
func GenMain ¶
func GenMain(dir string, ic astutils.InterfaceCollector)
GenMain generates main function
func GenSvcImpl ¶
func GenSvcImpl(dir string, ic astutils.InterfaceCollector)
GenSvcImpl generates service implementation
Types ¶
This section is empty.