osuhm

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: Unlicense Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunNotifier

func RunNotifier(osuFolder string, replayChan chan osu.Replay)

RunNotifier needs to be run concurrently for sending replays to replayChan when new replays are created in Data/r folder

Types

type OsuHM

type OsuHM struct {
	OsuFolder string
	APIKey    string
	HM        map[string]osu.Beatmap
}

OsuHM stores osu root path, the api key and hashmap of beatmaps

func Load

func Load(dirPath string) *OsuHM

Load loads a previously cached OsuHM dirPath is the folder where the cache file is located

func NewOsuHM

func NewOsuHM(osuFolder string) *OsuHM

New creates a new OsuHM it opens osu!.db file, if it was opened before use Load instead

func (*OsuHM) GetBeatmap

func (osuhm *OsuHM) GetBeatmap(beatmapHash string) *osu.Beatmap

GetBeatmap returns a osu! Beatmap from its hash

func (*OsuHM) GetBeatmapPath

func (osuhm *OsuHM) GetBeatmapPath(beatmap *osu.Beatmap) string

GetBeatmapPath returns the full path of the specified beatmap

func (*OsuHM) SaveCache

func (osuhm *OsuHM) SaveCache(dest string)

SaveCache stores an OsuHM cache file in dest folder

func (*OsuHM) StartNotifier

func (osuhm *OsuHM) StartNotifier(replayChan chan osu.Replay)

StartNotifier runs a notifier that watch for new replays and sends them into the replayChan channel

Jump to

Keyboard shortcuts

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