backend

package
v0.0.0-...-14710ae Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(databasePath string) *gorm.DB

func MustGatherExec

func MustGatherExec(gathering *Gathering, db *gorm.DB, archiveFilename string)

func PeriodicalCleanup

func PeriodicalCleanup(maxAgeOption string, db *gorm.DB, runOnceNow bool)

Types

type Gathering

type Gathering struct {
	ID          uint      `gorm:"primarykey" json:"id"`
	CreatedAt   time.Time `json:"created-at"`
	UpdatedAt   time.Time `json:"updated-at"`
	CustomName  string    `gorm:"index" form:"custom-name" json:"custom-name"`
	Status      string    `json:"status"` // Expected values: new, inprogress, completed, error
	Image       string    `form:"image" json:"image"`
	ImageStream string    `form:"image-stream" json:"image-stream"`
	NodeName    string    `form:"node-name" json:"node-name"`
	Command     string    `form:"command" json:"command"`
	SourceDir   string    `form:"source-dir" json:"source-dir"`
	Timeout     string    `form:"timeout" json:"timeout"`
	Server      string    `form:"server" json:"server"`
	ArchivePath string    `json:"-"` // Not exposed via JSON API
	ArchiveSize uint      `json:"archive-size"`
	ArchiveName string    `json:"archive-name"`
	ExecOutput  string    `json:"exec-output"` // Fields without form:"<name>" cannot be set via API by bind
}

Jump to

Keyboard shortcuts

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