helper

package
v0.0.0-...-5b25caa Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2018 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBeatmap

func AddBeatmap(BM *Beatmap)

func BeatmapExists

func BeatmapExists(FileMD5 string, BeatmapID int) (bool, bool)

func CheeseStatus

func CheeseStatus(rankedStatus int8) int8

func FixRankedStatus

func FixRankedStatus(r int8) int8

func UpdateBeatmap

func UpdateBeatmap(BM *Beatmap)

Types

type Beatmap

type Beatmap struct {
	SetID            int64              `json:"SetID"`
	ChildrenBeatmaps []ChildrenBeatmaps `json:"ChildrenBeatmaps"`
	RankedStatus     int8               `json:"RankedStatus"`
	ApprovedDate     time.Time          `json:"ApprovedDate"`
	LastUpdate       time.Time          `json:"LastUpdate"`
	LastChecked      time.Time          `json:"LastChecked"`
	Artist           string             `json:"Artist"`
	Title            string             `json:"Title"`
	Creator          string             `json:"Creator"`
	Source           string             `json:"Source"`
	Tags             string             `json:"Tags"`
	HasVideo         bool               `json:"HasVideo"`
	Genre            int8               `json:"Genre"`
	Language         int8               `json:"Language"`
	Favourites       int32              `json:"Favourites"`
}

func NewBeatmap

func NewBeatmap() *Beatmap

type CheeseGull

type CheeseGull struct {
	RankedStatus int8
	Query        string
	Page         int32
	PlayMode     int8

	Beatmap []*Beatmap
	// contains filtered or unexported fields
}

func (*CheeseGull) GetBeatmap

func (c *CheeseGull) GetBeatmap(BeatmapID int) *ChildrenBeatmaps

func (*CheeseGull) GetBeatmapByHash

func (c *CheeseGull) GetBeatmapByHash(FileMD5 string) *ChildrenBeatmaps

func (*CheeseGull) GetSet

func (c *CheeseGull) GetSet(SetID int) *Beatmap

func (*CheeseGull) ToDirect

func (c *CheeseGull) ToDirect() string

func (*CheeseGull) ToNP

func (c *CheeseGull) ToNP(SetID int, BeatmapID int) string

type ChildrenBeatmaps

type ChildrenBeatmaps struct {
	BeatmapID        int64   `json:"BeatmapID"`
	ParentSetID      int64   `json:"ParentSetID"`
	DiffName         string  `json:"DiffName"`
	FileMD5          string  `json:"FileMD5"`
	Mode             int8    `json:"Mode"`
	BPM              float32 `json:"BPM"`
	CS               float32 `json:"CS"`
	AR               float32 `json:"AR"`
	OD               float32 `json:"OD"`
	HP               float32 `json:"HP"`
	TotalLength      int32   `json:"TotalLength"`
	HitLength        int32   `json:"HitLength"`
	PlayCount        int64   `json:"PlayCount"`
	PassCount        int64   `json:"PassCount"`
	MaxCombo         int32   `json:"MaxCombo"`
	DifficultyRating float64 `json:"DifficultyRating"`
}

func NewChildrenBeatmap

func NewChildrenBeatmap() *ChildrenBeatmaps

func (*ChildrenBeatmaps) GetParent

func (bm *ChildrenBeatmaps) GetParent() *Beatmap

type DBBeatmap

type DBBeatmap struct {
	SetID        int
	BeatmapID    int
	FileMD5      string
	RankedStatus int
	RankedDate   string
	Artist       string
	Title        string
	Creator      string
	LastUpdate   string
	Difficulty   float64
	CS           float32
	OD           float32
	AR           float32
	HP           float32
	BPM          float32
	HitLength    int
	DiffName     string
	PlayMode     int
	MaxCombo     int
}

func GetBeatmapofDB

func GetBeatmapofDB(BeatmapID int) *DBBeatmap

func GetBeatmapofDBHash

func GetBeatmapofDBHash(FileMD5 string) *DBBeatmap

func (*DBBeatmap) GetHeader

func (bm *DBBeatmap) GetHeader(TotalScores int) string

func (*DBBeatmap) IsLoved

func (bm *DBBeatmap) IsLoved() bool

func (*DBBeatmap) IsRanked

func (bm *DBBeatmap) IsRanked() bool

Jump to

Keyboard shortcuts

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