Documentation ¶
Index ¶
- Constants
- func GetGameModeString(mode GameMode) string
- func GetShorthandGameModeString(mode GameMode) string
- func HasPrivilege(privilegesCombo Privileges, privilege Privileges) bool
- func HasUserGroup(groupsCombo UserGroups, group UserGroups) bool
- type GameMode
- type Privileges
- type RankedStatus
- type UserGroups
Constants ¶
View Source
const ( None GameMode = iota GameModeKeys4 GameModeKeys7 // GameModeKeys1 New game modes so they start counting from 3 GameModeKeys1 = 3 GameModeKeys2 = iota GameModeKeys3 GameModeKeys5 GameModeKeys6 GameModeKeys8 GameModeKeys9 GameModeKeys10 GameModeEnumMaxValue )
View Source
const ( RankedStatusNotSubmitted = iota RankedStatusUnranked RankedStatusRanked )
View Source
const ( UserGroupNormal = 1 << iota UserGroupAdmin UserGroupBot UserGroupDeveloper UserGroupModerator UserGroupRankingSupervisor UserGroupSwan UserGroupContributor UserGroupDonator )
Variables ¶
This section is empty.
Functions ¶
func GetGameModeString ¶
GetGameModeString Returns a game mode int in its stringified name
func GetShorthandGameModeString ¶
GetShorthandGameModeString Gets a short-handed version of a game mode
func HasPrivilege ¶
func HasPrivilege(privilegesCombo Privileges, privilege Privileges) bool
HasPrivilege Returns if a combination of user groups contains a single group
func HasUserGroup ¶
func HasUserGroup(groupsCombo UserGroups, group UserGroups) bool
HasUserGroup Returns if a combination of user groups contains a single group
Types ¶
type Privileges ¶
type Privileges int64
const ( PrivilegeNormal Privileges = 1 << iota PrivilegeKickUsers PrivilegeBanUsers PrivilegeNotifyUsers PrivilegeMuteUsers PrivilegeRankMapsets PrivilegeViewAdminLogs PrivilegeEditUsers PrivilegeManageBuilds PrivilegeManageAlphaKeys PrivilegeManageMapsets PrivilegeEnableTournamentMode PrivilegeWipeUsers PrivilegeEditUsername PrivilegeEditFlag PrivilegeEditPrivileges PrivilegeEditGroups PrivilegeEditNotes PrivilegeEditAvatar PrivilegeViewCrashes PrivilegeEditDonate )
type RankedStatus ¶
type RankedStatus int8
type UserGroups ¶
type UserGroups int64
Click to show internal directories.
Click to hide internal directories.