Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateRoomID ¶
GenerateRoomID generate a unique room ID containing 16 digits.
func GetGameNameFromRoomID ¶
GetGameNameFromRoomID parse roomID to get roomID and gameName.
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 ¶
type FileExtensionWhitelist ¶
type FileExtensionWhitelist interface {
GetSupportedExtensions() []string
}
type GameLauncher ¶
type GameLauncher struct {
// contains filtered or unexported fields
}
func NewGameLauncher ¶
func NewGameLauncher(lib GameLibrary) GameLauncher
func (GameLauncher) ExtractAppNameFromUrl ¶
func (gl GameLauncher) ExtractAppNameFromUrl(name string) string
func (GameLauncher) FindAppByName ¶
func (gl GameLauncher) FindAppByName(name string) (AppMeta, error)
func (GameLauncher) GetAppNames ¶
func (gl GameLauncher) GetAppNames() []string
type GameLibrary ¶
type GameLibrary interface { GetAll() []GameMetadata FindGameByName(name string) GameMetadata Scan() }
func NewLibWhitelisted ¶
func NewLibWhitelisted(conf Config, filter FileExtensionWhitelist, log *logger.Logger) GameLibrary
type GameMetadata ¶
type GameMetadata struct { // the display name of the game Name string // the game file extension (e.g. nes, n64) Type string Base string // the game path relative to the library base path Path string // contains filtered or unexported fields }
func (GameMetadata) FullPath ¶
func (g GameMetadata) FullPath() string
Click to show internal directories.
Click to hide internal directories.