script

package
v0.0.0-...-5c30f4a Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Printf(format string, v ...interface{})
}
var Log Logger = &StdoutLogger{}

type ProgressFunc

type ProgressFunc func(expected int, completed int, msg string)

type Script

type Script struct {
	Category string // taken from subdirectory
	Name     string
	Desc     string
	// contains filtered or unexported fields
}

func LoadScripts

func LoadScripts(dir string) ([]*Script, error)

LoadScripts loads a directory of scripts. Subdirectories are used to populate the script category field.

func (*Script) Run

func (s *Script) Run(store *store.Store, progress ProgressFunc) error

Apply script to a store

type StdoutLogger

type StdoutLogger struct{}

func (*StdoutLogger) Printf

func (l *StdoutLogger) Printf(format string, v ...interface{})

Jump to

Keyboard shortcuts

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