entgo

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 24 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(_ context.Context) error

func (Database) CreateJob

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

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

func (Database) CreateWorkflow

func (db Database) CreateWorkflow(ctx context.Context, workflow *model.Workflow) (*model.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) (*model.Job, error)

func (Database) GetWorkflow

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

func (Database) QueryJobs

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

QueryJobs returns the jobs matching filterParams.

func (Database) QueryWorkflows

func (db Database) QueryWorkflows(ctx context.Context, paginationParams persistence.PaginationParams) (*model.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 *model.Job, request persistence.JobUpdate) (*model.Job, error)

UpdateJob updates an existing job and its history.

Jump to

Keyboard shortcuts

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