{"modulePath":"github.com/SphereStacking/plexr","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package executors\n\n## Types\n\n```go\ntype ExecutionFile struct {\n\tPath            string\n\tTimeout         int\n\tRetry           int\n\tPlatform        string\n\tWorkDirectory   string\n\tTransactionMode string // For SQL executor\n}\n```\nExecutionFile represents a file to be executed\n\n```go\ntype ExecutionResult struct {\n\tSuccess  bool\n\tOutput   string\n\tError    error\n\tDuration int64 // in milliseconds\n}\n```\nExecutionResult represents the result of executing a file\n\n```go\ntype SQLConfig struct {\n\tDriver   string `mapstructure:\"driver\"`\n\tHost     string `mapstructure:\"host\"`\n\tPort     int    `mapstructure:\"port\"`\n\tDatabase string `mapstructure:\"database\"`\n\tUsername string `mapstructure:\"username\"`\n\tPassword string `mapstructure:\"password\"`\n\tSSLMode  string `mapstructure:\"sslmode\"`\n}\n```\nSQLConfig represents the configuration for SQL executor\n\n```go\ntype SQLExecutor struct {\n\t// contains filtered or unexported fields\n}\n```\nSQLExecutor implements the Executor interface for SQL scripts\n\n```go\nfunc NewSQLExecutor() *SQLExecutor\n```\nNewSQLExecutor creates a new SQL executor\n\n```go\nfunc (e *SQLExecutor) Clone() *SQLExecutor\n```\nClone creates a new instance of SQLExecutor with the same configuration\n\n```go\nfunc (e *SQLExecutor) Close() error\n```\nClose closes the database connection\n\n```go\nfunc (e *SQLExecutor) Execute(ctx context.Context, file ExecutionFile) (*ExecutionResult, error)\n```\nExecute executes the SQL file\n\n```go\nfunc (e *SQLExecutor) Name() string\n```\nName returns the name of this executor\n\n```go\nfunc (e *SQLExecutor) Validate(config map[string]interface{}) error\n```\nValidate validates the configuration\n\n```go\ntype SQLStepConfig struct {\n\tTransaction bool   `mapstructure:\"transaction\"`\n\tSkipIf      string `mapstructure:\"skip_if\"`\n}\n```\nSQLStepConfig represents step-specific configuration\n\n```go\ntype ShellExecutor struct {\n\t// contains filtered or unexported fields\n}\n```\nShellExecutor executes shell scripts\n\n```go\nfunc NewShellExecutor() *ShellExecutor\n```\nNewShellExecutor creates a new shell executor\n\n```go\nfunc (e *ShellExecutor) Execute(ctx context.Context, file ExecutionFile) (*ExecutionResult, error)\n```\nExecute executes a shell script\n\n```go\nfunc (e *ShellExecutor) Name() string\n```\nName returns the executor name\n\n```go\nfunc (e *ShellExecutor) Validate(config map[string]interface{}) error\n```\nValidate validates the executor configuration\n\n","path":"github.com/SphereStacking/plexr/internal/executors","name":"executors","synopsis":"","isRedistributable":true}
