Documentation ¶
Index ¶
- Variables
- func CalculateAccuracy(count300 uint64, count100 uint64, count50 uint64, countMiss uint64, ...) float64
- func Connect(c *consts.MySQLConf)
- func CreateConfig(configName string, conf interface{})
- func Download(URL string) (file []byte, err error)
- func DownloadBeatmapbyName(BeatmapName string) (string, error)
- func Exists(Path string) bool
- func GetConfig(configName string, c interface{})
- func GetIPInfo(ip string) *consts.GeoIP
- func HasPrivileges(p uint64, u *consts.User) bool
- func MD5(I []byte) (out []byte, err error)
- func MD5File(Path string) ([]byte, error)
- func MD5String(String string) ([]byte, error)
- func NotExists(Path string) bool
- func Pseudorandombytes(n int) []byte
- func RandomString(n int) (ret string)
- func ToHumanAcc(acc float64) float64
- func Verify(a, b []byte) bool
Constants ¶
This section is empty.
Variables ¶
var DB *sql.DB
DB Database
Functions ¶
func CalculateAccuracy ¶
func CalculateAccuracy(count300 uint64, count100 uint64, count50 uint64, countMiss uint64, countGeki uint64, countKatu uint64, playMode byte) float64
CalculateAccuracy calculates every playModes accuracy.
func CreateConfig ¶
func CreateConfig(configName string, conf interface{})
CreateConfig creates a config for the given configName and marshals a struct into it.
func Download ¶
Download is downloading the content and returns the body. mostly used for downloading a file.
func DownloadBeatmapbyName ¶
DownloadBeatmapbyName Downloads a Beatmap from OSU!
func GetConfig ¶
func GetConfig(configName string, c interface{})
GetConfig unmarshals a .yml file of the given configName
func GetIPInfo ¶
We're going to use http://ip.zxq.co/, because why not ? GetIPInfo is gonna get the IP Information where the User is located at.
func HasPrivileges ¶
HasPrivileges if user has those permissions else not!
func NotExists ¶
NotExists is gonna check if a file doesn't exists, (IF Does not return true else false)
func Pseudorandombytes ¶
Pseudorandombytes Generates a pseudo byte array. good for crypto.
func RandomString ¶
RandomString is just generate a random string. aA-zZ 0-9
func ToHumanAcc ¶
ToHumanAcc is converting the Accuracy to a human readable Number. (Way smaller then E.G 0.895023981 // should be 89.50 % acc)
Types ¶
This section is empty.