mysql

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL struct {
	DB        *sql.DB
	Config    *mysql.Config
	CaPemFile string
}

MySQL represents a MySQL DB client.

func New

func New(dsn, caPemFile string, options *relational.DBOptions) *MySQL

New initializes and returns a MySQL client.

func (*MySQL) CheckHealth

func (mySQL *MySQL) CheckHealth() bool

CheckHealth returns the status of MySQL.

func (*MySQL) Close

func (mySQL *MySQL) Close() error

Close terminates any storage connections gracefully.

func (*MySQL) CreateJob

func (mySQL *MySQL) CreateJob(j *domain.Job) error

CreateJob adds a new job to the repository.

func (*MySQL) CreateJobResult

func (mySQL *MySQL) CreateJobResult(result *domain.JobResult) error

CreateJobResult adds new job result to the repository.

func (*MySQL) CreatePipeline added in v0.8.0

func (mySQL *MySQL) CreatePipeline(p *domain.Pipeline) error

CreatePipeline adds a new pipeline and of its jobs to the repository.

func (*MySQL) DeleteJob

func (mySQL *MySQL) DeleteJob(id string) error

DeleteJob deletes a job from the repository.

func (*MySQL) DeleteJobResult

func (mySQL *MySQL) DeleteJobResult(jobID string) error

DeleteJobResult deletes a job result from the repository.

func (*MySQL) DeletePipeline added in v0.8.0

func (mySQL *MySQL) DeletePipeline(id string) error

DeletePipeline deletes a pipeline and all its jobs from the repository.

func (*MySQL) GetDueJobs

func (mySQL *MySQL) GetDueJobs() ([]*domain.Job, error)

GetDueJobs fetches all jobs scheduled to run before now and have not been scheduled yet.

func (*MySQL) GetJob

func (mySQL *MySQL) GetJob(id string) (*domain.Job, error)

GetJob fetches a job from the repository.

func (*MySQL) GetJobResult

func (mySQL *MySQL) GetJobResult(jobID string) (*domain.JobResult, error)

GetJobResult fetches a job result from the repository.

func (*MySQL) GetJobs

func (mySQL *MySQL) GetJobs(status domain.JobStatus) ([]*domain.Job, error)

GetJobs fetches all jobs from the repository, optionally filters the jobs by status.

func (*MySQL) GetJobsByPipelineID added in v0.8.0

func (mySQL *MySQL) GetJobsByPipelineID(pipelineID string) ([]*domain.Job, error)

GetJobsByPipelineID fetches the jobs of the specified pipeline.

func (*MySQL) GetPipeline added in v0.8.0

func (mySQL *MySQL) GetPipeline(id string) (*domain.Pipeline, error)

GetPipeline fetches a pipeline from the repository.

func (*MySQL) GetPipelines added in v0.8.0

func (mySQL *MySQL) GetPipelines(status domain.JobStatus) ([]*domain.Pipeline, error)

GetPipelines fetches all pipelines from the repository, optionally filters the pipelines by status.

func (*MySQL) UpdateJob

func (mySQL *MySQL) UpdateJob(id string, j *domain.Job) error

UpdateJob updates a job to the repository.

func (*MySQL) UpdateJobResult

func (mySQL *MySQL) UpdateJobResult(jobID string, result *domain.JobResult) error

UpdateJobResult updates a job result to the repository.

func (*MySQL) UpdatePipeline added in v0.8.0

func (mySQL *MySQL) UpdatePipeline(id string, p *domain.Pipeline) error

UpdatePipeline updates a pipeline to the repository.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL