actions

package
v0.0.0-...-70df4e6 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionHTTP = "http"
)
View Source
const (
	ActionKeySSH = "ssh"
)
View Source
const (
	ActionKeyWait = "ff-waiting"
)

Variables

This section is empty.

Functions

func ParseDuration

func ParseDuration(durationStr string) (time.Duration, error)

ParseDuration

func VerifyHost

func VerifyHost(host string, remote net.Addr, key ssh.PublicKey) error

Types

type HTTP

type HTTP struct {
}

func (*HTTP) Name

func (h *HTTP) Name() string

Name Action name

func (*HTTP) ParameterNew

func (h *HTTP) ParameterNew() interface{}

ParameterNew

func (*HTTP) Run

func (h *HTTP) Run(ctx run.ExecuteContext, params interface{}) (err error)

Run

type HTTPParams

type HTTPParams struct {
	Method    string            `yaml:"method" json:"method"`
	URL       string            `yaml:"url" json:"url"`
	RawBody   string            `yaml:"rawBody" json:"rawBody"`
	Header    map[string]string `yaml:"header" json:"header"`
	BasicAuth map[string]string `yaml:"basicauth" json:"basicauth"`
	AuthToken string            `yaml:"authtoken" json:"authtoken"`
}

type SSH

type SSH struct {
}

func (*SSH) Name

func (s *SSH) Name() string

func (*SSH) ParameterNew

func (s *SSH) ParameterNew() interface{}

ParameterNew

func (*SSH) Run

func (s *SSH) Run(ctx run.ExecuteContext, params interface{}) (err error)

Run

type SSHParams

type SSHParams struct {
	User    string `json:"user"`
	Ip      string `json:"ip"`
	Port    uint   `json:"port"`
	Key     string `json:"key"`
	Cmd     string `json:"cmd"`
	Timeout int    `json:"timeout"`
}

type Waiting

type Waiting struct {
}

Waiting action

func (*Waiting) Name

func (s *Waiting) Name() string

Name

func (*Waiting) ParameterNew

func (s *Waiting) ParameterNew() interface{}

ParameterNew

func (*Waiting) Run

func (s *Waiting) Run(ctx run.ExecuteContext, params interface{}) error

Run

type WaitingParams

type WaitingParams struct {
	// Support "d|h|m|s|ms" such as 1h mean 1hours
	WaitingTime string `json:"waitingTime"`
}

WaitingParams

Jump to

Keyboard shortcuts

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