Documentation ¶
Index ¶
- type Database
- func (db Database) CheckHealth(_ context.Context) error
- func (db Database) CreateJob(ctx context.Context, job *model.Job) (*model.Job, error)
- func (db Database) CreateWorkflow(ctx context.Context, workflow *model.Workflow) (*model.Workflow, error)
- func (db Database) DeleteJob(ctx context.Context, jobID string) error
- func (db Database) DeleteWorkflow(ctx context.Context, name string) error
- func (db Database) GetJob(ctx context.Context, jobID string, fetchParams persistence.FetchParams) (*model.Job, error)
- func (db Database) GetWorkflow(ctx context.Context, name string) (*model.Workflow, error)
- func (db Database) QueryJobs(ctx context.Context, filterParams persistence.FilterParams, ...) (*model.PaginatedJobList, error)
- func (db Database) QueryWorkflows(ctx context.Context, paginationParams persistence.PaginationParams) (*model.PaginatedWorkflowList, error)
- func (db Database) Shutdown()
- func (db Database) UpdateJob(ctx context.Context, job *model.Job, request persistence.JobUpdate) (*model.Job, error)
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) CreateWorkflow ¶
func (db Database) CreateWorkflow(ctx context.Context, workflow *model.Workflow) (*model.Workflow, error)
CreateWorkflow creates a new workflow.
func (Database) DeleteWorkflow ¶
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 (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).
Click to show internal directories.
Click to hide internal directories.