Documentation ¶
Index ¶
- type PostgreSQL
- func (psql *PostgreSQL) CheckHealth() bool
- func (psql *PostgreSQL) Close() error
- func (psql *PostgreSQL) CreateJob(j *domain.Job) error
- func (psql *PostgreSQL) CreateJobResult(result *domain.JobResult) error
- func (psql *PostgreSQL) CreatePipeline(p *domain.Pipeline) error
- func (psql *PostgreSQL) DeleteJob(id string) error
- func (psql *PostgreSQL) DeleteJobResult(jobID string) error
- func (psql *PostgreSQL) DeletePipeline(id string) error
- func (psql *PostgreSQL) GetDueJobs() ([]*domain.Job, error)
- func (psql *PostgreSQL) GetJob(id string) (*domain.Job, error)
- func (psql *PostgreSQL) GetJobResult(jobID string) (*domain.JobResult, error)
- func (psql *PostgreSQL) GetJobs(status domain.JobStatus) ([]*domain.Job, error)
- func (psql *PostgreSQL) GetJobsByPipelineID(pipelineID string) ([]*domain.Job, error)
- func (psql *PostgreSQL) GetPipeline(id string) (*domain.Pipeline, error)
- func (psql *PostgreSQL) GetPipelines(status domain.JobStatus) ([]*domain.Pipeline, error)
- func (psql *PostgreSQL) UpdateJob(id string, j *domain.Job) error
- func (psql *PostgreSQL) UpdateJobResult(jobID string, result *domain.JobResult) error
- func (psql *PostgreSQL) UpdatePipeline(id string, p *domain.Pipeline) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgreSQL ¶
func New ¶
func New(dsn string, options *relational.DBOptions) *PostgreSQL
New initializes and returns a PostgreSQL client.
func (*PostgreSQL) CheckHealth ¶
func (psql *PostgreSQL) CheckHealth() bool
CheckHealth returns the status of MySQL.
func (*PostgreSQL) Close ¶
func (psql *PostgreSQL) Close() error
Close terminates any storage connections gracefully.
func (*PostgreSQL) CreateJob ¶
func (psql *PostgreSQL) CreateJob(j *domain.Job) error
CreateJob adds a new job to the storage.
func (*PostgreSQL) CreateJobResult ¶
func (psql *PostgreSQL) CreateJobResult(result *domain.JobResult) error
CreateJobResult adds new job result to the storage.
func (*PostgreSQL) CreatePipeline ¶ added in v0.8.0
func (psql *PostgreSQL) CreatePipeline(p *domain.Pipeline) error
CreatePipeline adds a new pipeline and of its jobs to the storage.
func (*PostgreSQL) DeleteJob ¶
func (psql *PostgreSQL) DeleteJob(id string) error
DeleteJob deletes a job from the storage.
func (*PostgreSQL) DeleteJobResult ¶
func (psql *PostgreSQL) DeleteJobResult(jobID string) error
DeleteJobResult deletes a job result from the storage.
func (*PostgreSQL) DeletePipeline ¶ added in v0.8.0
func (psql *PostgreSQL) DeletePipeline(id string) error
DeletePipeline deletes a pipeline and all its jobs from the storage.
func (*PostgreSQL) GetDueJobs ¶
func (psql *PostgreSQL) GetDueJobs() ([]*domain.Job, error)
GetDueJobs fetches all jobs scheduled to run before now and have not been scheduled yet.
func (*PostgreSQL) GetJob ¶
func (psql *PostgreSQL) GetJob(id string) (*domain.Job, error)
GetJob fetches a job from the storage.
func (*PostgreSQL) GetJobResult ¶
func (psql *PostgreSQL) GetJobResult(jobID string) (*domain.JobResult, error)
GetJobResult fetches a job result from the storage.
func (*PostgreSQL) GetJobs ¶
GetJobs fetches all jobs from the storage, optionally filters the jobs by status.
func (*PostgreSQL) GetJobsByPipelineID ¶ added in v0.8.0
func (psql *PostgreSQL) GetJobsByPipelineID(pipelineID string) ([]*domain.Job, error)
GetJobsByPipelineID fetches the jobs of the specified pipeline.
func (*PostgreSQL) GetPipeline ¶ added in v0.8.0
func (psql *PostgreSQL) GetPipeline(id string) (*domain.Pipeline, error)
GetPipeline fetches a pipeline from the storage.
func (*PostgreSQL) GetPipelines ¶ added in v0.8.0
GetPipelines fetches all pipelines from the storage, optionally filters the pipelines by status.
func (*PostgreSQL) UpdateJob ¶
func (psql *PostgreSQL) UpdateJob(id string, j *domain.Job) error
UpdateJob updates a job to the storage.
func (*PostgreSQL) UpdateJobResult ¶
func (psql *PostgreSQL) UpdateJobResult(jobID string, result *domain.JobResult) error
UpdateJobResult updates a job result to the storage.
func (*PostgreSQL) UpdatePipeline ¶ added in v0.8.0
func (psql *PostgreSQL) UpdatePipeline(id string, p *domain.Pipeline) error
UpdatePipeline updates a pipeline to the storage.