Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterRouter ¶
func RegisterRouter() *[]WebHandler
Types ¶
type FuncWebHandlers ¶
type FuncWebHandlers func() *WebHandlers
func Merge ¶
func Merge(one *WebHandlers, other *WebHandlers) FuncWebHandlers
type HttpMethod ¶
type HttpMethod string
type WebHandler ¶
type WebHandler struct { WebGroupPath string FuncId string Method HttpMethod RelativePath string Handler gin.HandlerFunc `json:"-"` }
func NewWebHandler ¶
func NewWebHandler() *WebHandler
func (*WebHandler) Check ¶
func (w *WebHandler) Check() error
type WebHandlers ¶
type WebHandlers []WebHandler
func MergeHandler ¶
func MergeHandler(one *WebHandlers, other *WebHandlers) *WebHandlers
func (*WebHandlers) Check ¶
func (this *WebHandlers) Check() error
type WebRouters ¶
type WebRouters struct { WebHandlers *WebHandlers FuncRegister FuncWebHandlers FuncSwagger FuncSwagger }
func (*WebRouters) AddRouter ¶
func (this *WebRouters) AddRouter(router *gin.Engine)
func (*WebRouters) BuildRouter ¶
func (this *WebRouters) BuildRouter() *gin.Engine
func (*WebRouters) InstallMiddleWare ¶
func (this *WebRouters) InstallMiddleWare(router *gin.Engine) *gin.Engine
func (*WebRouters) NewRouter ¶
func (this *WebRouters) NewRouter() *gin.Engine
https://zhuanlan.zhihu.com/p/549252410 https://blog.csdn.net/csxylrf/article/details/131235489
type WebServer ¶
type WebServer struct { //服务名称 ServerName string Port int // etcd注册服务器地址 xxx.xxx.xxx.xxx:xx EtcdHosts []string Registry registry.Registry MetaData *map[string]string ServerInfo string FuncSwagger FuncSwagger `json:"-"` }
func New ¶
func New(serverDto *baseconfig.WebServerDto) *WebServer
func (*WebServer) StartWebSwagger ¶
func (self *WebServer) StartWebSwagger(swagg FuncSwagger, handler FuncWebHandlers) web.Service
Click to show internal directories.
Click to hide internal directories.