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) DeleteJob(id string) error
- func (psql *PostgreSQL) DeleteJobResult(jobID 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) UpdateJob(id string, j *domain.Job) error
- func (psql *PostgreSQL) UpdateJobResult(jobID string, result *domain.JobResult) 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 repository.
func (*PostgreSQL) CreateJobResult ¶
func (psql *PostgreSQL) CreateJobResult(result *domain.JobResult) error
CreateJobResult adds new job result to the repository.
func (*PostgreSQL) DeleteJob ¶
func (psql *PostgreSQL) DeleteJob(id string) error
DeleteJob deletes a job from the repository.
func (*PostgreSQL) DeleteJobResult ¶
func (psql *PostgreSQL) DeleteJobResult(jobID string) error
DeleteJobResult deletes a job result from the repository.
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 repository.
func (*PostgreSQL) GetJobResult ¶
func (psql *PostgreSQL) GetJobResult(jobID string) (*domain.JobResult, error)
GetJobResult fetches a job result from the repository.
func (*PostgreSQL) GetJobs ¶
GetJobs fetches all jobs from the repository, optionally filters the jobs by status.
func (*PostgreSQL) UpdateJob ¶
func (psql *PostgreSQL) UpdateJob(id string, j *domain.Job) error
UpdateJob updates a job to the repository.
func (*PostgreSQL) UpdateJobResult ¶
func (psql *PostgreSQL) UpdateJobResult(jobID string, result *domain.JobResult) error
UpdateJobResult updates a job result to the repository.