Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultJobPriority int32 = 30
)
Variables ¶
View Source
var ( JobPriority = enums.Enum{ Items: []enums.EnumItem{{Idx: 50, Val: "realtime"}, {Idx: 40, Val: "high"}, {Idx: 30, Val: "medium"}, {Idx: 20, Val: "low"}, {Idx: 10, Val: "idle"}}, } )
Functions ¶
func GetJobDbFieldsAsStrings ¶
func GetJobDbFieldsAsStrings() []string
func IsValidJobStatus ¶
func IsValidPriority ¶
Types ¶
type Job ¶
type Job struct { Id ksuid.KSUID `db:"id"` CorrelationId string `db:"correlation_id"` Name string `db:"name"` CreatedAt time.Time `db:"created_at"` CreatedBy string `db:"created_by"` ModifiedAt time.Time `db:"modified_at"` ModifiedBy string `db:"modified_by"` Status JobStatus `db:"status"` Source string `db:"source"` Destination string `db:"destination"` Type string `db:"type"` SubType string `db:"sub_type"` Action string `db:"action"` ActionDetails string `db:"action_details"` Progress int32 `db:"progress"` History string `db:"history"` ExtraData string `db:"extra_data"` Priority int32 `db:"priority"` Rank int32 `db:"rank"` }
func NewJobFromJobRequestDto ¶
func NewJobFromJobRequestDto(jobReq dto.CreateUpdateJobRequest) (*Job, api_error.ApiErr)
func (*Job) AddHistory ¶
func (*Job) ToJobResponseDto ¶
func (j *Job) ToJobResponseDto() dto.JobResponse
type JobRepository ¶
type JobRepository interface { Store(Job) api_error.ApiErr FindAll(dto.SortAndFilterRequest) (*[]Job, int, api_error.ApiErr) FindById(string) (*Job, api_error.ApiErr) Update(string, dto.CreateUpdateJobRequest) (*Job, api_error.ApiErr) DeleteById(string) api_error.ApiErr Dequeue(string) (*Job, api_error.ApiErr) SetStatusById(string, string, string) api_error.ApiErr SetHistoryById(string, string) api_error.ApiErr DeleteAllJobs() api_error.ApiErr }
Click to show internal directories.
Click to hide internal directories.