model

package
v0.0.0-...-e5128e9 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	Id                int64
	PackageBase       string
	PackageBaseId     int64
	CommitId          int64
	WorkerId          int64
	Status            BuildStatus
	Type              BuildType
	DependsOnBuildIds []int64
	CreatedAt         time.Time `xorm:"created"`
	StartedAt         time.Time
	FinishedAt        time.Time
}

type BuildStatus

type BuildStatus int8
const (
	STATUS_PENDING  BuildStatus = 10
	STATUS_BUILDING BuildStatus = 20
	STATUS_TIMEOUT  BuildStatus = 30
	STATUS_FAILED   BuildStatus = 40
	STATUS_BUILD    BuildStatus = 50
)

type BuildType

type BuildType int8
const (
	TYPE_PACKAGE    BuildType = 10
	TYPE_DEPENDENCY BuildType = 20
)

type Commit

type Commit struct {
	Id             int64
	PackageBaseId  int64  `xorm:"notnull"`
	Hash           string `xorm:"notnull"`
	Message        string
	AuthorName     string
	AuthorEmail    string
	AuthorWhen     time.Time
	CommitterName  string
	CommitterEmail string
	CommitterWhen  time.Time `xorm:"notnull"`
	ParentHashes   []string
}

func NewCommitFromGitCommit

func NewCommitFromGitCommit(packageBaseId int64, commit *object.Commit) Commit

type Package

type Package struct {
	//Id             int64     `json:"ID"`
	Name           string    `json:"Name" xorm:"pk notnull"`
	PackageBaseId  int64     `json:"PackageBaseID" xorm:"index notnull"`
	PackageBase    string    `json:"PackageBase" xorm:"index notnull"`
	Version        string    `json:"Version" xorm:"notnull"`
	Description    string    `json:"Description"`
	URL            string    `json:"URL" xorm:"'url'"`
	NumVotes       int       `json:"NumVotes"`
	Popularity     float64   `json:"Popularity"`
	OutOfDate      time.Time `json:"OutOfDate"`
	Maintainer     string    `json:"Maintainer"`
	FirstSubmitted time.Time `json:"FirstSubmitted"`
	LastModified   time.Time `json:"LastModified"`
	URLPath        string    `json:"URLPath" xorm:"'url_path'"`
	Depends        []string  `json:"Depends"`
	MakeDepends    []string  `json:"MakeDepends"`
	CheckDepends   []string  `json:"CheckDepends"`
	Conflicts      []string  `json:"Conflicts"`
	Provides       []string  `json:"Provides"`
	Replaces       []string  `json:"Replaces"`
	OptDepends     []string  `json:"OptDepends"`
	Groups         []string  `json:"Groups"`
	License        []string  `json:"License"`
	Keywords       []string  `json:"Keywords"`
}

func NewPackageFromRPCPackage

func NewPackageFromRPCPackage(pkg rpc.Pkg) Package

type Work

type Work struct {
	BuildId               int64
	PackageBase           string
	PackageBaseDataBase64 string
	Dependencies          []string
}

type WorkResult

type WorkResult struct {
	Id                      int64
	BuildId                 int64
	Status                  WorkResultStatus
	PacmanExitCode          int
	PacmanLogBase64         string
	MakepkgExtractExitCode  int
	MakepkgExtractLogBase64 string
	MakepkgBuildExitCode    int
	MakepkgBuildLogBase64   string
	CreatedAt               time.Time `xorm:"created"`
}

func (*WorkResult) GetBuildStatus

func (r *WorkResult) GetBuildStatus() BuildStatus

type WorkResultStatus

type WorkResultStatus int8
const (
	WORK_RESULT_STATUS_INTERNAL_ERROR WorkResultStatus = 0
	WORK_RESULT_STATUS_TIMEOUT        WorkResultStatus = 10
	WORK_RESULT_STATUS_FAILED         WorkResultStatus = 20
	WORK_RESULT_STATUS_SUCCESS        WorkResultStatus = 30
)

type Worker

type Worker struct {
	Id        int64
	Type      WorkerType
	Status    WorkerStatus
	HetznerId int
	Name      string
	IPv4      string    `xorm:"'ipv4'"`
	IPv6      string    `xorm:"'ipv6'"`
	CreatedAt time.Time `xorm:"created"`
	UpdatedAt time.Time `xorm:"updated"`
}

func NewWorkerFromHetznerServer

func NewWorkerFromHetznerServer(server *hcloud.Server) Worker

type WorkerStatus

type WorkerStatus int8
const (
	WORKER_STATUS_CREATED WorkerStatus = 10
	WORKER_STATUS_RUNNING WorkerStatus = 20
	WORKER_STATUS_STOPPED WorkerStatus = 30
)

type WorkerType

type WorkerType int8
const (
	WORKER_TYPE_OTHER   WorkerType = 0
	WORKER_TYPE_HETZNER WorkerType = 10
)

Jump to

Keyboard shortcuts

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