algosetup

package module
v0.0.0-...-831d3d4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Click

func Click(cc ClickConfig) error

func DownloadFile

func DownloadFile(fromUrl string, toFile string, progressCb func(current, total int64)) error

func ExtractArchive

func ExtractArchive(archive *zip.ReadCloser, target string) error

func ExtractEmbedded

func ExtractEmbedded(fs embed.FS, e Embedded, progressCb ProgressCb) error

func ExtractEmbeddedPackage

func ExtractEmbeddedPackage(fs embed.FS, e Embedded, dir string, progressCb ProgressCb) error

func ExtractZip

func ExtractZip(path string, target string) error

func FileExists

func FileExists(path string) bool

func InstallService

func InstallService(name, display, user, password string) error

func Main

func Main(make MakeInstallerFunc, config InstallerConfig) error

func MakeShortcut

func MakeShortcut(path string, name string) error

func MustCatchup

func MustCatchup(node *algomgr.Node, algodUrl string, algodToken string, catchpointUrl string, updateCb func(string, float32))

func MustCatchupAndWaitForSync

func MustCatchupAndWaitForSync(node *algomgr.Node, algodUrl string, algodToken string, catchpointUrl string, updateCb func(string, float32))

func MustExtractEmbedded

func MustExtractEmbedded(fs embed.FS, path Embedded, progressCb ProgressCb)

func MustExtractEmbeddedPackage

func MustExtractEmbeddedPackage(fs embed.FS, e Embedded, dir string, progressCb ProgressCb)

func MustInstallService

func MustInstallService(name, display, user, password string)

func MustMakeShortcut

func MustMakeShortcut(path string, name string)

func MustRunCommand

func MustRunCommand(path string, args []string, dir string)

func MustRunTemplate

func MustRunTemplate(fs embed.FS, path string, data interface{}, target string)

func MustStartCommand

func MustStartCommand(path string, args []string, dir string)

func MustWaitForSync

func MustWaitForSync(node *algomgr.Node, algodUrl string, algodToken string, catchpointUrl string, updateCb func(string, float32))

func MustWriteConfig

func MustWriteConfig(config Config)

func MustWriteFile

func MustWriteFile(path string, value string)

func RunCommand

func RunCommand(path string, args []string, dir string) error

func RunTemplate

func RunTemplate(fs embed.FS, path string, data interface{}, target string) error

func StartCommand

func StartCommand(path string, args []string, dir string) error

func WriteConfig

func WriteConfig(config Config) error

Types

type ClickBoot

type ClickBoot struct {
	Bin  embed.FS
	Make MakeInstallerFunc
}

type ClickConfig

type ClickConfig struct {
	ClickBoot
	Update   bool
	Elevated bool
	Updater  UpdateFunc
}

type Config

type Config struct {
	Service string `json:"ServiceName"`
}

type Embedded

type Embedded struct {
	Path string
	Url  string

	Sha512Url string
}

type Installer

type Installer interface {
	Self() Embedded
	Run() error
}

type InstallerConfig

type InstallerConfig struct {
	Bin      embed.FS
	Update   bool
	UpdateCb UpdateFunc
	Self     string
}

type InstallerStep

type InstallerStep struct {
	Cb func() error
}

type MakeInstallerFunc

type MakeInstallerFunc func(InstallerConfig) (Installer, error)

type ProgressCb

type ProgressCb func(current, total int64)

type USER_INFO_1

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

type Update

type Update struct {
	Description string
	Progress    float32
}

type UpdateFunc

type UpdateFunc func(s Update) error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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