Documentation ¶
Overview ¶
Package gin provides some basic implementations for building routers based on gin-gonic/gin
Index ¶
- Constants
- Variables
- func DebugHandler(logger log.Logger) gin.HandlerFunc
- func DefaultFactory(proxyFactory proxy.Factory, logger log.Logger) route.Factory
- func NewEngine(cfg config.ServiceConfig, logger log.Logger, w io.Writer) *gin.Engine
- func NewFactory(cfg Config) route.Factory
- func NewRequest(headersToSend []string) func(*gin.Context, []string) *proxy.Request
- func RegisterRender(name string, r Render)
- type Config
- type HandlerFactory
- type Render
- type RunServerFunc
Constants ¶
View Source
const NEGOTIATE = "negotiate"
View Source
const Namespace = "github.com/starvn/turbo/route/gin"
Variables ¶
View Source
var EndpointHandler = CustomErrorEndpointHandler(log.NoOp, server.DefaultToHTTPError)
Functions ¶
func DebugHandler ¶
func DebugHandler(logger log.Logger) gin.HandlerFunc
func DefaultFactory ¶
func NewFactory ¶
func NewRequest ¶
func RegisterRender ¶
Types ¶
type Config ¶
type Config struct { Engine *gin.Engine Middlewares []gin.HandlerFunc HandlerFactory HandlerFactory ProxyFactory proxy.Factory Logger log.Logger RunServer RunServerFunc }
type HandlerFactory ¶
type HandlerFactory func(*config.EndpointConfig, proxy.Proxy) gin.HandlerFunc
func CustomErrorEndpointHandler ¶
func CustomErrorEndpointHandler(logger log.Logger, errF server.ToHTTPError) HandlerFactory
type RunServerFunc ¶
Click to show internal directories.
Click to hide internal directories.