Documentation ¶
Index ¶
- type JwtInfo
- type Server
- type ServerOption
- func WithEnableProfiling(profiling bool) ServerOption
- func WithHealthz(healthz bool) ServerOption
- func WithJwt(jwt *JwtInfo) ServerOption
- func WithMetrics(metrics bool) ServerOption
- func WithMiddlewares(middlewares []string) ServerOption
- func WithMode(mode string) ServerOption
- func WithPort(port int) ServerOption
- func WithServiceName(srvName string) ServerOption
- func WithTransName(transName string) ServerOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
wrapper for gin.Engine
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) ServerName ¶
func (*Server) Translator ¶
func (s *Server) Translator() ut.Translator
type ServerOption ¶
type ServerOption func(*Server)
func WithEnableProfiling ¶
func WithEnableProfiling(profiling bool) ServerOption
func WithHealthz ¶
func WithHealthz(healthz bool) ServerOption
func WithJwt ¶
func WithJwt(jwt *JwtInfo) ServerOption
func WithMetrics ¶
func WithMetrics(metrics bool) ServerOption
func WithMiddlewares ¶
func WithMiddlewares(middlewares []string) ServerOption
func WithMode ¶
func WithMode(mode string) ServerOption
func WithPort ¶
func WithPort(port int) ServerOption
func WithServiceName ¶
func WithServiceName(srvName string) ServerOption
func WithTransName ¶
func WithTransName(transName string) ServerOption
Click to show internal directories.
Click to hide internal directories.