sh

package
v0.0.0-...-346b5b1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Out

func Out(v interface{})

func PrintJson

func PrintJson(v interface{})

func PrintYaml

func PrintYaml(v interface{})

Types

type Callback

type Callback func(stdin io.WriteCloser) error

type SshAction

type SshAction struct {
	Name   string     `yaml:"name"`
	Single bool       `yaml:"single,omitempty"`
	Group  string     `yaml:"group,omitempty"`
	Detail HostDetail `yaml:"detail,omitempty"`
	Steps  []Step     `yaml:"steps"`
}

func (*SshAction) Do

func (s *SshAction) Do() SshActionResult

type SshActionResult

type SshActionResult struct {
	Name       string
	Target     string
	StepResult map[string][]SshResponse
	Err        error
}

type SshResponse

type SshResponse struct {
	Address string
	Stdout  string
	Stderr  string
	Err     error
	Status  []string
}

type SshTask

type SshTask struct {
	Name       string      `yaml:"name"`
	SshActions []SshAction `yaml:"actions"`
}

func (SshTask) Do

func (s SshTask) Do() SshTaskResult

type SshTaskResult

type SshTaskResult struct {
	Name             string
	SshActionResults []SshActionResult
	Err              error
}

type Step

type Step struct {
	Type string `yaml:"type"` // command/copy

	// for command
	Commands []string `yaml:"commands"`
	Su       bool     `yaml:"su"`

	// for copy
	Direction string `yaml:"direction"` // upload/download
	Local     string `yaml:"local"`
	Remote    string `yaml:"remote"`
}

Jump to

Keyboard shortcuts

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