action

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const STACK = "stack"

Variables

This section is empty.

Functions

func GetFiles

func GetFiles(workdir string, fuzzyPath []string, pathList []string) []string

Types

type ActionHandler

type ActionHandler interface {
	// Pre 执行前准备
	Pre() error

	// Hook 执行
	Hook() (*model.ActionResult, error)

	// Post 执行后清理 (无论执行是否成功,都应该有Post的清理)
	Post() error
}

ActionHandler 执行动作钩子

type ArtifactoryAction

type ArtifactoryAction struct {
	// contains filtered or unexported fields
}

ArtifactoryAction Storage building

func NewArtifactoryAction

func NewArtifactoryAction(step model2.Step, ctx context.Context, output *output.Output) *ArtifactoryAction

func (*ArtifactoryAction) Hook

func (*ArtifactoryAction) Post

func (a *ArtifactoryAction) Post() error

func (*ArtifactoryAction) Pre

func (a *ArtifactoryAction) Pre() error

type CheckAggregationAction

type CheckAggregationAction struct {
	// contains filtered or unexported fields
}

CheckAggregationAction 合约聚合

func NewCheckAggregationAction

func NewCheckAggregationAction(step model.Step, ctx context.Context, output *output.Output) *CheckAggregationAction

func (*CheckAggregationAction) Hook

func (*CheckAggregationAction) Post

func (a *CheckAggregationAction) Post() error

func (*CheckAggregationAction) Pre

func (a *CheckAggregationAction) Pre() error

type DockerEnv

type DockerEnv struct {
	Image string
	// contains filtered or unexported fields
}

func NewDockerEnv

func NewDockerEnv(step model2.Step, ctx context.Context, output *output.Output) *DockerEnv

func (*DockerEnv) Hook

func (e *DockerEnv) Hook() (*model2.ActionResult, error)

func (*DockerEnv) Post

func (e *DockerEnv) Post() error

func (*DockerEnv) Pre

func (e *DockerEnv) Pre() error

type GitAction

type GitAction struct {
	// contains filtered or unexported fields
}

GitAction git clone

func NewGitAction

func NewGitAction(step model2.Step, ctx context.Context, output *output.Output) *GitAction

func (*GitAction) ExecuteCommand

func (a *GitAction) ExecuteCommand(commands []string) (string, error)

func (*GitAction) ExecuteCommandDirect

func (a *GitAction) ExecuteCommandDirect(commands []string) (string, error)

func (*GitAction) ExecuteStringCommand

func (a *GitAction) ExecuteStringCommand(command string) (string, error)

func (*GitAction) Hook

func (a *GitAction) Hook() (*model2.ActionResult, error)

func (*GitAction) Post

func (a *GitAction) Post() error

func (*GitAction) Pre

func (a *GitAction) Pre() error

type InkAction

type InkAction struct {
	// contains filtered or unexported fields
}

func NewInkAction

func NewInkAction(step model.Step, ctx context.Context, output *output.Output) *InkAction

func (*InkAction) ExecuteCommand

func (a *InkAction) ExecuteCommand(commands []string, workdir string) (string, error)

func (*InkAction) ExecuteStringCommand

func (a *InkAction) ExecuteStringCommand(command, workdir string) (string, error)

func (*InkAction) Hook

func (a *InkAction) Hook() (*model.ActionResult, error)

func (*InkAction) Post

func (a *InkAction) Post() error

func (*InkAction) Pre

func (a *InkAction) Pre() error

type IpfsAction

type IpfsAction struct {
	// contains filtered or unexported fields
}

IpfsAction Upload files/directories to ipfs

func NewIpfsAction

func NewIpfsAction(step model2.Step, ctx context.Context, output *output.Output) *IpfsAction

func (*IpfsAction) Hook

func (a *IpfsAction) Hook() (*model2.ActionResult, error)

func (*IpfsAction) Post

func (a *IpfsAction) Post() error

func (*IpfsAction) Pre

func (a *IpfsAction) Pre() error

type IpfsGatewayCloudReq

type IpfsGatewayCloudReq struct {
	UploadID       string `json:"uploadID"`
	UploadFileType string `json:"upload_file_type"`
	UploadType     string `json:"upload_type"`
	Cid            string `json:"cid"`
	Filename       string `json:"filename"`
	ContentType    string `json:"content_type"`
	Size           int    `json:"size"`
	Url            string `json:"url"`
	Status         string `json:"status"`
	Pin            string `json:"pin"`
	Dht            string `json:"dht"`
}

type MythRilAction

type MythRilAction struct {
	// contains filtered or unexported fields
}

MythRilAction mythRil合约检查

func NewMythRilAction

func NewMythRilAction(step model.Step, ctx context.Context, output *output.Output) *MythRilAction

func (*MythRilAction) ExecuteCommand

func (a *MythRilAction) ExecuteCommand(commands []string, workdir string) (string, error)

