Documentation
¶
Index ¶
- type JWTOptions
- type JwtInfo
- type Server
- type ServerMethod
- type ServerOptions
- func WithEnableMetrics(enableMetrics bool) ServerOptions
- func WithEnableProfiling(enableProfiling bool) ServerOptions
- func WithEnableTracing(enableTracing bool) ServerOptions
- func WithHealthz(healthz bool) ServerOptions
- func WithJwt(jwt *JwtInfo) ServerOptions
- func WithMiddleware(middlewares ...gin.HandlerFunc) ServerOptions
- func WithMode(mode string) ServerOptions
- func WithName(name string) ServerOptions
- func WithPort(port int) ServerOptions
- func WithTrans(trans string) ServerOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTOptions ¶
type JWTOptions func(*JwtInfo)
func WithKey ¶
func WithKey(key string) JWTOptions
func WithMaxRefresh ¶
func WithMaxRefresh(maxRefresh time.Duration) JWTOptions
func WithRealm ¶
func WithRealm(realm string) JWTOptions
func WithTimeout ¶
func WithTimeout(timeout time.Duration) JWTOptions
type JwtInfo ¶
type JwtInfo struct {
// default is "JWT"
Realm string
// default is empty
Key string
// default is 5 minutes
Timeout time.Duration
// default is 10 minutes
MaxRefresh time.Duration
}
func NewJwtInfo ¶
func NewJwtInfo(opts ...JWTOptions) *JwtInfo
type ServerMethod ¶
type ServerOptions ¶
type ServerOptions func(*serverOptions)
func WithEnableMetrics ¶
func WithEnableMetrics(enableMetrics bool) ServerOptions
func WithEnableProfiling ¶
func WithEnableProfiling(enableProfiling bool) ServerOptions
func WithEnableTracing ¶
func WithEnableTracing(enableTracing bool) ServerOptions
func WithHealthz ¶
func WithHealthz(healthz bool) ServerOptions
func WithJwt ¶
func WithJwt(jwt *JwtInfo) ServerOptions
func WithMiddleware ¶
func WithMiddleware(middlewares ...gin.HandlerFunc) ServerOptions
func WithMode ¶
func WithMode(mode string) ServerOptions
func WithName ¶
func WithName(name string) ServerOptions
func WithPort ¶
func WithPort(port int) ServerOptions
func WithTrans ¶
func WithTrans(trans string) ServerOptions
Click to show internal directories.
Click to hide internal directories.