Documentation ¶
Index ¶
- Variables
- func CalcDiffLiner(key string, diff int, baseRank int, ceilLevel int) (k float32, b float32)
- func CheckSonolusList(id int) (flag bool)
- func DeleteSonolusList()
- func InitConfig()
- func InitDatabase() (err error)
- func InitTencentCos()
- func MinusTableReader() (err error)
- func QueryDiffDistribution(diff int) (distribution map[int]int, base int, ceil int)
- func QueryRank(key string, value float32, diff int) (rank int)
- func UpdateAuthor(username string, nickname string) (err error)
- func UpdateBasic(chartID int, diff int, chart Chart) (err error)
- func UpdateDetail(chartID int, diff int, detail Detail) (err error)
- func UpdateSonolusList(listItem SonolusList)
- func UploadChart(chart Chart) (success bool)
- func UploadSonolusChart(chartId int, SonolusScript []byte) (success bool)
- func UploadString(name string, string []byte) (success bool)
- type Author
- type Chart
- type Detail
- type Diffs
- type FanBasic
- type Note
- type OfficialBasic
- type SonolusData
- type SonolusDifficulty
- type SonolusEntity
- type SonolusList
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug string
View Source
var MinusTable [121][2]float64
View Source
var MinusTableUrl string
View Source
var MongoURL string
View Source
var PythonAPI string
View Source
var ReCaptchaKey string
View Source
var RunAddr string
View Source
var SonolusListColl *mongo.Collection
Functions ¶
func CalcDiffLiner ¶
func CheckSonolusList ¶
func DeleteSonolusList ¶
func DeleteSonolusList()
func InitConfig ¶
func InitConfig()
func InitDatabase ¶
func InitDatabase() (err error)
func InitTencentCos ¶
func InitTencentCos()
func MinusTableReader ¶
func MinusTableReader() (err error)
func QueryDiffDistribution ¶
func UpdateAuthor ¶
func UpdateSonolusList ¶
func UpdateSonolusList(listItem SonolusList)
func UploadChart ¶
func UploadSonolusChart ¶
func UploadString ¶
Types ¶
type Author ¶
type Author struct { AuthorID int `bson:"authorID"` UserName string `bson:"username"` NickName string `bson:"nickname"` }
func QueryAuthor ¶
func QueryAuthorID ¶
type Chart ¶
type Detail ¶
type Detail struct { ActiveHPS float32 `bson:"activeHPS"` TotalTime float32 `bson:"totalTime"` FingerMaxHPS float32 `bson:"fingerMaxHPS"` TotalNPS float32 `bson:"totalNPS"` LeftPercent float32 `bson:"leftPercent"` MaxSpeed float32 `bson:"maxSpeed"` ID int `bson:"id"` Error string `bson:"error"` Diff int `bson:"diff"` ActiveNPS float32 `bson:"activeNPS"` TotalHitNote int `bson:"totalHitNote"` ActivePercent float32 `bson:"activePercent"` FlickNoteInterval float32 `bson:"flickNoteInterval"` MainBPM float32 `bson:"mainBPM"` TotalNote int `bson:"totalNote"` BPMLow float32 `bson:"BPMLow"` NoteFlickInterval float32 `bson:"noteFlickInterval"` BPMHigh float32 `bson:"BPMHigh"` MaxScreenNPS float32 `bson:"maxScreenNPS"` TotalHPS float32 `bson:"totalHPS"` }
type Diffs ¶
type Diffs struct { FingerMaxHPS float32 `bson:"fingerMaxHPS"` TotalNPS float32 `bson:"totalNPS"` FlickNoteInterval float32 `bson:"flickNoteInterval"` NoteFlickInterval float32 `bson:"noteFlickInterval"` MaxScreenNPS float32 `bson:"maxScreenNPS"` TotalHPS float32 `bson:"totalHPS"` BlueWhiteFunc float32 `bson:"blueWhiteFunc"` MaxSpeed float32 `bson:"MaxSpeed"` }
type FanBasic ¶
type FanBasic struct { Result bool `json:"result"` Post struct { Title string `json:"title"` Artist string `json:"artists"` Diff int `json:"diff"` Level int `json:"level"` Chart []Note `json:"notes"` Author struct { Username string `json:"username"` Nickname string `json:"nickname"` } `json:"author"` } `json:"post"` }
type Note ¶
type Note struct { Type string `json:"type" bson:"type"` CMD string `json:"cmd" bson:"cmd"` BPM float32 `json:"bpm" bson:"bpm"` Beat float32 `json:"beat" bson:"beat"` Time float32 `json:"time" bson:"time"` Note string `json:"note" bson:"note"` Lane int `json:"lane" bson:"lane"` Start bool `json:"start" bson:"start"` End bool `json:"end" bson:"end"` Flick bool `json:"flick" bson:"flick"` Pos string `json:"pos" bson:"pos"` }
type OfficialBasic ¶
type SonolusData ¶
type SonolusDifficulty ¶
type SonolusEntity ¶
type SonolusEntity struct { Archetype int `json:"archetype"` Data SonolusData `json:"data"` }
type SonolusList ¶
type SonolusList struct { ID int `json:"id"` Title string `json:"title"` Artists string `json:"artists"` Author string `json:"author"` Cover string `json:"cover"` BGM string `json:"bgm"` Difficulties SonolusDifficulty `json:"difficulties"` Upload int64 `json:"upload"` }
func GetSonolusList ¶
func GetSonolusList() (list []SonolusList, err error)
Click to show internal directories.
Click to hide internal directories.