Documentation ¶
Index ¶
Constants ¶
View Source
const (
// PathPatternKey HTTP path pattern key
PathPatternKey = "pattern"
)
Variables ¶
This section is empty.
Functions ¶
func AddMiddleWares ¶
func AddMiddleWares(e *gin.Engine, middlewares ...gin.HandlerFunc)
func DefaultEngine ¶
Types ¶
type Router ¶
type Router interface { gin.IRouter RegisterServiceHandler(handler ServiceHandler) }
Router http router
type Server ¶
Server http server
func DefaultServer ¶
func DefaultServer(opts ...ServerOption) *Server
DefaultServer 默认的http server入口
func (*Server) GetListener ¶
GetListener get servers listener
func (*Server) RegisterServiceHandler ¶
func (s *Server) RegisterServiceHandler(handler ServiceHandler)
RegisterServiceHandler register gRpc-gateway handler
type ServerOption ¶
type ServerOption func(*Server)
ServerOption options for http server
func GRpcServerAddress ¶
func GRpcServerAddress(address string) ServerOption
GRpcServerAddress gRpc server address for gRpc-Gateway
type ServiceHandler ¶
ServiceHandler gRpc-Gateway handler
Click to show internal directories.
Click to hide internal directories.