models

package
v0.0.0-...-8735fdd Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALTRepo

type ALTRepo struct {
	gorm.Model

	Name string `gorm:"uniqueIndex"`
}

type GitRepo

type GitRepo struct {
	gorm.Model

	Name string `gorm:"uniqueIndex"`
}

type GitRepoAltRepoTask

type GitRepoAltRepoTask struct {
	gorm.Model

	RepoID    uint `gorm:"uniqueIndex:idx_gr_ar_gitaltrepotask"`
	Repo      *GitRepo
	ALTRepoID uint `gorm:"uniqueIndex:idx_gr_ar_gitaltrepotask"`
	ALTRepo   *ALTRepo

	LastTaskID *uint
	LastTask   *Task

	CurrentTaskID *uint
	CurrentTask   *Task
}

type RPMFile

type RPMFile struct {
	gorm.Model

	TaskID int
	Task   Task

	Filename string

	Name    string
	Arch    string
	Version string
	Release string
	Epoch   int
}

type Task

type Task struct {
	gorm.Model

	Status TaskStatus
	Type   TaskType

	RepoID    uint
	Repo      *GitRepo
	ALTRepoID uint
	ALTRepo   ALTRepo

	FilesRemoved bool
	Files        []RPMFile
}

type TaskStatus

type TaskStatus int
const (
	StatusPending    TaskStatus = iota // 0
	StatusInProgress                   // 1
	StatusCompleted                    // 2
	StatusFailed                       // 3
	StatusCancelled                    // 4
)

type TaskType

type TaskType int
const (
	// For future purpose
	TypeTestOnly TaskType = iota // 0
	TypeUpsert                   // 1
	// For future purpose
	TypeDelete // 2
)

Jump to

Keyboard shortcuts

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