Documentation ¶ Index ¶ Variables type Role func RoleFromString(str string) (Role, bool) func (s Role) Implies(requiredRole Role) bool func (s Role) String() string Constants ¶ This section is empty. Variables ¶ View Source var Map = map[string]Role{ "none": None, "guest": Guest, "viewer": Viewer, "editor": Editor, "manager": Manager, "owner": Owner, } Functions ¶ This section is empty. Types ¶ type Role ¶ type Role int64 const ( None Role = iota Guest Viewer Editor Manager Owner ) func RoleFromString ¶ func RoleFromString(str string) (Role, bool) func (Role) Implies ¶ func (s Role) Implies(requiredRole Role) bool Implies returns true if this Role implies the given requiredRole and false otherwise. That is, if a user has this Role and an action requires requiredRole, this method returns true if the user can perform the operation and false if they cannot. func (Role) String ¶ func (s Role) String() string Source Files ¶ View all Source files models.go Click to show internal directories. Click to hide internal directories.