Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL struct {
Privileges Privileges
GrantOptions Privileges
Role string
GrantedBy string
}
ACL represents a single PostgreSQL `aclitem` entry.
func (ACL) GetGrantOption ¶
func (a ACL) GetGrantOption(priv Privileges) bool
GetGrantOption returns true if the acl has the grant option set for the specified priviledge.
func (ACL) GetPrivilege ¶
func (a ACL) GetPrivilege(priv Privileges) bool
GetPriviledge returns true if the acl has the specified priviledge set.
type Privileges ¶
type Privileges uint16
Privileges represents a PostgreSQL ACL bitmask
const ( NoPrivs Privileges = 0 // Ordering taken from postgresql/src/include/nodes/parsenodes.h Insert Privileges = 1 << iota Select Update Delete Truncate References Trigger Execute Usage Create Temporary Connect Set System Maintain )
See postgresql/src/include/utils/acl.h for inspiration. Like PostgreSQL, "rights" refer to the combined grant option and privilege bits fields.
Click to show internal directories.
Click to hide internal directories.