operation

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidOperation = errors.New("invalid operation")

Functions

func MakeErrInvalidOperation

func MakeErrInvalidOperation(in Input) error

Types

type Input

type Input struct {
	Name string `yaml:"name"`
	Role string `yaml:"role"`

	Shell string `yaml:"shell"`

	Copy   string `yaml:"copy"`
	To     string `yaml:"to"`
	Backup bool   `yaml:"backup"`
	Mode   string `yaml:"mode"`
	Owner  string `yaml:"owner"`
}

type OpCopy

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

func NewOpCopy

func NewOpCopy(in Input) (*OpCopy, error)

func (OpCopy) DefaultName added in v0.0.13

func (op OpCopy) DefaultName() string

func (OpCopy) Execute

func (op OpCopy) Execute(r *remote.Remote) (*gtypes.OrderedMap[string, string], error)

func (OpCopy) Name

func (op OpCopy) Name() string

func (OpCopy) Role

func (op OpCopy) Role() string

func (*OpCopy) SetName

func (op *OpCopy) SetName(name string)

func (*OpCopy) SetRole

func (op *OpCopy) SetRole(role string)

type OpShell

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

func NewOpShell

func NewOpShell(in Input) (*OpShell, error)

func (OpShell) DefaultName added in v0.0.13

func (op OpShell) DefaultName() string

func (OpShell) Execute

func (op OpShell) Execute(r *remote.Remote) (*gtypes.OrderedMap[string, string], error)

func (OpShell) Name

func (op OpShell) Name() string

func (OpShell) Role

func (op OpShell) Role() string

func (*OpShell) SetName

func (op *OpShell) SetName(name string)

func (*OpShell) SetRole

func (op *OpShell) SetRole(role string)

type Operation

type Operation interface {
	Execute(r *remote.Remote) (*gtypes.OrderedMap[string, string], error)
	DefaultName() string
	// contains filtered or unexported methods
}

func GetOperation

func GetOperation(in Input) (Operation, error)

Jump to

Keyboard shortcuts

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