mamexml

package
v0.0.0-...-2ea3e0e Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2016 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Download

func Download(fileName string, url string, size int) error

Download downloads url to filename

func ExtractAsset

func ExtractAsset(zipFileName string) (string, error)

ExtractAsset extracts compressed assest

func GetLatestXMLFile

func GetLatestXMLFile(api string, repo string) (string, error)

GetLatestXMLFile finds, downloads, extracts latest release asset

func Load

func Load(fileName string, callback EntryLoad) error

Load load all data through callback

Types

type Asset

type Asset struct {
	Name        string `json:"name"`
	ContentType string `json:"content_type"`
	Size        int    `json:"size"`
	Created     string `json:"created_at"`
	Updated     string `json:"updated_at"`
	URL         string `json:"browser_download_url"`
}

Asset artifacts from a release

func GetLatestXMLAsset

func GetLatestXMLAsset(api string, repo string) (*Asset, error)

GetLatestXMLAsset returns info for most recent artifact

type Driver

type Driver struct {
	Status string `xml:"status,attr"`
}

Driver status of emulation

type EntryLoad

type EntryLoad func(machine *Machine) error

EntryLoad callback

type Input

type Input struct {
	Players int `xml:"players,attr"`
}

Input number of players

type Machine

type Machine struct {
	Name         string `xml:"name,attr"`
	Description  string `xml:"description"`
	Driver       Driver `xml:"driver"`
	Input        Input  `xml:"input"`
	IsDevice     bool
	IsBios       bool
	IsRunnable   bool
	IsMechanical bool
	CloneOf      string `xml:"cloneof,attr"`
	RomOf        string `xml:"romof,attr"`
	SampleOf     string `xml:"sampleof,attr"`
}

Machine basic element

type Release

type Release struct {
	Name    string  `json:"name"`
	TagName string  `json:"tag_name"`
	Assets  []Asset `json:"assets"`
}

Release top level object for releases

func GetLatestRelease

func GetLatestRelease(api string, repo string) (*Release, error)

GetLatestRelease returns latest release

func GetReleases

func GetReleases(api string, repo string) ([]Release, error)

GetReleases returns first page of releases

Jump to

Keyboard shortcuts

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