Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAccess(ctx *gin.Context, level []kubeModel.AccessLevel)
- func DeleteAccess(ctx *gin.Context)
- func GetHeader(ctx *gin.Context, header string) string
- func IsAdmin(ctx *gin.Context)
- func ReadAccess(ctx *gin.Context)
- func RegisterServices(svc *server.SolutionsService) gin.HandlerFunc
- func RequiredUserHeaders() gin.HandlerFunc
- func WriteAccess(ctx *gin.Context)
Constants ¶
View Source
const ( RoleUser = "user" RoleAdmin = "admin" )
View Source
const ( UserNamespaces = "user-namespaces" UserRole = "user-role" UserID = "user-id" //SolutionsServices is key for services SolutionsServices = "s-service" )
Variables ¶
View Source
var (
ErrInvalidUserRole = errors.New("invalid user role")
)
Functions ¶
func CheckAccess ¶
func CheckAccess(ctx *gin.Context, level []kubeModel.AccessLevel)
func DeleteAccess ¶
func ReadAccess ¶
func RegisterServices ¶
func RegisterServices(svc *server.SolutionsService) gin.HandlerFunc
RegisterServices adds services to context
func RequiredUserHeaders ¶
func RequiredUserHeaders() gin.HandlerFunc
func WriteAccess ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.