entgo

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database manages access to a SQLite database. It implements the wfx persistence interface. It holds a pointer to the connection and is safe to copy by value.

func (Database) CheckHealth

func (db Database) CheckHealth(ctx context.Context) error

func (Database) CreateJob

func (db Database) CreateJob(ctx context.Context, job *api.Job) (*api.Job, error)

CreateJob persists a new job and sets the job ID field.

func (Database) CreateWorkflow

func (db Database) CreateWorkflow(ctx context.Context, workflow *api.Workflow) (*api.Workflow, error)

CreateWorkflow creates a new workflow.

func (Database) DeleteJob

func (db Database) DeleteJob(ctx context.Context, jobID string) error

func (Database) DeleteWorkflow

func (db Database) DeleteWorkflow(ctx context.Context, name string) error

DeleteWorkflow deletes an existing workflow.

func (Database) GetJob

func (db Database) GetJob(ctx context.Context, jobID string, fetchParams persistence.FetchParams) (*api.Job, error)

func (Database) GetWorkflow

func (db Database) GetWorkflow(ctx context.Context, name string) (*api.Workflow, error)

func (Database) QueryJobs

func (db Database) QueryJobs(ctx context.Context,
	filterParams persistence.FilterParams,
	sortParams persistence.SortParams,
	paginationParams persistence.PaginationParams,
) (*api.PaginatedJobList, error)

QueryJobs returns the jobs matching filterParams.

func (Database) QueryWorkflows

func (db Database) QueryWorkflows(ctx context.Context, sortParams persistence.SortParams, paginationParams persistence.PaginationParams) (*api.PaginatedWorkflowList, error)

QueryWorkflows returns multiple workflows (paginated).

func (Database) Shutdown

func (db Database) Shutdown()

func (Database) UpdateJob

func (db Database) UpdateJob(ctx context.Context, job *api.Job, request persistence.JobUpdate) (*api.Job, error)

UpdateJob updates an existing job and its history.

type MySQL added in v0.4.0

type MySQL struct {
	Database
}

func (*MySQL) Initialize added in v0.4.0

func (wrapper *MySQL) Initialize(options string) error

type PostgreSQL added in v0.4.0

type PostgreSQL struct {
	Database
}

func (*PostgreSQL) Initialize added in v0.4.0

func (wrapper *PostgreSQL) Initialize(options string) error

Initialize sets up the PostgreSQL database connection using the provided DSN (options), runs migrations, and initializes the ent client.

Parameters:

type SQLite added in v0.4.0

type SQLite struct {
	Database
}

func (*SQLite) Initialize added in v0.4.0

func (instance *SQLite) Initialize(dsn string) error

Jump to

Keyboard shortcuts

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