step

package
v0.11.31 Latest Latest
Warning

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

Go to latest
Published: May 28, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateBase = newBase

Functions

func NewCmdStepCfg

func NewCmdStepCfg() *cmd.Cfg

func NewPipelineCfg

func NewPipelineCfg() *pipeline.Cfg

Types

type Cfg

type Cfg struct {
	Type Type `json:"type" validate:"required" yaml:"type"`
	Cfg  any  `json:"cfg"  validate:"required" yaml:"cfg"`
}

func (*Cfg) UnmarshalJSON

func (s *Cfg) UnmarshalJSON(data []byte) error

func (*Cfg) UnmarshalYAML

func (s *Cfg) UnmarshalYAML(data []byte) error

type CmdStep

type CmdStep struct {
	Step
	*cmd.Cfg
	// contains filtered or unexported fields
}

func NewCmdStep

func NewCmdStep() *CmdStep

func (*CmdStep) BeforeStart added in v0.11.2

func (c *CmdStep) BeforeStart(f ...func(cmd *exec.Cmd))

func (*CmdStep) Init

func (c *CmdStep) Init() error

func (*CmdStep) SetCfg added in v0.11.2

func (c *CmdStep) SetCfg(cfg any)

func (*CmdStep) Start

func (c *CmdStep) Start() error

func (*CmdStep) Stop

func (c *CmdStep) Stop() error

type FtpStep

type FtpStep struct {
	Step
	*FtpStepCfg
	// contains filtered or unexported fields
}

func NewFtpStep

func NewFtpStep() *FtpStep

func (*FtpStep) Init

func (f *FtpStep) Init() error

func (*FtpStep) Start

func (f *FtpStep) Start() error

func (*FtpStep) Stop

func (f *FtpStep) Stop() error

type FtpStepCfg

type FtpStepCfg struct {
	Addr    string `json:"addr"    yaml:"addr" validate:"required"`
	User    string `json:"user"    yaml:"user" validate:"required"`
	Pwd     string `json:"pwd"     yaml:"pwd"`
	Timeout int    `json:"timeout" yaml:"timeout"`
	Retry   int    `json:"retry"   yaml:"retry"`

	Cmd  string   `json:"cmd"     yaml:"cmd"     validate:"required"`
	Args []string `json:"args"    yaml:"args"`
}

func NewFtpStepCfg

func NewFtpStepCfg() *FtpStepCfg

type PipelineStep

type PipelineStep struct {
	Step
	*pipeline.Cfg
	// contains filtered or unexported fields
}

func NewPipelineStep

func NewPipelineStep() *PipelineStep

func (*PipelineStep) Init

func (p *PipelineStep) Init() error

func (*PipelineStep) Pipeline added in v0.11.0

func (p *PipelineStep) Pipeline() *pipeline.Pipeline

func (*PipelineStep) SetCfg added in v0.11.0

func (p *PipelineStep) SetCfg(cfg any)

func (*PipelineStep) Start

func (p *PipelineStep) Start() error

func (*PipelineStep) Stop

func (p *PipelineStep) Stop() error

type SSHStep

type SSHStep struct {
	Step
	*SSHStepCfg
	// contains filtered or unexported fields
}

func NewSSHStep

func NewSSHStep() *SSHStep

func (*SSHStep) Init

func (s *SSHStep) Init() error

func (*SSHStep) Start

func (s *SSHStep) Start() error

func (*SSHStep) Stop

func (s *SSHStep) Stop() error

type SSHStepCfg

type SSHStepCfg struct {
	Addr       string `json:"addr"       yaml:"addr" validate:"required"`
	User       string `json:"user"       yaml:"user" validate:"required"`
	Pwd        string `json:"pwd"        yaml:"pwd"  validate:"required"`
	PrivateKey string `json:"privateKey" yaml:"privateKey"`
	Timeout    int    `json:"timeout"    yaml:"timeout"`

	Cmd []string `json:"cmd"  yaml:"cmd" validate:"required"`
}

func NewSSHStepCfg

func NewSSHStepCfg() *SSHStepCfg

type Step

type Step interface {
	runner.Runner
	plugin.Plugin
}

type Type

type Type string
const TypeCmd Type = "cmd"
const TypeFtp Type = "ftp"
const TypePipeline Type = "pipeline"
const TypeSSH Type = "ssh"

Jump to

Keyboard shortcuts

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