Add database with background information for each pkgbase, for possible future use. A static status page is generated from the db. Currently includes: * sub-packages * build-time * build-duration * status (failed, latest, skipped, queued, building, build) * version (both from PKGBUILD and repo) * last checked Database is currently only used for informational purposes. Goal is to refactor many (expensive) methods to use the db instead of searching/parsing files. Reviewed-on: https://git.harting.dev/anonfunc/ALHP.GO/pulls/26 Co-authored-by: Giovanni Harting <539@idlegandalf.com> Co-committed-by: Giovanni Harting <539@idlegandalf.com>
37 lines
2.0 KiB
Go
37 lines
2.0 KiB
Go
// Code generated by entc, DO NOT EDIT.
|
|
|
|
package ent
|
|
|
|
import (
|
|
"ALHP.go/ent/dbpackage"
|
|
"ALHP.go/ent/schema"
|
|
)
|
|
|
|
// The init function reads all schema descriptors with runtime code
|
|
// (default values, validators, hooks and policies) and stitches it
|
|
// to their package variables.
|
|
func init() {
|
|
dbpackageFields := schema.DbPackage{}.Fields()
|
|
_ = dbpackageFields
|
|
// dbpackageDescPkgbase is the schema descriptor for pkgbase field.
|
|
dbpackageDescPkgbase := dbpackageFields[0].Descriptor()
|
|
// dbpackage.PkgbaseValidator is a validator for the "pkgbase" field. It is called by the builders before save.
|
|
dbpackage.PkgbaseValidator = dbpackageDescPkgbase.Validators[0].(func(string) error)
|
|
// dbpackageDescStatus is the schema descriptor for status field.
|
|
dbpackageDescStatus := dbpackageFields[2].Descriptor()
|
|
// dbpackage.StatusValidator is a validator for the "status" field. It is called by the builders before save.
|
|
dbpackage.StatusValidator = dbpackageDescStatus.Validators[0].(func(int) error)
|
|
// dbpackageDescRepository is the schema descriptor for repository field.
|
|
dbpackageDescRepository := dbpackageFields[4].Descriptor()
|
|
// dbpackage.RepositoryValidator is a validator for the "repository" field. It is called by the builders before save.
|
|
dbpackage.RepositoryValidator = dbpackageDescRepository.Validators[0].(func(string) error)
|
|
// dbpackageDescMarch is the schema descriptor for march field.
|
|
dbpackageDescMarch := dbpackageFields[5].Descriptor()
|
|
// dbpackage.MarchValidator is a validator for the "march" field. It is called by the builders before save.
|
|
dbpackage.MarchValidator = dbpackageDescMarch.Validators[0].(func(string) error)
|
|
// dbpackageDescBuildDuration is the schema descriptor for build_duration field.
|
|
dbpackageDescBuildDuration := dbpackageFields[9].Descriptor()
|
|
// dbpackage.BuildDurationValidator is a validator for the "build_duration" field. It is called by the builders before save.
|
|
dbpackage.BuildDurationValidator = dbpackageDescBuildDuration.Validators[0].(func(uint64) error)
|
|
}
|