Predefined sets of privileges.
ByValue is just an array of privilege kinds sorted by value.
Kind defines a privilege. This is output by the parser, and used to generate the privilege bitfields in the PrivilegeDescriptor.
const ( ALL Kind CREATE DROP GRANT SELECT INSERT DELETE UPDATE )
List of privileges. ALL is specifically encoded so that it will automatically pick up new privileges.
Mask returns the bitmask for a given privilege.
List is a list of privileges.
ListFromBitField takes a bitfield of privileges and returns a list. It is ordered in increasing value of privilege.Kind.
Format prints out the list in a buffer. This keeps the existing order and uses ", " as separator.
Len, Swap, and Less implement the Sort interface.
SortedString is similar to String() but returns privileges sorted by name and uses "," as separator.
String implements the Stringer interface. This keeps the existing order and uses ", " as separator.
ToBitField returns the bitfield representation of a list of privileges.