cmds

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MSG_INDEX_NOT_FOUND = "Index not found"
	MSG_INVALID_TYPE    = "Invalid type"
	MSG_FILE_NOT_FOUND  = "File not found"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd struct {
	Name string
	Args []string
}

type Stage

type Stage struct {
	Id          string
	Name        string
	Description string
	Steps       []*Step
}

func Load

func Load(fileName string) (*Stage, error)

func NewStage

func NewStage(name, description string) *Stage

* * NewStage * @parms name * @parms description * @return *Stage *

func (*Stage) AppendStep

func (s *Stage) AppendStep(step *Step) *Stage

* * AppendStep * @parms name * @parms description * @return *Stage *

type Step

type Step struct {
	Id          string
	Name        string
	Description string
	Commands    []*Cmd
}

func NewStep

func NewStep(name, description string) *Step

* * NewStep * @parms name * @parms description * @return *Cmds *

func (*Step) AppendCmd

func (s *Step) AppendCmd(args string) *Step

* * AppendCmd * @parms args string * @return *Step *

func (*Step) RunOS

func (s *Step) RunOS(idx int, args et.Json) ([]byte, error)

* * RunOS * @parms idx int * @parms args et.Json * @return []byte * @return error *

func (*Step) RunSSH

func (s *Step) RunSSH(idx int, args et.Json) ([]byte, error)

* * RunSSH * @parms idx int * @parms args et.Json * @return []byte * @return error *

Jump to

Keyboard shortcuts

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