modportal

package
v0.0.0-...-8887655 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InfoJSON

type InfoJSON struct {
	Dependencies    []string `json:"dependencies"`
	FactorioVersion string   `json:"factorio_json"`
}

type Mod

type Mod struct {
	Name     string    `json:"name"`
	Releases []Release `json:"releases"`
}

func GetMod

func GetMod(ctx context.Context, name string) (*Mod, error)

func (*Mod) ReleaseBySHA1

func (m *Mod) ReleaseBySHA1(sha1 string) *Release

func (*Mod) ReleaseByVersion

func (m *Mod) ReleaseByVersion(version string) *Release

type Release

type Release struct {
	DownloadURL string   `json:"download_url"`
	FileName    string   `json:"file_name"`
	Info        InfoJSON `json:"info_json"`
	ReleasedAt  string   `json:"released_at"`
	SHA1        string   `json:"sha1"`
	Version     string   `json:"version"`
}

func (*Release) Download

func (r *Release) Download(ctx context.Context, username, token string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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