func (*MythRilAction) Hook

func (a *MythRilAction) Hook() (*model.ActionResult, error)

func (*MythRilAction) Post

func (a *MythRilAction) Post() error

func (*MythRilAction) Pre

func (a *MythRilAction) Pre() error

type PinataIpfsAction

type PinataIpfsAction struct {
	// contains filtered or unexported fields
}

PinataIpfsAction Upload files/directories to ipfs

func NewPinataIpfsAction

func NewPinataIpfsAction(step model.Step, ctx context.Context, output *output.Output) *PinataIpfsAction

func (*PinataIpfsAction) Hook

func (a *PinataIpfsAction) Hook() (*model.ActionResult, error)

func (*PinataIpfsAction) Post

func (a *PinataIpfsAction) Post() error

func (*PinataIpfsAction) Pre

func (a *PinataIpfsAction) Pre() error

type PinataIpfsPinReq

type PinataIpfsPinReq struct {
	IpfsHash  string `json:"IpfsHash"`  //This is the IPFS multi-hash provided back for your content
	PinSize   string `json:"PinSize"`   //This is how large (in bytes) the content you just pinned is
	Timestamp string `json:"timestamp"` //This is the timestamp for your content pinning (represented in ISO 8601 format)
}

type RemoteAction

type RemoteAction struct {
	// contains filtered or unexported fields
}

RemoteAction 执行远程命令

func NewRemoteAction

func NewRemoteAction(step model2.Step, ctx context.Context) *RemoteAction

func (*RemoteAction) Hook

func (a *RemoteAction) Hook() (*model2.ActionResult, error)

func (*RemoteAction) Post

func (a *RemoteAction) Post() error

func (*RemoteAction) Pre

func (a *RemoteAction) Pre() error

type ShellAction

type ShellAction struct {
	// contains filtered or unexported fields
}

ShellAction 命令工作

func NewShellAction

func NewShellAction(step model2.Step, ctx context.Context, output *output.Output) *ShellAction

func (*ShellAction) Hook

func (a *ShellAction) Hook() (*model2.ActionResult, error)

func (*ShellAction) Post

func (a *ShellAction) Post() error

func (*ShellAction) Pre

func (a *ShellAction) Pre() error

type SlitherAction

type SlitherAction struct {
	// contains filtered or unexported fields
}

SlitherAction slither合约检查

func NewSlitherAction

func NewSlitherAction(step model.Step, ctx context.Context, output *output.Output) *SlitherAction

func (*SlitherAction) ExecuteCommand

func (a *SlitherAction) ExecuteCommand(commands []string, workdir string) (string, error)

func (*SlitherAction) Hook

func (a *SlitherAction) Hook() (*model.ActionResult, error)

func (*SlitherAction) Post

func (a *SlitherAction) Post() error

func (*SlitherAction) Pre

func (a *SlitherAction) Pre() error

type SolHintAction

type SolHintAction struct {
	// contains filtered or unexported fields
}

SolHintAction SolHint合约检查

func NewSolHintAction

func NewSolHintAction(step model.Step, ctx context.Context, output *output.Output) *SolHintAction

func (*SolHintAction) ExecuteCommand

func (a *SolHintAction) ExecuteCommand(commands []string, workdir string) (string, error)

func (*SolHintAction) Hook

func (a *SolHintAction) Hook() (*model.ActionResult, error)

func (*SolHintAction) Post

func (a *SolHintAction) Post() error

func (*SolHintAction) Pre

func (a *SolHintAction) Pre() error

type SolProfilerAction

type SolProfilerAction struct {
	// contains filtered or unexported fields
}

SolProfilerAction SolProfiler合约检查

func NewSolProfilerAction

func NewSolProfilerAction(step model.Step, ctx context.Context, output *output.Output) *SolProfilerAction

func (*SolProfilerAction) ExecuteCommand

func (a *SolProfilerAction) ExecuteCommand(commands []string, workdir string) (string, error)

func (*SolProfilerAction) Hook

func (a *SolProfilerAction) Hook() (*model.ActionResult, error)

func (*SolProfilerAction) Post

func (a *SolProfilerAction) Post() error

func (*SolProfilerAction) Pre

func (a *SolProfilerAction) Pre() error

type WorkdirAction

type WorkdirAction struct {
	// contains filtered or unexported fields
}

func NewWorkdirAction

func NewWorkdirAction(step model2.Step, ctx context.Context, output *output.Output) *WorkdirAction

func (*WorkdirAction) Hook

func (a *WorkdirAction) Hook() (*model2.ActionResult, error)

Hook 执行

func (*WorkdirAction) Post

func (a *WorkdirAction) Post() error

Post 执行后清理 (无论执行是否成功,都应该有Post的清理)

func (*WorkdirAction) Pre

func (a *WorkdirAction) Pre() error

Jump to

Keyboard shortcuts

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