Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrImgNotFound = errors.New("image not found")
ErrImgNotFound is the error returned when a rom image can't be found.
var ErrNotFound = errors.New("hash not found")
ErrNotFound is the error returned when a rom can't be found in the source.
Functions ¶
func DefaultCachePath ¶
DefaultCachePath returns the path used for all cached data. Current <HOME>/.sselph-scraper or <HOMEDIR>\Application Data\sselph-scraper
Types ¶
type ADB ¶ added in v1.2.6
type ADB struct{}
ADB is a Data Source using arcadeitalia and arcade-history.
type DS ¶
type DS interface { // GetName 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) }
DS is the interface all DataSoures should implement.
type Daphne ¶ added in v1.1.3
type Daphne struct {
HM *HashMap
}
Daphne is a data source using GDB for Daphne games.
type Game ¶
type Game struct { ID string Source string GameTitle string Overview string Images map[ImgType]Image Thumbs map[ImgType]Image 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 HTTPImageSS ¶ added in v1.2.1
type HTTPImageSS struct { URL string Limit chan struct{} }
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 ImgType ¶
type ImgType string
ImgType represents the different image types that sources may provide.
const ( ImgBoxart ImgType = "b" ImgBoxart3D ImgType = "3b" ImgScreen ImgType = "s" ImgFanart ImgType = "f" ImgBanner ImgType = "a" ImgLogo ImgType = "l" ImgTitle ImgType = "t" ImgMarquee ImgType = "m" ImgCabinet ImgType = "c" ImgFlyer ImgType = "fly" )
Image types for Datasource options. Not all types are valid for all sources.
type MAME ¶
type MAME struct {
// contains filtered or unexported fields
}
MAME is a Data Source using mamedb and arcade-history.
type NeoGeo ¶ added in v1.1.4
type NeoGeo struct {
HM *HashMap
}
NeoGeo is a data source using GDB for Daphne games.
type OVGDB ¶
type OVGDB struct { Hasher *Hasher // contains filtered or unexported fields }
OVGDB is a DataSource using OpenVGDB.
type SS ¶ added in v1.1.9
type SS struct { HM *HashMap Hasher *Hasher Dev ss.DevInfo User ss.UserInfo Lang []string Region []string Width int Height int Limit chan struct{} }
SS is the source for ScreenScraper