Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( IMPLEMENT = []byte(`package http import ( "github.com/gin-gonic/gin" cx "github.com/codingXiang/cxgateway/delivery" ) type {{ .module }}HttpHandler struct { gateway cx.HttpHandler svc {{ .package }}.Service } func New{{ .module }}HttpHandler(gateway cx.HttpHandler, svc {{ .package }}.Service) delivery.HttpHandler { var handler = &{{ .module }}HttpHandler{ gateway: gateway, svc: {{ .package }}.Service, } /* v1 版本的 {{ .module }} API */ v1 := gateway.GetApiRoute().Group("/v1/{{ .package }}") {{ .api.method }} return handler } {{ .implement }} `) API_METHOD = []byte(` v1.{{ .http.method }}("{{ .api.path }}", e.Wrapper(handler.{{ .method }}))`) METHOD = []byte(`func (g *{{ .module }}HttpHandler) {{ .method }}(c *gin.Context) error { panic("implement me") }`) )
View Source
var (
INTERFACE_ABSTRACT_METHOD = []byte(` {{ .method }}(c *gin.Context) error`)
)
Interface
Functions ¶
func GetApiPath ¶
func GetHttpMethodName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.