mgdb

package
v0.0.0-...-41c7586 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SlugifyString

func SlugifyString(input string) string

Types

type DBNilError

type DBNilError struct{}

func (*DBNilError) Error

func (err *DBNilError) Error() string

type Developer

type Developer struct {
	DeveloperID int
	Name        string
}

type Game

type Game struct {
	GameID          int
	Name            string
	IsIndexed       int
	GenreId         int
	Genre           string
	Rating          string
	ReleaseDate     string
	DeveloperID     int
	Developer       string
	PublisherID     int
	Publisher       string
	Players         string
	Description     string
	ExternalID      string
	ScreenshotHash  string
	TitleScreenHash string
}

type Genre

type Genre struct {
	GenreID int
	Name    string
}

type ImageBlob

type ImageBlob struct {
	Hash  string
	Bytes []byte
}

type IndexedRom

type IndexedRom struct {
	Path               string
	FileName           string
	FileExt            string
	GameID             int
	SupportedSystemIds string
}

func MakeIndexedRomFromPath

func MakeIndexedRomFromPath(path string, gameID int) IndexedRom

type MGDBClient

type MGDBClient struct {
	// contains filtered or unexported fields
}

func OpenMGDB

func OpenMGDB(path string) (*MGDBClient, error)

func (*MGDBClient) FindGameIdFromFilename

func (mgdb *MGDBClient) FindGameIdFromFilename(filename string) (int, error)

func (*MGDBClient) FlushGamesIndex

func (mgdb *MGDBClient) FlushGamesIndex() error

func (*MGDBClient) GetGame

func (mgdb *MGDBClient) GetGame(gameID int) (Game, error)

func (*MGDBClient) GetGameImage

func (mgdb *MGDBClient) GetGameImage(imgHash string) (image.Image, error)

func (*MGDBClient) GetGameList

func (mgdb *MGDBClient) GetGameList() ([]Game, error)

func (*MGDBClient) GetIndexedRoms

func (mgdb *MGDBClient) GetIndexedRoms(gameID int) ([]IndexedRom, error)

func (*MGDBClient) GetMGDBInfo

func (mgdb *MGDBClient) GetMGDBInfo() (MGDBInfo, error)

func (*MGDBClient) IndexGameRom

func (mgdb *MGDBClient) IndexGameRom(rom IndexedRom) (bool, error)

type MGDBInfo

type MGDBInfo struct {
	CollectionName     string
	GamesFolder        string
	SupportedSystemIds string
	BuildDate          string
	MGDBVersion        string
	Description        string
}

type Publisher

type Publisher struct {
	PublisherID int
	Name        string
}

type RomCrc

type RomCrc struct {
	CRC32 string
	Slug  string
}

type SlugRom

type SlugRom struct {
	Slug               string
	GameID             int
	SupportedSystemIds string
}

Jump to

Keyboard shortcuts

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