Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var NotFoundErr = errors.New("hash not found")
NotFoundErr is the error returned when a rom can't be found in the soruce.
Functions ¶
func DefaultCachePath ¶
DefaultCachePath returns the path used for all cached data. Current <HOME>/.sselph-scraper or <HOMEDIR>\Application Data\sselph-scraper
Types ¶
type DS ¶
type DS interface { // GetGame takes the path of a ROM and returns the Pretty name if it differs from the Sources normal name. GetName(string) string // GetGame takes an id and returns the Game. GetGame(string) (*Game, error) // GetID takes the path of a ROM and returns the id to use in GetGame. GetID(string) (string, error) }
DS is the interface all DataSoures should implement.
type Game ¶
type Game struct { ID string Source string GameTitle string Overview string Images map[ImgType]string Thumbs map[ImgType]string Rating float64 ReleaseDate string Developer string Publisher string Genre string Players int64 }
Game is the standard Game that all sources will return. They don't have to populate all values.
type HashMap ¶
type HashMap struct {
// contains filtered or unexported fields
}
HashMap a mapping of hash to names and GDB IDs.
func CachedHashMap ¶
CachedHashMap gets the mapping of hashes to IDs.
func FileHashMap ¶
FileHashMap creates a hash map from a csv file.
type Hasher ¶
type Hasher struct {
// contains filtered or unexported fields
}
Hasher is a thread-safe object to hash files. Hashes are cached and multiple calls to hash the same file wait for the first call to complete to read from cache.
type MAME ¶
type MAME struct {
// contains filtered or unexported fields
}
MAME is a Data Source using mamedb and arcade-history.
type OVGDB ¶
type OVGDB struct { Hasher *Hasher // contains filtered or unexported fields }
OVGDB is a DataSource using OpenVGDB.