Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrJobHistoryNotFound = errors.New("JobHistory not found")
View Source
var ErrJobStatusAlreadyExists = errors.New("JobStatus already exists")
View Source
var ErrJobStatusNotFound = errors.New("JobStatus not found")
Functions ¶
This section is empty.
Types ¶
type Job ¶
type JobHistory ¶
type JobHistory interface { }
func NewJobHistory ¶
func NewJobHistory() (JobHistory, error)
type JobHistoryAddParameter ¶
type JobHistoryAddParameter interface { GetJobStatusID() domain.JobStatusID GetJobName() domain.JobName GetJobParamter() string GetStatus() string }
func NewJobHistoryAddParameter ¶
func NewJobHistoryAddParameter(jobStatusID domain.JobStatusID, jobName domain.JobName, jobParameter string, status string) (JobHistoryAddParameter, error)
type JobHistoryRepository ¶
type JobHistoryRepository interface { AddJobHistory(ctx context.Context, param JobHistoryAddParameter) error FindJobHistoryByJobName(ctx context.Context, jobName domain.JobName) (JobHistory, error) }
type JobService ¶
type JobService interface { StartJob(ctx context.Context, job Job) error CleanOldJobs(ctx context.Context) error }
func NewJobService ¶
func NewJobService(ctx context.Context, transaction Transaction) (JobService, error)
type JobStatus ¶
type JobStatus interface { GetJobStatusID() domain.JobStatusID GetJobName() domain.JobName GetJobParameter() string }
type JobStatusRepository ¶
type JobStatusRepository interface { AddJobStatus(ctx context.Context, job Job) (domain.JobStatusID, error) RemoveJobStatus(ctx context.Context, jobStatusID domain.JobStatusID) error RemoveExpiredJobStatus(ctx context.Context) (int, error) FindJobStatusByJobName(ctx context.Context, jobName domain.JobName) ([]JobStatus, error) }
type RepositoryFactory ¶
type RepositoryFactory interface { NewJobStatusRepository(ctx context.Context) JobStatusRepository NewJobHistoryRepository(ctx context.Context) JobHistoryRepository }
type Transaction ¶
type Transaction interface {
Do(ctx context.Context, fn func(rf RepositoryFactory) error) error
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.