setup

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorHandler

type ErrorHandler func(err error)

type FinishHandler

type FinishHandler func(source InstallSource)

type InstallSource

type InstallSource struct {
	Version string
}

type Installer

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

func NewInstaller

func NewInstaller(settings InstallerSettings) *Installer

func (*Installer) Install

func (i *Installer) Install(appDir string)

type InstallerSettings

type InstallerSettings struct {
	AppName         string
	Localizer       *localize.Localizer
	OnError         ErrorHandler
	OnProgressLabel ProgressLabelHandler
	OnProgress      ProgressHandler
	OnFinish        FinishHandler
	OnSource        SourceHandler
}

type Multiverse

type Multiverse interface {
	// true if the basedir had a marker
	// the rest of the fields won't make sense
	IsValid() bool

	GetValidAppDir() (string, bool)
	MakeAppDir(version string) (string, error)
	ListAppDirs() []string
	GetBaseDir() string
}

func NewMultiverse

func NewMultiverse(params *MultiverseParams) (Multiverse, error)

type MultiverseParams

type MultiverseParams struct {
	// `itch`, `kitch`
	AppName string

	// on linux, this would be `~/.itch`
	// on windows, this would be `%LOCALAPPDATA%/itch`
	BaseDir string
}

type ProgressHandler

type ProgressHandler func(progress float64)

type ProgressLabelHandler

type ProgressLabelHandler func(label string)

type SourceHandler

type SourceHandler func(source InstallSource)

Jump to

Keyboard shortcuts

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