prereqs

package
v15.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: MIT Imports: 33 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RedistsGame = &itchio.Game{
	ID:        222417,
	Title:     "itch-redists",
	ShortText: "Redistributables for the itch.io app",
	URL:       "https://fasterthanlime.itch.io/itch-redists",
}

Functions

func Install

func Install(ctx *mansion.Context, planPath string, pipePath string) error

func RedistHasPlatform

func RedistHasPlatform(redist *redist.RedistEntry, platform ox.Platform) bool

func Register

func Register(ctx *mansion.Context)

func RegistryKeyExists

func RegistryKeyExists(consumer *state.Consumer, path string) bool

func Test

func Test(ctx *mansion.Context, prereqs []string) error

Types

type Library

type Library interface {
	GetURL(name string, fileType itchio.BuildFileType) (string, error)
	GetUpload(name string) *itchio.Upload
}

func NewLibrary

func NewLibrary(rc *butlerd.RequestContext, apiKey string) (Library, error)

type NamedPipe

type NamedPipe struct {
}

func NewNamedPipe

func NewNamedPipe(pipePath string) (*NamedPipe, error)

func (NamedPipe) Consumer

func (np NamedPipe) Consumer() *state.Consumer

func (NamedPipe) WriteState

func (np NamedPipe) WriteState(taskName string, status butlerd.PrereqStatus) error

type NamedRedistEntry

type NamedRedistEntry struct {
	// contains filtered or unexported fields
}

NamedRedistEntry is used for sorting redists by names

type PrereqAssessment

type PrereqAssessment struct {
	Done []string
	Todo []string
}

type PrereqLogEntry

type PrereqLogEntry struct {
	Type    string `json:"type"`
	Message string `json:"message"`
}

PrereqLogEntry sends an information to the caller on the progress of the task

type PrereqPlan

type PrereqPlan struct {
	Tasks []*PrereqTask `json:"tasks"`
}

PrereqPlan contains a list of tasks for the prereq installer

type PrereqState

type PrereqState struct {
	Type   string               `json:"type"`
	Name   string               `json:"name"`
	Status butlerd.PrereqStatus `json:"status"`
}

PrereqState informs the caller on the current status of a prereq

type PrereqTask

type PrereqTask struct {
	Name    string              `json:"name"`
	WorkDir string              `json:"workDir"`
	Info    *redist.RedistEntry `json:"info"`
}

PrereqTask describes something the prereq installer has to do

type PrereqsContext

type PrereqsContext struct {
	RequestContext *butlerd.RequestContext
	APIKey         string
	Runtime        *ox.Runtime
	Consumer       *state.Consumer
	PrereqsDir     string
	Force          bool
	// contains filtered or unexported fields
}

func (*PrereqsContext) AssessLinuxPrereq

func (pc *PrereqsContext) AssessLinuxPrereq(name string, entry *redist.RedistEntry) (bool, error)

func (*PrereqsContext) AssessPrereqs

func (pc *PrereqsContext) AssessPrereqs(names []string) (*PrereqAssessment, error)

func (*PrereqsContext) AssessWindowsPrereq

func (pc *PrereqsContext) AssessWindowsPrereq(name string, entry *redist.RedistEntry) (bool, error)

func (*PrereqsContext) BuildPlan

func (pc *PrereqsContext) BuildPlan(names []string) (*PrereqPlan, error)

func (*PrereqsContext) FetchPrereqs

func (pc *PrereqsContext) FetchPrereqs(tsc *TaskStateConsumer, names []string) error

func (*PrereqsContext) FilterPrereqs

func (pc *PrereqsContext) FilterPrereqs(names []string) ([]string, error)

func (*PrereqsContext) GetEntry

func (pc *PrereqsContext) GetEntry(name string) (*redist.RedistEntry, error)

func (*PrereqsContext) GetEntryDir

func (pc *PrereqsContext) GetEntryDir(name string) string

func (*PrereqsContext) GetLibrary

func (pc *PrereqsContext) GetLibrary() (Library, error)

func (*PrereqsContext) GetRegistry

func (pc *PrereqsContext) GetRegistry() (*redist.RedistRegistry, error)

func (*PrereqsContext) HasInstallMarker

func (pc *PrereqsContext) HasInstallMarker(name string) bool

func (*PrereqsContext) InstallPrereqs

func (pc *PrereqsContext) InstallPrereqs(tsc *TaskStateConsumer, plan *PrereqPlan) error

func (*PrereqsContext) MarkInstalled

func (pc *PrereqsContext) MarkInstalled(name string) error

func (*PrereqsContext) MarkerPath

func (pc *PrereqsContext) MarkerPath(name string) string

func (*PrereqsContext) RunSanityCheck

func (pc *PrereqsContext) RunSanityCheck(name string, entry *redist.RedistEntry, sc *redist.LinuxSanityCheck) error

type TaskStateConsumer

type TaskStateConsumer struct {
	OnState func(state butlerd.PrereqsTaskStateNotification)
}

Jump to

Keyboard shortcuts

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