Documentation ¶
Overview ¶
Package role represents the role type in the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Admin = newRole("ADMIN") User = newRole("USER") )
The set of roles that can be used.
Functions ¶
func ParseToString ¶
ParseToString takes a collection of user roles and converts them to a slice of string.
Types ¶
type Role ¶
type Role struct {
// contains filtered or unexported fields
}
Role represents a role in the system.
func MustParse ¶
MustParse parses the string value and returns a role if one exists. If an error occurs the function panics.
func (Role) MarshalText ¶
MarshalText provides support for logging and any marshal needs.
Click to show internal directories.
Click to hide internal directories.