Documentation ¶
Index ¶
- type Invocation
- type Model
- type Repository
- func (r *Repository) Clone(db *gorm.DB, dir, password string) error
- func (r *Repository) Create(db *gorm.DB) error
- func (r *Repository) Delete(db *gorm.DB) error
- func (r *Repository) Files() ([]string, error)
- func (r *Repository) Pull(password string) error
- func (r *Repository) Update(db *gorm.DB) error
- func (r *Repository) UpdateStats(db *gorm.DB) error
- type Task
- func (t *Task) Create(db *gorm.DB) error
- func (t *Task) Delete(db *gorm.DB) error
- func (t *Task) Disable(db *gorm.DB) error
- func (t *Task) Enable(db *gorm.DB) error
- func (t *Task) GetInvocations(db *gorm.DB, limit int) ([]Invocation, error)
- func (t *Task) GetLastInvocation(db *gorm.DB) (Invocation, error)
- func (t *Task) NextInvocation(catchupTime time.Time) (time.Time, error)
- func (t *Task) Update(db *gorm.DB) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Invocation ¶
type Invocation struct { Model TaskID uint `gorm:"index:ix_invocation_time;" json:"task_id" sql:"type:integer REFERENCES tasks(id)"` ScheduledAt *time.Time `gorm:"index:ix_invocation_time" json:"scheduled_to_start_at"` Start *time.Time `json:"started_at"` Finish *time.Time `json:"finished_at"` Success bool `json:"success"` ErrorMessage string `json:"error_message"` Log string `json:"log" sql:"type:text"` }
type Model ¶
type Model struct { ID uint `gorm:"primary_key" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Model is base for model, copied from gorm.Model
type Repository ¶
type Repository struct { Model Name string `json:"name"` RemoteURL string `json:"remote_url"` AuthUser string `json:"auth_user"` LocalPath string `json:"-"` LastCommitHash string `json:"last_commit_hash"` LastCommitMessage string `json:"last_commit_message"` LastCommitDate *time.Time `json:"last_commit_date"` LastCommitAuthor string `json:"last_commit_author"` }
func (*Repository) Files ¶
func (r *Repository) Files() ([]string, error)
func (*Repository) Pull ¶
func (r *Repository) Pull(password string) error
func (*Repository) UpdateStats ¶
func (r *Repository) UpdateStats(db *gorm.DB) error
type Task ¶
type Task struct { Model Name string `gorm:"type:varchar(128);UNIQUE;NOT_NULL" json:"name"` Schedule string `gorm:"type:varchar(128);NOT_NULL" json:"schedule"` Repository string `gorm:"type:varchar(255)" json:"repository"` Command string `gorm:"NOT_NULL" json:"command"` Arguments string `json:"args"` IsAQL bool `json:"is_aql"` Enabled bool `json:"enabled"` Coalesce bool `json:"coalesce"` NextRun *time.Time `json:"next_run"` // contains filtered or unexported fields }
func (*Task) GetInvocations ¶
func (*Task) GetLastInvocation ¶
func (t *Task) GetLastInvocation(db *gorm.DB) (Invocation, error)
func (*Task) NextInvocation ¶
Click to show internal directories.
Click to hide internal directories.