Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PermissionSystem ¶
type PermissionSystem struct { Nodes []*PermissionNode Tree permissionTree }
PermissionSystem manages all permission checking and storage
func BuildPermissionSystem ¶
func BuildPermissionSystem(permissionFile string) PermissionSystem
BuildPermissionSystem returns a to a loaded PermissionSystem based on the given file
func (*PermissionSystem) AddPermissionNode ¶
func (pm *PermissionSystem) AddPermissionNode(nodeIdentifier string)
AddPermissionNode creates a new PermissionNode{} with the given identifier and appends it to the list of Nodes in this PermissionSystem
func (*PermissionSystem) AddReferences ¶
func (pm *PermissionSystem) AddReferences()
AddReferences loops over all sets and groups in the PermissionSystem, correctly populating any lists of associations based on the raw* field
func (*PermissionSystem) UserHasPermissionNode ¶
func (pm *PermissionSystem) UserHasPermissionNode(member *discordgo.Member, nodeIdentifer string) bool
UserHasPermissionNode will return whether or not the given Member has the given nodeIdentifier or not
Click to show internal directories.
Click to hide internal directories.