-
Notifications
You must be signed in to change notification settings - Fork 145
/
job_run.go
38 lines (26 loc) · 928 Bytes
/
job_run.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package repository
import (
"github.com/hatchet-dev/hatchet/internal/repository/prisma/db"
"github.com/steebchen/prisma-client-go/runtime/types"
)
type UpdateJobRunOpts struct {
Status *db.JobRunStatus
}
type UpdateJobRunLookupDataOpts struct {
LookupData *types.JSON
}
type ListAllJobRunsOpts struct {
TickerId *string
NoTickerId *bool
Status *db.JobRunStatus
}
func JobRunStatusPtr(status db.JobRunStatus) *db.JobRunStatus {
return &status
}
type JobRunRepository interface {
ListAllJobRuns(opts *ListAllJobRunsOpts) ([]db.JobRunModel, error)
GetJobRunById(tenantId, jobRunId string) (*db.JobRunModel, error)
UpdateJobRun(tenantId, jobRunId string, opts *UpdateJobRunOpts) (*db.JobRunModel, error)
GetJobRunLookupData(tenantId, jobRunId string) (*db.JobRunLookupDataModel, error)
UpdateJobRunLookupData(tenantId, jobRunId string, opts *UpdateJobRunLookupDataOpts) (*db.JobRunLookupDataModel, error)
}