Documentation ¶
Index ¶
- func Action(action ActionType, objectType ObjectType) string
- func GetRole(k string) (rbac.Role, error)
- func GetRoles(keys []string) (rbac.Roles, error)
- func Resource(service ServiceName, objectType ObjectType) string
- func ResourceWithID(service ServiceName, objectType ObjectType, objectID string) string
- func Setup(conf *config.Config) error
- func SetupRole(r *config.Role) error
- type ActionType
- type ObjectType
- type ServiceName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Action ¶
func Action(action ActionType, objectType ObjectType) string
Action formats an action `<action_type>:<object_type>`
func Resource ¶
func Resource(service ServiceName, objectType ObjectType) string
func ResourceWithID ¶
func ResourceWithID(service ServiceName, objectType ObjectType, objectID string) string
Types ¶
type ActionType ¶
type ActionType string
const ( Read ActionType = "read" Stat ActionType = "stat" Delete ActionType = "delete" Write ActionType = "write" List ActionType = "list" Snapshot ActionType = "snapshot" Search ActionType = "search" GC ActionType = "gc" Destroy ActionType = "destroy" Admin ActionType = "admin" // Catch-all action for admin/advanced feature )
Actions
type ObjectType ¶
type ObjectType string
const ( Blob ObjectType = "blob" KVEntry ObjectType = "kv" FS ObjectType = "fs" Node ObjectType = "node" Namespace ObjectType = "namespace" JSONDocument ObjectType = "json-doc" JSONCollection ObjectType = "json-col" )
Object types
type ServiceName ¶
type ServiceName string
const ( BlobStore ServiceName = "blobstore" KvStore ServiceName = "kvstore" DocStore ServiceName = "docstore" Filetree ServiceName = "filetree" Stash ServiceName = "stash" )
Services
Click to show internal directories.
Click to hide internal directories.