Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckDAO ¶
type CheckDAO interface { // Create create a check Create(ctx context.Context, check *models.Check) (*models.Check, error) // Update check run UpdateByID(ctx context.Context, checkRunID uint, newCheckRun *models.CheckRun) error // GetByResource get checks by resource GetByResource(ctx context.Context, resources ...common.Resource) ([]*models.Check, error) GetCheckRunByID(ctx context.Context, checkRunID uint) (*models.CheckRun, error) ListCheckRuns(ctx context.Context, pipelinerunID uint) ([]*models.CheckRun, error) CreateCheckRun(ctx context.Context, run *models.CheckRun) (*models.CheckRun, error) }
func NewCheckDAO ¶
type PRMessageDAO ¶
type PRMessageDAO interface { // Create creates a PRMessage Create(ctx context.Context, prMessage *models.PRMessage) (*models.PRMessage, error) // List lists PRMessage order by created_at asc List(ctx context.Context, pipelineRunID uint, query *q.Query) (int, []*models.PRMessage, error) }
func NewPRMessageDAO ¶
func NewPRMessageDAO(db *gorm.DB) PRMessageDAO
type PipelineRunDAO ¶
type PipelineRunDAO interface { // Create create a pipelinerun Create(ctx context.Context, pipelinerun *models.Pipelinerun) (*models.Pipelinerun, error) GetByID(ctx context.Context, pipelinerunID uint) (*models.Pipelinerun, error) GetByCIEventID(ctx context.Context, ciEventID string) (*models.Pipelinerun, error) GetByClusterID(ctx context.Context, clusterID uint, canRollback bool, query q.Query) (int, []*models.Pipelinerun, error) // DeleteByID delete pipelinerun by id DeleteByID(ctx context.Context, pipelinerunID uint) error DeleteByClusterID(ctx context.Context, clusterID uint) error UpdateConfigCommitByID(ctx context.Context, pipelinerunID uint, commit string) error GetLatestByClusterIDAndActions(ctx context.Context, clusterID uint, action ...string) (*models.Pipelinerun, error) GetLatestByClusterIDAndActionAndStatus(ctx context.Context, clusterID uint, action, status string) (*models.Pipelinerun, error) UpdateStatusByID(ctx context.Context, pipelinerunID uint, result models.PipelineStatus) error UpdateCIEventIDByID(ctx context.Context, pipelinerunID uint, ciEventID string) error UpdateResultByID(ctx context.Context, pipelinerunID uint, result *models.Result) error GetLatestSuccessByClusterID(ctx context.Context, clusterID uint) (*models.Pipelinerun, error) GetFirstCanRollbackPipelinerun(ctx context.Context, clusterID uint) (*models.Pipelinerun, error) UpdateColumns(ctx context.Context, id uint, columns map[string]interface{}) error }
func NewPipelineRunDAO ¶
func NewPipelineRunDAO(db *gorm.DB) PipelineRunDAO
Click to show internal directories.
Click to hide internal directories.