Documentation ¶
Overview ¶
Package database helps maintaining Minecraft resources available at Curse CDN
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UpdateDatabase ¶
func UpdateDatabase(verbose bool)
UpdateDatabase gets information from Curse CDN server and puts them in a database
Types ¶
type Database ¶
Database interface allows to store lists of files and packages locally or remotely.
func GetDatabase ¶
func GetDatabase() Database
GetDatabase function returns a database stored in MCPM local directory. If database doesn't exist it gets updated.
type FileElement ¶
type FileElement struct {
ID, PkgID int // File ID, Package ID
Name, MCVersion string // File name, Minecraft version
}
FileElement contains information about file available on Curse server.
type FileList ¶
type FileList interface {
Get(fid int) *FileElement
}
FileList interface supplies a method of getting file information
type PkgElement ¶
PkgElement contains information about Minecraft resource (package)
type PkgList ¶
type PkgList interface { Get(pid int) *PkgElement GetByName(pname string) *PkgElement Each(fn func(int, *PkgElement)) }
PkgList interface supplies methods for lists of packages
Click to show internal directories.
Click to hide internal directories.