Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DemoWebServer ¶
func DemoWebServer()
func RegisterRouter ¶
func RegisterRouter() *[]WebHandler
Types ¶
type HttpMethod ¶
type HttpMethod string
type IchubWebServer ¶
type IchubWebServer struct { //服务名称 ServerName string Port int // etcd注册服务器地址 xxx.xxx.xxx.xxx:xx Etcdhost string Registry registry.Registry MetaData *map[string]string }
@Title 文件名称: ichub_webserver.go @Description 描述: WEB服务端通用启动与注册
@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)
func New ¶
func New(serverDto *baseconfig.WebServerDto) *IchubWebServer
func (*IchubWebServer) StartWeb ¶
func (webserver *IchubWebServer) StartWeb(handler func() *[]WebHandler) web.Service
type WebHandler ¶
type WebHandler struct { Method HttpMethod RelativePath string Handler gin.HandlerFunc }
type WebRouters ¶
type WebRouters struct { WebHandlers *[]WebHandler FuncRegister func() *[]WebHandler }
@Title 文件名称: web_routers.go @Description 描述: 规则引擎路由服务
@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)
func (*WebRouters) AddRouter ¶
func (handlers *WebRouters) AddRouter(router *gin.Engine)
MethodGet = "GET" MethodHead = "HEAD" MethodPost = "POST" MethodPut = "PUT" MethodPatch = "PATCH" // RFC 5789 MethodDelete = "DELETE"
func (*WebRouters) BuildRouter ¶
func (web *WebRouters) BuildRouter() *gin.Engine
func (*WebRouters) NewRouter ¶
func (handlers *WebRouters) NewRouter() *gin.Engine
Click to show internal directories.
Click to hide internal directories.