Documentation
¶
Index ¶
- func Create(schedules Store) http.Handler
- func Delete(schedules Store) http.Handler
- func GetSchedules(schedules Store) http.Handler
- func GetSchedulesForProject(schedules Store) http.Handler
- func Update(schedules Store) http.Handler
- type Postgres
- func (store *Postgres) Create(schedule Schedule) (scheduleID int64, err error)
- func (store *Postgres) Delete(accountID, projectID, scheduleID int64) error
- func (store *Postgres) GetAll(excludedIDs []int64) ([]Schedule, error)
- func (store *Postgres) GetSchedulesForProject(accountID, projectID int64) ([]Schedule, error)
- func (store *Postgres) Update(schedule Schedule) (scheduleID int64, err error)
- type Schedule
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSchedules ¶
GetSchedules returns all schedules outside the ones matching the exclusion list of schedule ids.
func GetSchedulesForProject ¶
GetSchedulesForProject returns a project's schedules.
Types ¶
type Postgres ¶
Postgres is the postgres schedule `Store` implementation.
func (*Postgres) GetSchedulesForProject ¶
GetSchedulesForProject returns a project's schedules.
type Schedule ¶
type Schedule struct {
ID int64
ProjectID int64
AccountID int64
Title string
Cron string
Repository string
Description string
Ref string // e.g. refs/heads/master or refs/tags/v1.7.3
}
Schedule - defines how often a job will run against the specified repository and VCS ref e.g. a specific branch
type Store ¶
type Store interface {
// GetAll all schedules, excluding any ids in the excluded list.
GetAll(excludedIDs []int64) ([]Schedule, error)
// GetSchedulesForProject returns a project's schedules.
GetSchedulesForProject(accountID, projectID int64) ([]Schedule, error)
// Create a schedule.
Create(schedule Schedule) (scheduleID int64, err error)
// Update a schedule.
Update(schedule Schedule) (scheduleID int64, err error)
// Delete a schedule.
Delete(accountID, projectID, scheduleID int64) error
}
Store - schedule store abstraction
Click to show internal directories.
Click to hide internal directories.