step

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEMP_DIR       = "/tmp"
	REGEX_KV_SPLIT = "^(([^%s]+)%s\\s*)([^\\s#]*)" // key: mu[2] value: mu[3]
)
View Source
const (
	ERR_NOT_MOUNTED          = "not mounted"
	ERR_MOUNTPOINT_NOT_FOUND = "mountpoint not found"
	ERROR_DEVICE_BUSY        = "Device or resource busy"
)

Variables

This section is empty.

Functions

func PostHandle added in v0.1.0

func PostHandle(Success *bool, Out *string, out string, err error, ec *errno.ErrorCode) error

Types

type BlockId added in v0.3.0

type BlockId struct {
	Device   string
	Format   string
	MatchTag string
	Success  *bool
	Out      *string
	module.ExecOptions
}

func (*BlockId) Execute added in v0.3.0

func (s *BlockId) Execute(ctx *context.Context) error

type Cat added in v0.1.0

type Cat struct {
	Files   []string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*Cat) Execute added in v0.1.0

func (s *Cat) Execute(ctx *context.Context) error

type Command added in v0.1.0

type Command struct {
	Command string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*Command) Execute added in v0.1.0

func (s *Command) Execute(ctx *context.Context) error

type ContainerExec

type ContainerExec struct {
	ContainerId *string
	Command     string
	Success     *bool
	Out         *string
	module.ExecOptions
}

func (*ContainerExec) Execute

func (s *ContainerExec) Execute(ctx *context.Context) error

type ContainerLogs added in v0.1.0

type ContainerLogs struct {
	ContainerId string
	Out         *string
	Success     *bool
	module.ExecOptions
}

func (*ContainerLogs) Execute added in v0.1.0

func (s *ContainerLogs) Execute(ctx *context.Context) error

type CopyFile added in v0.1.0

type CopyFile struct {
	Source    string
	Dest      string
	NoClobber bool // do not overwrite an existing file
	Out       *string
	module.ExecOptions
}

func (*CopyFile) Execute added in v0.1.0

func (s *CopyFile) Execute(ctx *context.Context) error

type CopyFromContainer

type CopyFromContainer struct {
	ContainerId      string
	ContainerSrcPath string
	HostDestPath     string
	Out              *string
	module.ExecOptions
}

func (*CopyFromContainer) Execute

func (s *CopyFromContainer) Execute(ctx *context.Context) error

type CopyIntoContainer

type CopyIntoContainer struct {
	HostSrcPath       string
	ContainerId       string
	ContainerDestPath string
	Out               *string
	module.ExecOptions
}

func (*CopyIntoContainer) Execute

func (s *CopyIntoContainer) Execute(ctx *context.Context) error

type CreateAndUploadDir added in v0.3.0

type CreateAndUploadDir struct {
	HostDirName       string
	ContainerDestId   *string
	ContainerDestPath string
	module.ExecOptions
}

func (*CreateAndUploadDir) Execute added in v0.3.0

func (s *CreateAndUploadDir) Execute(ctx *context.Context) error

type CreateContainer

type CreateContainer struct {
	Image             string
	Command           string
	AddHost           []string
	Devices           []string
	Entrypoint        string
	Envs              []string
	Hostname          string
	Init              bool
	LinuxCapabilities []string
	Mount             string
	Name              string
	Network           string
	User              string
	Pid               string
	Publish           string
	Privileged        bool
	Remove            bool // automatically remove the container when it exits
	Restart           string
	SecurityOptions   []string
	Ulimits           []string
	Volumes           []Volume
	Out               *string
	module.ExecOptions
}

func (*CreateContainer) Execute

func (s *CreateContainer) Execute(ctx *context.Context) error

type CreateDirectory

type CreateDirectory struct {
	Paths   []string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*CreateDirectory) Execute

func (s *CreateDirectory) Execute(ctx *context.Context) error

type CreateFilesystem

type CreateFilesystem struct {
	Device string
	Out    *string
	module.ExecOptions
}

func (*CreateFilesystem) Execute

func (s *CreateFilesystem) Execute(ctx *context.Context) error

type Curl added in v0.1.0

type Curl struct {
	Url      string
	Form     string
	Insecure bool
	Output   string
	Silent   bool
	Success  *bool
	Out      *string
	module.ExecOptions
}

func (*Curl) Execute added in v0.1.0

func (s *Curl) Execute(ctx *context.Context) error

type Date added in v0.1.0

type Date struct {
	Format string
	Out    *string
	module.ExecOptions
}

func (*Date) Execute added in v0.1.0

func (s *Date) Execute(ctx *context.Context) error

type DownloadFile added in v0.1.0

type DownloadFile struct {
	RemotePath string
	LocalPath  string
	module.ExecOptions
}

func (*DownloadFile) Execute added in v0.1.0

func (s *DownloadFile) Execute(ctx *context.Context) error

type Dpkg added in v0.1.0

type Dpkg struct {
	Install string
	Purge   string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*Dpkg) Execute added in v0.1.0

