Documentation ¶
Overview ¶
prometheus中间件
Index ¶
- func AdminAuthorizator(data interface{}, c *gin.Context) bool
- func AllUserAuthorizator(data interface{}, c *gin.Context) bool
- func Cors() gin.HandlerFunc
- func CreateServiceDiscovery(regAddr, basePath string) (client.ServiceDiscovery, error)
- func NewGinJwtMiddlewares(jwta JwtAuthorizator) *jwt.GinJWTMiddleware
- func NoRouteHandler(c *gin.Context)
- func Register404Middleware(router *gin.Engine)
- func RegisterPrometheusMiddleware(router *gin.Engine, isauth bool)
- func RegisterSwaggerMiddleware(router *gin.Engine)
- func TestAuthorizator(data interface{}, c *gin.Context) bool
- type IdentityKey
- type JwtAuthorizator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdminAuthorizator ¶
role is admin can access
func AllUserAuthorizator ¶
func CreateServiceDiscovery ¶
func CreateServiceDiscovery(regAddr, basePath string) (client.ServiceDiscovery, error)
func NewGinJwtMiddlewares ¶
func NewGinJwtMiddlewares(jwta JwtAuthorizator) *jwt.GinJWTMiddleware
根据不同接口的权限规则生成不同权限的jwt中间件
func Register404Middleware ¶
func TestAuthorizator ¶
username is test can access
Types ¶
type IdentityKey ¶
type IdentityKey string
Click to show internal directories.
Click to hide internal directories.