miyoogamelist

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToImport = fmt.Errorf("failed to import")

Functions

This section is empty.

Types

type Game

type Game struct {
	XMLName xml.Name `xml:"game"`

	ID     string `xml:"id,attr,omitempty" exhaustruct:"optional"`
	Source string `xml:"source,attr,omitempty" exhaustruct:"optional"`

	Path  string `xml:"path"`
	Name  string `xml:"name"`
	Image string `xml:"image"`
}

func NewGame

func NewGame(path, name, image string) Game

type GameList

type GameList struct {
	XMLName xml.Name `xml:"gameList"`

	Provider Provider `xml:"provider,omitempty" exhaustruct:"optional"`
	Games    []Game   `xml:"game"`
}

func Import

func Import(unknownStruct map[string]interface{}) (*GameList, error)

Imports any struct that is miyoogamelist shaped by using reflection.

func NewGameList

func NewGameList(games ...Game) GameList

type Provider added in v1.1.0

type Provider struct {
	XMLName xml.Name `xml:"provider,omitempty"`

	System   string `xml:"System,omitempty" exhaustruct:"optional"`
	Software string `xml:"software,omitempty" exhaustruct:"optional"`
	Database string `xml:"database,omitempty" exhaustruct:"optional"`
	Web      string `xml:"web,omitempty" exhaustruct:"optional"`
}

Jump to

Keyboard shortcuts

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