func (s *Dpkg) Execute(ctx *context.Context) error

type EngineInfo added in v0.3.0

type EngineInfo struct {
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*EngineInfo) Execute added in v0.3.0

func (s *EngineInfo) Execute(ctx *context.Context) error

type Filter

type Filter struct {
	KVFieldSplit string
	Mutate       Mutate
	Input        *string
	Output       *string
}

func (*Filter) Execute

func (s *Filter) Execute(ctx *context.Context) error

type Fuser

type Fuser struct {
	Names []string
	Out   *string
	module.ExecOptions
}

func (*Fuser) Execute

func (s *Fuser) Execute(ctx *context.Context) error

type Hostname added in v0.1.0

type Hostname struct {
	Success *bool
	Out     *string
	module.ExecOptions
}

other

func (*Hostname) Execute added in v0.1.0

func (s *Hostname) Execute(ctx *context.Context) error

other

type InspectContainer

type InspectContainer struct {
	ContainerId string
	Format      string
	Out         *string
	Success     *bool
	module.ExecOptions
}

func (*InspectContainer) Execute

func (s *InspectContainer) Execute(ctx *context.Context) error

type InstallFile

type InstallFile struct {
	Content           *string
	HostDestPath      string
	ContainerId       *string
	ContainerDestPath string
	module.ExecOptions
}

func (*InstallFile) Execute

func (s *InstallFile) Execute(ctx *context.Context) error

type Lambda added in v0.1.0

type Lambda struct {
	Lambda LambdaType
}

func (*Lambda) Execute added in v0.1.0

func (s *Lambda) Execute(ctx *context.Context) error

type LambdaType added in v0.1.0

type LambdaType func(ctx *context.Context) error

type List added in v0.1.0

type List struct {
	Files []string
	Out   *string
	module.ExecOptions
}

storage (filesystem/block)

func (*List) Execute added in v0.1.0

func (s *List) Execute(ctx *context.Context) error

type ListBlockDevice added in v0.1.0

type ListBlockDevice struct {
	Device     []string
	Format     string
	NoHeadings bool
	Success    *bool
	Out        *string
	module.ExecOptions
}

func (*ListBlockDevice) Execute added in v0.1.0

func (s *ListBlockDevice) Execute(ctx *context.Context) error

type ListContainers

type ListContainers struct {
	Format  string
	Filter  string
	Quiet   bool // Only display numeric IDs
	ShowAll bool // Show all containers (default shows just running)
	Out     *string
	module.ExecOptions
}

func (*ListContainers) Execute

func (s *ListContainers) Execute(ctx *context.Context) error

type ModInfo added in v0.1.0

type ModInfo struct {
	Name    string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*ModInfo) Execute added in v0.1.0

func (s *ModInfo) Execute(ctx *context.Context) error

type ModProbe added in v0.1.0

type ModProbe struct {
	Name    string
	Args    []string
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*ModProbe) Execute added in v0.1.0

func (s *ModProbe) Execute(ctx *context.Context) error

type MountFilesystem

type MountFilesystem struct {
	Source    string
	Directory string
	Out       *string
	module.ExecOptions
}

func (*MountFilesystem) Execute

func (s *MountFilesystem) Execute(ctx *context.Context) error

type Mutate

type Mutate func(string, string, string) (string, error)

type Ping added in v0.1.0

type Ping struct {
	Destination *string
	Count       int
	Timeout     int
	Success     *bool
	Out         *string
	module.ExecOptions
}

func (*Ping) Execute added in v0.1.0

func (s *Ping) Execute(ctx *context.Context) error

type PullImage

type PullImage struct {
	Image string
	Out   *string
	module.ExecOptions
}

func (*PullImage) Execute

func (s *PullImage) Execute(ctx *context.Context) error

type ReadFile

type ReadFile struct {
	HostSrcPath      string
	ContainerId      string
	ContainerSrcPath string
	Content          *string
	module.ExecOptions
}

func (*ReadFile) Execute

func (s *ReadFile) Execute(ctx *context.Context) error

type RemoveContainer

type RemoveContainer struct {
	ContainerId string
	Success     *bool
	Out         *string
	module.ExecOptions
}

func (*RemoveContainer) Execute

func (s *RemoveContainer) Execute(ctx *context.Context) error

type RemoveFile

type RemoveFile struct {
	Files []string
	Out   *string
	module.ExecOptions
}

func (*RemoveFile) Execute

func (s *RemoveFile) Execute(ctx *context.Context) error

type RestartContainer

type RestartContainer struct {
	ContainerId string
	Out         *string
	module.ExecOptions
}

func (*RestartContainer) Execute

func (s *RestartContainer) Execute(ctx *context.Context) error

type Rpm added in v0.1.0

type Rpm struct {
	Hash    bool
	Install string
	NoDeps  bool
	Verbose bool
	Success *bool
	Out     *string
	module.ExecOptions
}

func (*Rpm) Execute added in v0.1.0

func (s *Rpm) Execute(ctx *context.Context) error

type Scp added in v0.2.0

