Documentation ¶
Index ¶
- func IsRecordNotFoundError(err error) bool
- type Client
- func (c *Client) CreateJobs(ctx context.Context, options []*CreateJobOption) ([]*Job, error)
- func (c *Client) CreatePipeline(ctx context.Context, opt *CreatePipelineOption) (*Pipeline, error)
- func (c *Client) GetJobByRunnerExecutionID(ctx context.Context, runnerExecutionID int64) (*Job, error)
- func (c *Client) GetPipelineByID(ctx context.Context, id int64) (*Pipeline, error)
- type CreateJobOption
- type CreatePipelineOption
- type Dialect
- type Job
- type Pipeline
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRecordNotFoundError ¶
IsRecordNotFoundError returns true if the error is a record not found error.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewMockDB ¶
NewMockDB creates a new database with tables created from given models. It uses sqlite in memory as the database.
func (*Client) CreateJobs ¶
func (*Client) CreatePipeline ¶
CreatePipeline creates a new pipeline.
func (*Client) GetJobByRunnerExecutionID ¶
type CreateJobOption ¶
type CreatePipelineOption ¶
type Job ¶
type Job struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement"` UID string `gorm:"column:uid"` Name string `gorm:"column:name"` Steps []byte `gorm:"column:steps"` PipelineID int64 `gorm:"column:pipeline_id"` CheckRunID int64 `gorm:"column:check_run_id"` RunnerJobExecutionID int64 `gorm:"column:runner_job_execution_id"` CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"` UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime"` }
type Pipeline ¶
type Pipeline struct { ID int64 `gorm:"column:id;primaryKey;autoIncrement"` AppInstallID int64 `gorm:"column:app_install_id"` RepoOwner string `gorm:"column:repo_owner"` RepoName string `gorm:"column:repo_name"` HeadSHA string `gorm:"column:head_sha"` CreatedAt time.Time `gorm:"column:created_at;autoCreateTime"` UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime"` }
Click to show internal directories.
Click to hide internal directories.