Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecutionFile ¶
type ExecutionFile struct {
Path string
Timeout int
Retry int
Platform string
WorkDirectory string
TransactionMode string // For SQL executor
}
ExecutionFile represents a file to be executed
type ExecutionResult ¶
type ExecutionResult struct {
Success bool
Output string
Error error
Duration int64 // in milliseconds
}
ExecutionResult represents the result of executing a file
type SQLConfig ¶
type SQLConfig struct {
Driver string `mapstructure:"driver"`
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Database string `mapstructure:"database"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
SSLMode string `mapstructure:"sslmode"`
}
SQLConfig represents the configuration for SQL executor
type SQLExecutor ¶
type SQLExecutor struct {
// contains filtered or unexported fields
}
SQLExecutor implements the Executor interface for SQL scripts
func (*SQLExecutor) Clone ¶
func (e *SQLExecutor) Clone() *SQLExecutor
Clone creates a new instance of SQLExecutor with the same configuration
func (*SQLExecutor) Close ¶
func (e *SQLExecutor) Close() error
Close closes the database connection
func (*SQLExecutor) Execute ¶
func (e *SQLExecutor) Execute(ctx context.Context, file ExecutionFile) (*ExecutionResult, error)
Execute executes the SQL file
func (*SQLExecutor) Name ¶
func (e *SQLExecutor) Name() string
Name returns the name of this executor
func (*SQLExecutor) Validate ¶
func (e *SQLExecutor) Validate(config map[string]interface{}) error
Validate validates the configuration
type SQLStepConfig ¶
type SQLStepConfig struct {
Transaction bool `mapstructure:"transaction"`
SkipIf string `mapstructure:"skip_if"`
}
SQLStepConfig represents step-specific configuration
type ShellExecutor ¶
type ShellExecutor struct {
// contains filtered or unexported fields
}
ShellExecutor executes shell scripts
func NewShellExecutor ¶
func NewShellExecutor() *ShellExecutor
NewShellExecutor creates a new shell executor
func (*ShellExecutor) Execute ¶
func (e *ShellExecutor) Execute(ctx context.Context, file ExecutionFile) (*ExecutionResult, error)
Execute executes a shell script
func (*ShellExecutor) Validate ¶
func (e *ShellExecutor) Validate(config map[string]interface{}) error
Validate validates the executor configuration