type Scp struct {
	Content    *string
	Mode       int
	RemotePath string
	module.ExecOptions
}

func (*Scp) Execute added in v0.2.0

func (s *Scp) Execute(ctx *context.Context) error

type Sed added in v0.1.0

type Sed struct {
	Files      []string
	Expression *string
	InPlace    bool
	Out        *string
	module.ExecOptions
}

text

func (*Sed) Execute added in v0.1.0

func (s *Sed) Execute(ctx *context.Context) error

type ShowDiskFree

type ShowDiskFree struct {
	Files  []string
	Format string
	Out    *string
	module.ExecOptions
}

see also: https://linuxize.com/post/how-to-check-disk-space-in-linux-using-the-df-command/#output-format

func (*ShowDiskFree) Execute

func (s *ShowDiskFree) Execute(ctx *context.Context) error

type SocketStatistics added in v0.1.0

type SocketStatistics struct {
	Filter    string
	Listening bool // display listening sockets
	NoHeader  bool // Suppress header line
	Success   *bool
	Out       *string
	module.ExecOptions
}

network

func (*SocketStatistics) Execute added in v0.1.0

func (s *SocketStatistics) Execute(ctx *context.Context) error

network

type StartContainer

type StartContainer struct {
	ContainerId *string
	Success     *bool
	Out         *string
	module.ExecOptions
}

func (*StartContainer) Execute

func (s *StartContainer) Execute(ctx *context.Context) error

type Stat added in v0.1.0

type Stat struct {
	Files  []string
	Format string
	Out    *string
	module.ExecOptions
}

func (*Stat) Execute added in v0.1.0

func (s *Stat) Execute(ctx *context.Context) error

type StopContainer

type StopContainer struct {
	ContainerId string
	Time        int
	Out         *string
	module.ExecOptions
}

func (*StopContainer) Execute

func (s *StopContainer) Execute(ctx *context.Context) error

type SyncFile

type SyncFile struct {
	ContainerSrcId    *string
	ContainerSrcPath  string
	ContainerDestId   *string
	ContainerDestPath string
	KVFieldSplit      string
	Mutate            func(string, string, string) (string, error)
	module.ExecOptions
}

func (*SyncFile) Execute

func (s *SyncFile) Execute(ctx *context.Context) error

type SyncFileDirectly added in v0.3.0

type SyncFileDirectly struct {
	ContainerSrcId    *string
	ContainerSrcPath  string
	ContainerDestId   *string
	ContainerDestPath string
	IsDir             bool
	module.ExecOptions
}

func (*SyncFileDirectly) Execute added in v0.3.0

func (s *SyncFileDirectly) Execute(ctx *context.Context) error

type Tar added in v0.1.0

type Tar struct {
	File            string
	Archive         string // -f
	Create          bool   // -c
	Directory       string // -C
	Extract         bool   // -x
	StripComponents int
	Gzip            bool // -z
	UnGzip          bool // -z
	Verbose         bool // -v
	Success         *bool
	Out             *string
	module.ExecOptions
}

func (*Tar) Execute added in v0.1.0

func (s *Tar) Execute(ctx *context.Context) error

type TrySyncFile added in v0.3.0

type TrySyncFile struct {
	ContainerSrcId    *string
	ContainerSrcPath  string
	ContainerDestId   *string
	ContainerDestPath string
	KVFieldSplit      string
	Mutate            func(string, string, string) (string, error)
	module.ExecOptions
}

func (*TrySyncFile) Execute added in v0.3.0

func (s *TrySyncFile) Execute(ctx *context.Context) error

type Tune2FS added in v0.3.0

type Tune2FS struct {
	Device                   string
	ReservedBlocksPercentage string
	Success                  *bool
	Out                      *string
	module.ExecOptions
}

func (*Tune2FS) Execute added in v0.3.0

func (s *Tune2FS) Execute(ctx *context.Context) error

type UmountFilesystem

type UmountFilesystem struct {
	Directorys     []string
	IgnoreUmounted bool
	IgnoreNotFound bool
	Out            *string
	module.ExecOptions
}

func (*UmountFilesystem) Execute

func (s *UmountFilesystem) Execute(ctx *context.Context) error

type UnixName added in v0.1.0

type UnixName struct {
	KernelRelease bool
	Out           *string
	module.ExecOptions
}

func (*UnixName) Execute added in v0.1.0

func (s *UnixName) Execute(ctx *context.Context) error

type Volume

type Volume struct {
	HostPath      string
	ContainerPath string
}

type WaitContainer

type WaitContainer struct {
	ContainerId string
	Out         *string
	module.ExecOptions
}

func (*WaitContainer) Execute

func (s *WaitContainer) Execute(ctx *context.Context) error

type Whoami added in v0.1.0

type Whoami struct {
	Success *bool
	Out     *string
	module.ExecOptions
}

kernel

func (*Whoami) Execute added in v0.1.0

func (s *Whoami) Execute(ctx *context.Context) error

kernel

Jump to

Keyboard shortcuts

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