Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSet ¶
func NewSet() map[string]Permission
func Object ¶ added in v0.19.1149
func Object(orgID string, kind ResourceKind, id string) string
Object is the grant key for a resource-scoped permission: "<orgID>:<kind>/<id>". Exactly two levels, so the parent fallback lands on the org.
func StackObject ¶ added in v0.19.1149
StackObject keeps the key shape already minted into stack role rows.
Types ¶
type NoAccessError ¶
type NoAccessError struct {
Permission Permission
ObjectID string
}
func (NoAccessError) Error ¶
func (n NoAccessError) Error() string
type Permission ¶
type Permission string
const ( PermissionUnknown Permission = "unknown" PermissionAll Permission = "all" PermissionCreate Permission = "create" PermissionRead Permission = "read" PermissionUpdate Permission = "update" PermissionDelete Permission = "delete" )
func FromRequest ¶
func FromRequest(ctx *gin.Context) Permission
func NewPermission ¶
func NewPermission(val string) (Permission, error)
func (Permission) ToStrPtr ¶
func (p Permission) ToStrPtr() *string
type ResourceKind ¶ added in v0.19.1149
type ResourceKind string
const ( KindApp ResourceKind = "app" KindInstall ResourceKind = "install" KindStack ResourceKind = "stack" )
Click to show internal directories.
Click to hide internal directories.