actions

package
v0.0.0-...-d99f4a2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const BackupDir = "/tmp/backup"

Variables

View Source
var PackageFiles embed.FS

Functions

func CheckGroupCoreBinaries

func CheckGroupCoreBinaries(timeout int) (map[string]bool, error)

func CheckUserCoreBinaries

func CheckUserCoreBinaries(timeout int) (map[string]bool, error)

func CopyDirectory

func CopyDirectory(srcDir, dest string, perm string, owner string, group string, srcType string) error

func CopyFile

func CopyFile(src, dest, perm, srcType string) error
func CopySymLink(source, dest string) error

func CreateIfNotExists

func CreateIfNotExists(dir string, perm string) error

func Exists

func Exists(filePath string) bool

func GetHashOfFile

func GetHashOfFile(filePath string) string

func NewFileVar

func NewFileVar(data map[string]interface{}) (*fileVar, error)

func NewSystemDVar

func NewSystemDVar(data map[string]interface{}) (*systemDVar, error)

func NewWhen

func NewWhen(expression string, rvar string, expected int, timeout int) *whenConditional

func Restore

func Restore(src, dest, perm, srcType string) error

Types

type Action

type Action interface {
	Do(actions *parser.Action, wizardLog chan interface{}) error
}

func NewCmdAction

func NewCmdAction(timeout int, localRegister string) Action

func NewCopyAction

func NewCopyAction(agentName string, timeout int, localRegister string) Action

func NewFileAction

func NewFileAction(agentName string, timeout int, register string) Action

func NewSystemDAction

func NewSystemDAction(timeout int, register string) Action

func NewTemplateAction

func NewTemplateAction(agentName string, config interface{}, wizardFacts map[string]interface{}, timeout int, localRegister string) Action

func NewUserAction

func NewUserAction(timeout int, localRegister string) Action

type Hash

type Hash func(files []string, open func(string) (io.ReadCloser, error)) (string, error)

A Hash is a directory hash function. It accepts a list of files along with a function that opens the content of each file. It opens, reads, hashes, and closes each file and returns the overall directory hash.

Directories

Path Synopsis
Package mock_actions is a generated GoMock package.
Package mock_actions is a generated GoMock package.

Jump to

Keyboard shortcuts

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