router

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GameFinder

type GameFinder interface {
	IsInstalledAnywhere(configs []software_finder.Config) (bool, error)
	IsInstalled(config software_finder.Config) (bool, error)
	GetInstallDirFromSomewhere(configs []software_finder.Config) (string, error)
	GetInstallDir(config software_finder.Config) (string, error)
}

type GameLauncher added in v0.1.10

type GameLauncher interface {
	StartGame(u *url.URL, config game_launcher.Config, launchType game_launcher.LaunchType, cmdBuilder game_launcher.CommandBuilder, hookHandlers ...game_launcher.HookHandler) error
}

type GameRouter

type GameRouter struct {
	GameTitles map[string]domain.GameTitle
	// contains filtered or unexported fields
}

func New added in v0.1.10

func New(repository RegistryRepository, finder GameFinder, launcher GameLauncher) *GameRouter

func (*GameRouter) AddTitle

func (r *GameRouter) AddTitle(gameTitles ...domain.GameTitle)

func (*GameRouter) DeregisterHandlers added in v0.2.1

func (r *GameRouter) DeregisterHandlers() error

func (*GameRouter) RegisterHandlers

func (r *GameRouter) RegisterHandlers() []handlerRegistrationResult

func (*GameRouter) RunURL

func (r *GameRouter) RunURL(commandLineUrl string) (*domain.GameTitle, error)

type RegistryRepository

type RegistryRepository interface {
	GetStringValue(k registry.Key, path string, valueName string) (string, error)
	SetStringValue(k registry.Key, path string, valueName string, value string) error
	CreateKey(k registry.Key, path string) error
	DeleteKey(k registry.Key, path string) error
}

Jump to

Keyboard shortcuts

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