Documentation ¶
Index ¶
- func GetTokenScopeDomain(c *gin.Context) *v1.Project
- func GetTokenScopeProject(c *gin.Context) *v1.Project
- func GetTokenSubjectUser(c *gin.Context) *v1.User
- func RequiredTokenScopeDomain(c *gin.Context) *v1.Project
- func RequiredTokenScopeProject(c *gin.Context) *v1.Project
- func RequiredTokenSubjectUser(c *gin.Context) *v1.User
- type MicroVersion
- type MicroVersionErrorInfo
- type MicroVersionErrorRes
- type Middleware
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MicroVersion ¶
func GetMicroVersion ¶
func GetMicroVersion(c *gin.Context) *MicroVersion
func ParseMicroVersion ¶
func ParseMicroVersion(ver string) *MicroVersion
func (*MicroVersion) InRange ¶
func (ver *MicroVersion) InRange(min, max *MicroVersion) bool
func (*MicroVersion) String ¶
func (ver *MicroVersion) String() string
type MicroVersionErrorInfo ¶
type MicroVersionErrorInfo struct { RequestID string `json:"request_id"` Code string `json:"code"` Status uint `json:"status"` Title string `json:"title"` Detail string `json:"detail"` MaxVersion string `json:"max_version"` MinVersion string `json:"min_version"` Links []rest.LinkInfo `json:"links"` }
type MicroVersionErrorRes ¶
type MicroVersionErrorRes struct {
Errors []MicroVersionErrorInfo `json:"errors"`
}
type Middleware ¶
type Middleware interface {
Handler() gin.HandlerFunc
}
func NewMicroVersionHandler ¶
func NewMicroVersionHandler(service, serviceheader string, min, max *MicroVersion) Middleware
func NewTokenHandler ¶
func NewTokenHandler(tokenManager auth.TokenManager, client identity.Interface) Middleware
func NewTokenHandlerAllowAnon ¶
func NewTokenHandlerAllowAnon(tokenManager auth.TokenManager, client identity.Interface) Middleware
Click to show internal directories.
Click to hide internal directories.