driver

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Closeable

type Closeable interface {
	Close()
}

Closeable represents a driver that holds resources.

type GenericSQLDriver

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

GenericSQLDriver executes database operations using database/sql. Used for MySQL and SQLite.

func NewMySQLDriver

func NewMySQLDriver(name, dsn string) *GenericSQLDriver

NewMySQLDriver creates a MySQL driver for the given named database.

func NewSQLiteDriver

func NewSQLiteDriver(name, dsn string) *GenericSQLDriver

NewSQLiteDriver creates a SQLite driver for the given named database.

func (*GenericSQLDriver) Close

func (d *GenericSQLDriver) Close()

Close cleans up the database connection.

func (*GenericSQLDriver) Execute

func (d *GenericSQLDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*GenericSQLDriver) Name

func (d *GenericSQLDriver) Name() string

type HTTPDriver

type HTTPDriver struct{}

HTTPDriver executes HTTP API calls.

func (*HTTPDriver) Execute

func (d *HTTPDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*HTTPDriver) Name

func (d *HTTPDriver) Name() string

type KafkaDriver

type KafkaDriver struct{}

KafkaDriver searches Kafka topics for matching messages. Uses direct partition reads — no consumer groups, no side effects.

func (*KafkaDriver) Close

func (d *KafkaDriver) Close()

Close is a no-op — the search driver holds no persistent state.

func (*KafkaDriver) Execute

func (d *KafkaDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*KafkaDriver) Name

func (d *KafkaDriver) Name() string

type MongoDriver

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

MongoDriver executes operations against a MongoDB instance.

func NewMongoDriver

func NewMongoDriver(name, dsn string) (*MongoDriver, error)

NewMongoDriver creates a MongoDB driver for the given named database.

func (*MongoDriver) Close

func (d *MongoDriver) Close()

Close disconnects the MongoDB client.

func (*MongoDriver) Execute

func (d *MongoDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*MongoDriver) Name

func (d *MongoDriver) Name() string

type PostgresDriver

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

PostgresDriver executes database seeds and queries against a PostgreSQL instance.

func NewPostgresDriver

func NewPostgresDriver(name, dsn string) *PostgresDriver

NewPostgresDriver creates a PostgreSQL driver for the given named database.

func (*PostgresDriver) Close

func (d *PostgresDriver) Close()

Close cleans up the connection pool.

func (*PostgresDriver) Execute

func (d *PostgresDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*PostgresDriver) Name

func (d *PostgresDriver) Name() string

type RedisDriver

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

RedisDriver executes Redis operations.

func (*RedisDriver) Close

func (d *RedisDriver) Close()

Close cleans up the Redis client.

func (*RedisDriver) Execute

func (d *RedisDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*RedisDriver) Name

func (d *RedisDriver) Name() string

type Registry

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

Registry holds all available drivers and can register them with an engine.

func NewRegistry

func NewRegistry(databases map[string]string) (*Registry, error)

NewRegistry creates a registry with the default drivers plus database drivers for each configured database.

func (*Registry) Close

func (r *Registry) Close()

Close cleans up all closeable drivers.

func (*Registry) Register

func (r *Registry) Register(d engine.Driver)

Register adds a driver to the registry.

func (*Registry) RegisterAll

func (r *Registry) RegisterAll(e *engine.Engine)

RegisterAll registers all drivers with the given engine.

type ShellDriver

type ShellDriver struct{}

ShellDriver executes shell commands.

func (*ShellDriver) Execute

func (d *ShellDriver) Execute(ctx context.Context, stepConfig interface{}, flowCtx *engine.Context, env *config.EnvConfig) (map[string]interface{}, error)

func (*ShellDriver) Name

func (d *ShellDriver) Name() string

Jump to

Keyboard shortcuts

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