manager

package
v3.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Game

type Game RepositoryGame

func FilterGames

func FilterGames(games []Game, keyword *string, repository *string, lang *string, onlyInstalled bool) []Game

func FindGameById

func FindGameById(games []Game, id string) *Game

func FindGamesByName

func FindGamesByName(games []Game, name string) (foundGames []Game)

func (*Game) GetHumanSize

func (g *Game) GetHumanSize() string

type Manager

type Manager struct {
	Config            *configurator.InsteadmanConfig
	CurrentRunningCmd *exec.Cmd
}

func (*Manager) FindLangs

func (m *Manager) FindLangs(games []Game) []string

func (*Manager) GetGameImage

func (m *Manager) GetGameImage(game *Game) (imagePath string, e error)

func (*Manager) GetInstalledGames

func (m *Manager) GetInstalledGames() ([]Game, error)

func (*Manager) GetMergedGames

func (m *Manager) GetMergedGames() ([]Game, error)

func (*Manager) GetRepositories

func (m *Manager) GetRepositories() []configurator.Repository

func (*Manager) GetRepositoryGames

func (m *Manager) GetRepositoryGames() ([]Game, error)

func (*Manager) GetSortedGames

func (m *Manager) GetSortedGames() ([]Game, error)

func (*Manager) HasDownloadedRepositories

func (m *Manager) HasDownloadedRepositories() bool

func (*Manager) InstallGame

func (m *Manager) InstallGame(game *Game) error

func (*Manager) RemoveGame

func (m *Manager) RemoveGame(game *Game) error

func (*Manager) RunGame

func (m *Manager) RunGame(game *Game) error

func (*Manager) StopRunningGame

func (m *Manager) StopRunningGame() error

func (*Manager) UpdateRepositories

func (m *Manager) UpdateRepositories() []error

type RepositoryGame

type RepositoryGame struct {
	// XMLName xml.Name `xml:"game"`
	Name             string   `xml:"name"`
	Title            string   `xml:"title"`
	Version          string   `xml:"version"`
	Url              string   `xml:"url"`
	Size             int      `xml:"size"`
	Lang             string   `xml:"lang"`
	Descurl          string   `xml:"descurl"`
	Author           string   `xml:"author"`
	Description      string   `xml:"description"`
	Image            string   `xml:"image"`
	Langs            []string `xml:"langs>lang"`
	InstalledVersion string   `xml:"-"`
	RepositoryName   string   `xml:"-"`
	Installed        bool     `xml:"-"`
	OnlyInstalled    bool     `xml:"-"`
	IsUpdateExist    bool     `xml:"-"`
	Languages        []string `xml:"-"`
	Id               string   `xml:"-"`
}

type RepositoryGameList

type RepositoryGameList struct {
	// XMLName xml.Name `xml:"game_list"`
	GameList []RepositoryGame `xml:"game"`
}

Jump to

Keyboard shortcuts

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