db

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(enableLog, migrate bool, path string) (*gorm.DB, error)

Types

type Run

type Run struct {
	Error          *string
	ID             uint `gorm:"primarykey"`
	FinishedAt     *time.Time
	Reason         RunReason
	RepositoryName *string
	ScheduleAfter  time.Time
	StartedAt      *time.Time
	Status         RunStatus
	TaskName       string
}

type RunReason

type RunReason uint
const (
	RunReasonManual RunReason = iota
	RunReasonChanged
	RunReasonNew
	RunReasonNext
)

type RunStatus

type RunStatus uint
const (
	RunStatusPending RunStatus = iota
	RunStatusRunning
	RunStatusFinished
	RunStatusFailed
)

type Task

type Task struct {
	ID   uint `gorm:"primarykey"`
	Name string
	Hash string
}

type TaskResult

type TaskResult struct {
	CreatedAt      time.Time
	Error          *string
	ID             uint `gorm:"primarykey"`
	RepositoryName string
	Result         uint
	RunID          uint
	TaskName       string
}

Jump to

Keyboard shortcuts

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