consts

package
v0.0.0-...-c4db811 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2018 License: MIT Imports: 3 Imported by: 24

Documentation

Index

Constants

View Source
const (
	ModsNF   = 1 << 0
	ModsEZ   = 1 << 1
	ModsTD   = 1 << 2
	ModsHD   = 1 << 3
	ModsHR   = 1 << 4
	ModsSD   = 1 << 5
	ModsDT   = 1 << 6
	ModsRX   = 1 << 7
	ModsHT   = 1 << 8
	ModsNC   = 1 << 9
	ModsFL   = 1 << 10
	ModsAP   = 1 << 11
	ModsSO   = 1 << 12
	ModsRX2  = 1 << 13
	ModsPF   = 1 << 14
	ModsK4   = 1 << 15
	ModsK5   = 1 << 16
	ModsK6   = 1 << 17
	ModsK7   = 1 << 18
	ModsK8   = 1 << 19
	ModsFI   = 1 << 20
	ModsRND  = 1 << 21
	ModsLM   = 1 << 22
	ModsTP   = 1 << 23
	ModsK9   = 1 << 24
	ModsK10  = 1 << 25
	ModsK1   = 1 << 26
	ModsK3   = 1 << 27
	ModsK2   = 1 << 28
	ModsLast = 1 << 29
	ModsK    = ModsK1 | ModsK2 | ModsK3 | ModsK4 | ModsK5 | ModsK6 | ModsK7 | ModsK8 | ModsK9 | ModsK10
)

All Mods

View Source
const (
	Unknown       = -2
	NotSubmited   = -1
	LatestPending = 0
	NeedUpdate    = 1
	Ranked        = 2
	Approved      = 3
	Qualified     = 4
	Loved         = 5
)

Ranked Status

View Source
const (
	STD   = 0
	Taiko = 1
	CTB   = 2
	Mania = 3
)

Playmodes

View Source
const (
	Supporter = 2 << iota
	BAT
	TournamentStaff
	AdminPannelAccess
	AdminManageUsers
	AdminBanUsers
	AdminSilenceUsers
	AdminWipeUsers
	AdminBeatmaps
	AdminDeveloper
	AdminSettings
	AdminReports
	AdminPrivileges
	AdminSendAnnouncements
	AdminChatMod
	AdminKickUsers
)

User Privileges.

Variables

This section is empty.

Functions

func ToCountryCode

func ToCountryCode(CountryID byte) string

ToCountryCode converts an CountryID into String.

func ToCountryID

func ToCountryID(CountryCode string) byte

ToCountryID convert Country Code to CountryID

func ToPlaymodeString

func ToPlaymodeString(p byte) string

ToPlaymodeString convert an int8 into an Readable string. (0, 1, 2, 3) -> ("std", "taiko", "ctb", "mania")

Types

type GeoIP

type GeoIP struct {
	City          string `json:"city"`
	Continent     string `json:"continent"`
	ContinentFull string `json:"continent_full"`
	Country       string `json:"country"`
	CountryFull   string `json:"country_full"`
	IP            string `json:"ip"`
	LocRaw        string `json:"loc"`
	Location      struct {
		Lon float64
		Lat float64
	}
}

GeoIP Is to get where the User is located. E.G ("Germany")

type Leaderboard

type Leaderboard struct {
	UserID      uint32
	RankedScore uint64
	TotalScore  uint64
	Count300    uint64
	Count100    uint64
	Count50     uint64
	CountMiss   uint64
	Playcount   uint32
	PeppyPoints float64
	Position    uint32
}

Leaderboard is ofc our Leaderboard! where our "PeppyPoints" is located at.

type MySQLConf

type MySQLConf struct {
	Hostname string
	Port     int
	Username string
	Password string
	Database string
}

MySQLConf is the MySQL Configuration

type REDISConf

type REDISConf struct {
	Host     string
	Port     int16
	Password string
}

REDISConf used for Redis(later)

type Status

type Status struct {
	Country        byte
	Lat            float64
	Lon            float64
	Banned         bool
	BannedUntil    time.Time
	BannedReason   string
	Silenced       bool
	SilencedUntil  time.Time
	SilencedReason string
	Verified       bool
}

Status status of current User

type User

type User struct {
	ID                    uint32
	UserName              string
	UserNameSafe          string
	EMail                 string
	BCryptPassword        string
	Privileges            uint64
	Status                *Status
	Relax                 bool
	Achievements          uint32
	AchievementsDisplayed uint32
}

User is a User Object

func (*User) CheckPassword

func (u *User) CheckPassword(passwordMD5 string) bool

CheckPassword if valid.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL