games

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// some directory which is going to be
	// the root folder for the library
	BasePath string
	// a list of supported file extensions
	Supported []string
	// a list of ignored words in the files
	Ignored []string
	// print some additional info
	Verbose bool
	// enable directory changes watch
	WatchMode bool
}

Config is an external configuration

func (Config) GetSupportedExtensions added in v2.6.0

func (c Config) GetSupportedExtensions() []string

type FileExtensionWhitelist added in v2.6.0

type FileExtensionWhitelist interface {
	GetSupportedExtensions() []string
}

type GameLibrary

type GameLibrary interface {
	GetAll() []GameMetadata
	FindGameByName(name string) GameMetadata
	Scan()
}

func NewLib added in v2.6.0

func NewLib(conf Config) GameLibrary

func NewLibWhitelisted added in v2.6.0

func NewLibWhitelisted(conf Config, filter FileExtensionWhitelist) GameLibrary

type GameMetadata

type GameMetadata struct {

	// the display name of the game
	Name string
	// the game file extension (e.g. nes, n64)
	Type string
	// the game path relative to the library base path
	Path string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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