Back to godoc.org

Package modportal

v0.0.0-...-8887655
Latest Go to latest

The latest major version is .

Published: Aug 16, 2020 | License: ISC | Module: code.hackerspace.pl/hscloud

Index

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)

Package Files

  • modportal.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier