Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultReadTimeout = 5 * time.Second DefaultWriteTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GinRequestZeroLogger ¶
func GinRequestZeroLogger(logger *zerolog.Logger) gin.HandlerFunc
Types ¶
type Option ¶
type Option func(*Server)
func WithHandlers ¶
func WithHealthCheck ¶
func WithHealthCheck() Option
func WithOpenTracing ¶
func WithZeroLogger ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewGinServer ¶
NewGinServer creates a new GinServer with default healthcheck route and middlewares.
func (*Server) Handle ¶
func (s *Server) Handle(method, path string, handler gin.HandlerFunc)
Handle adds a new route to the GinServer.
func (*Server) Use ¶
func (s *Server) Use(middleware gin.HandlerFunc)
AddMiddleware adds a new middleware to the GinServer.
Click to show internal directories.
Click to hide internal directories.