# Conflicts: # modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer-tools/main.go # modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/integration_test.go # modules/mesh-delivery-indexer/cmd/mesh-delivery-indexer/main.go # modules/mesh-delivery-indexer/internal/index/pending.go # modules/mesh-delivery-indexer/internal/index/pending_test.go # modules/mesh-delivery-indexer/manifest_test.go
1776 lines
69 KiB
Go
1776 lines
69 KiB
Go
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// Package meshcatalog is the contract of the seat "mesh-catalog", defined whole (seats/mesh-catalog/seat.json): The catalog of the mesh: every module the trunk holds with its manifest, fingerprint and verdict, the packages published, and the seat list (ADR 0636 §1, §4).
|
|
package meshcatalog
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/json"
|
|
"errors"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
// Seat is the seat's name.
|
|
const Seat = "mesh-catalog"
|
|
|
|
const (
|
|
VerbModules = "modules"
|
|
VerbModule = "module"
|
|
VerbProvides = "provides"
|
|
VerbDependents = "dependents"
|
|
VerbSeatDefinitions = "seat-definitions"
|
|
VerbRevision = "revision"
|
|
VerbRegistrations = "registrations"
|
|
VerbRegister = "register"
|
|
VerbPolicy = "policy"
|
|
VerbWatch = "watch"
|
|
VerbUnwatch = "unwatch"
|
|
VerbVersions = "versions"
|
|
VerbOutdated = "outdated"
|
|
VerbInput = "input"
|
|
VerbEntry = "entry"
|
|
)
|
|
|
|
const (
|
|
EventSeatDefinitionChanged = "seat-definition-changed"
|
|
EventSeatDefinitionRemoved = "seat-definition-removed"
|
|
EventManifestAccepted = "manifest-accepted"
|
|
EventManifestRefused = "manifest-refused"
|
|
EventCatalogRevision = "catalog-revision"
|
|
EventFilling = "filling"
|
|
EventFull = "full"
|
|
EventRoom = "room"
|
|
EventRegistrationChanged = "registration-changed"
|
|
EventVersionReleased = "version-released"
|
|
EventVersionsFilled = "versions-filled"
|
|
)
|
|
|
|
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
|
func Verbs() []string {
|
|
return []string{VerbModules, VerbModule, VerbProvides, VerbDependents, VerbSeatDefinitions, VerbRevision, VerbRegistrations, VerbRegister, VerbPolicy, VerbWatch, VerbUnwatch, VerbVersions, VerbOutdated, VerbInput, VerbEntry}
|
|
}
|
|
|
|
// Events is every event published on the seat's subject: a new copy each call.
|
|
func Events() []string {
|
|
return []string{EventSeatDefinitionChanged, EventSeatDefinitionRemoved, EventManifestAccepted, EventManifestRefused, EventCatalogRevision, EventFilling, EventFull, EventRoom, EventRegistrationChanged, EventVersionReleased, EventVersionsFilled}
|
|
}
|
|
|
|
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
|
const (
|
|
Family = "mesh-catalog.events"
|
|
FamilyMaxAgeDays = 7
|
|
)
|
|
|
|
// SubjectSeatDefinitionChanged is where seat-definition-changed is published.
|
|
const SubjectSeatDefinitionChanged = "mesh.seat.mesh-catalog.event.seat-definition-changed"
|
|
|
|
// SubjectSeatDefinitionRemoved is where seat-definition-removed is published.
|
|
const SubjectSeatDefinitionRemoved = "mesh.seat.mesh-catalog.event.seat-definition-removed"
|
|
|
|
// SubjectManifestAccepted is where manifest-accepted is published.
|
|
const SubjectManifestAccepted = "mesh.seat.mesh-catalog.event.manifest-accepted"
|
|
|
|
// SubjectManifestRefused is where manifest-refused is published.
|
|
const SubjectManifestRefused = "mesh.seat.mesh-catalog.event.manifest-refused"
|
|
|
|
// SubjectCatalogRevision is where catalog-revision is published, on mesh.seat.mesh-catalog.event.catalog-revision.<branch>.
|
|
func SubjectCatalogRevision(branch string) string {
|
|
return "mesh.seat.mesh-catalog.event.catalog-revision." + branch
|
|
}
|
|
|
|
// SubjectCatalogRevisionAll hears every catalog-revision.
|
|
const SubjectCatalogRevisionAll = "mesh.seat.mesh-catalog.event.catalog-revision.*"
|
|
|
|
// SubjectFilling is where filling is published.
|
|
const SubjectFilling = "mesh.seat.mesh-catalog.event.filling"
|
|
|
|
// SubjectFull is where full is published.
|
|
const SubjectFull = "mesh.seat.mesh-catalog.event.full"
|
|
|
|
// SubjectRoom is where room is published.
|
|
const SubjectRoom = "mesh.seat.mesh-catalog.event.room"
|
|
|
|
// StreamRegistrationChanged is the stream registration-changed is kept in.
|
|
const StreamRegistrationChanged = "SEAT_mesh-catalog_registration-changed"
|
|
|
|
// SubjectRegistrationChanged is where registration-changed is published.
|
|
const SubjectRegistrationChanged = "mesh.seat.mesh-catalog.event.registration-changed"
|
|
|
|
// StreamVersionReleased is the stream version-released is kept in.
|
|
const StreamVersionReleased = "SEAT_mesh-catalog_version-released"
|
|
|
|
// SubjectVersionReleased is where version-released is published.
|
|
const SubjectVersionReleased = "mesh.seat.mesh-catalog.event.version-released"
|
|
|
|
// StreamVersionsFilled is the stream versions-filled is kept in.
|
|
const StreamVersionsFilled = "SEAT_mesh-catalog_versions-filled"
|
|
|
|
// SubjectVersionsFilled is where versions-filled is published.
|
|
const SubjectVersionsFilled = "mesh.seat.mesh-catalog.event.versions-filled"
|
|
|
|
const (
|
|
StateManifests = "manifests"
|
|
StateModules = "modules"
|
|
StateCandidates = "candidates"
|
|
StateVerdicts = "verdicts"
|
|
StatePredefined = "predefined"
|
|
StateConfigCandidates = "config-candidates"
|
|
StatePackages = "packages"
|
|
StateCatalogRevisions = "catalog-revisions"
|
|
StateRegistrations = "registrations"
|
|
StateRegistrationHistory = "registration-history"
|
|
StateVersions = "versions"
|
|
StateBuildEdges = "build-edges"
|
|
StateInputs = "inputs"
|
|
)
|
|
|
|
// ManifestsByDigestKey is the key of one value of the state manifests under the form "<digest>".
|
|
func ManifestsByDigestKey(digest string) string { return digest }
|
|
|
|
// ParseManifestsByDigestKey reads the parts of a key of the form "<digest>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseManifestsByDigestKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeManifestsByDigestValue reads one value of the state manifests under the form "<digest>", refusing a field ManifestsByDigestValue does not know and any text after the value.
|
|
func DecodeManifestsByDigestValue(raw []byte) (ManifestsByDigestValue, error) {
|
|
var v ManifestsByDigestValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// ModulesByModuleKey is the key of one value of the state modules under the form "<module>".
|
|
func ModulesByModuleKey(module string) string { return module }
|
|
|
|
// ParseModulesByModuleKey reads the parts of a key of the form "<module>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseModulesByModuleKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeModulesByModuleValue reads one value of the state modules under the form "<module>", refusing a field ModulesByModuleValue does not know and any text after the value.
|
|
func DecodeModulesByModuleValue(raw []byte) (ModulesByModuleValue, error) {
|
|
var v ModulesByModuleValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// CandidatesByGroupKey is the key of one value of the state candidates under the form "<group>".
|
|
func CandidatesByGroupKey(group string) string { return group }
|
|
|
|
// ParseCandidatesByGroupKey reads the parts of a key of the form "<group>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseCandidatesByGroupKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeCandidatesByGroupValue reads one value of the state candidates under the form "<group>", refusing a field CandidatesByGroupValue does not know and any text after the value.
|
|
func DecodeCandidatesByGroupValue(raw []byte) (CandidatesByGroupValue, error) {
|
|
var v CandidatesByGroupValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// VerdictsByDigestKey is the key of one value of the state verdicts under the form "<digest>".
|
|
func VerdictsByDigestKey(digest string) string { return digest }
|
|
|
|
// ParseVerdictsByDigestKey reads the parts of a key of the form "<digest>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseVerdictsByDigestKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeVerdictsByDigestValue reads one value of the state verdicts under the form "<digest>", refusing a field VerdictsByDigestValue does not know and any text after the value.
|
|
func DecodeVerdictsByDigestValue(raw []byte) (VerdictsByDigestValue, error) {
|
|
var v VerdictsByDigestValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// PredefinedByListKey is the key of one value of the state predefined under the form "list".
|
|
func PredefinedByListKey() string { return "list" }
|
|
|
|
// ParsePredefinedByListKey reads the parts of a key of the form "list", in the order of the form; the last result is false for a key of another form.
|
|
func ParsePredefinedByListKey(key string) bool {
|
|
rest := key
|
|
if !strings.HasPrefix(rest, "list") {
|
|
return false
|
|
}
|
|
rest = rest[4:]
|
|
if rest != "" {
|
|
return false
|
|
}
|
|
return true
|
|
}
|
|
|
|
// DecodePredefinedByListValue reads one value of the state predefined under the form "list", refusing a field PredefinedByListValue does not know and any text after the value.
|
|
func DecodePredefinedByListValue(raw []byte) (PredefinedByListValue, error) {
|
|
var v PredefinedByListValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// ConfigCandidatesByPullKey is the key of one value of the state config-candidates under the form "<pull>".
|
|
func ConfigCandidatesByPullKey(pull string) string { return pull }
|
|
|
|
// ParseConfigCandidatesByPullKey reads the parts of a key of the form "<pull>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseConfigCandidatesByPullKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeConfigCandidatesByPullValue reads one value of the state config-candidates under the form "<pull>", refusing a field ConfigCandidatesByPullValue does not know and any text after the value.
|
|
func DecodeConfigCandidatesByPullValue(raw []byte) (ConfigCandidatesByPullValue, error) {
|
|
var v ConfigCandidatesByPullValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// PackagesByModuleKey is the key of one value of the state packages under the form "<module>".
|
|
func PackagesByModuleKey(module string) string { return module }
|
|
|
|
// ParsePackagesByModuleKey reads the parts of a key of the form "<module>", in the order of the form; the last result is false for a key of another form.
|
|
func ParsePackagesByModuleKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodePackagesByModuleValue reads one value of the state packages under the form "<module>", refusing a field PackagesByModuleValue does not know and any text after the value.
|
|
func DecodePackagesByModuleValue(raw []byte) (PackagesByModuleValue, error) {
|
|
var v PackagesByModuleValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// PackagesByPackageSeriesKey is the key of one value of the state packages under the form "<package>.<series>".
|
|
func PackagesByPackageSeriesKey(packagePart, series string) string { return packagePart + "." + series }
|
|
|
|
// ParsePackagesByPackageSeriesKey reads the parts of a key of the form "<package>.<series>", in the order of the form; the last result is false for a key of another form.
|
|
func ParsePackagesByPackageSeriesKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodePackagesByPackageSeriesValue reads one value of the state packages under the form "<package>.<series>", refusing a field PackagesByPackageSeriesValue does not know and any text after the value.
|
|
func DecodePackagesByPackageSeriesValue(raw []byte) (PackagesByPackageSeriesValue, error) {
|
|
var v PackagesByPackageSeriesValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// CatalogRevisionsByBranchRevisionKey is the key of one value of the state catalog-revisions under the form "<branch>.<revision>".
|
|
func CatalogRevisionsByBranchRevisionKey(branch, revision string) string {
|
|
return branch + "." + revision
|
|
}
|
|
|
|
// ParseCatalogRevisionsByBranchRevisionKey reads the parts of a key of the form "<branch>.<revision>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseCatalogRevisionsByBranchRevisionKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodeCatalogRevisionsByBranchRevisionValue reads one value of the state catalog-revisions under the form "<branch>.<revision>", refusing a field CatalogRevisionsByBranchRevisionValue does not know and any text after the value.
|
|
func DecodeCatalogRevisionsByBranchRevisionValue(raw []byte) (CatalogRevisionsByBranchRevisionValue, error) {
|
|
var v CatalogRevisionsByBranchRevisionValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// CatalogRevisionsByCandidateGroupHeadsKey is the key of one value of the state catalog-revisions under the form "candidate.<group>.<heads>".
|
|
func CatalogRevisionsByCandidateGroupHeadsKey(group, heads string) string {
|
|
return "candidate." + group + "." + heads
|
|
}
|
|
|
|
// ParseCatalogRevisionsByCandidateGroupHeadsKey reads the parts of a key of the form "candidate.<group>.<heads>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseCatalogRevisionsByCandidateGroupHeadsKey(key string) (string, string, bool) {
|
|
rest := key
|
|
if !strings.HasPrefix(rest, "candidate.") {
|
|
return "", "", false
|
|
}
|
|
rest = rest[10:]
|
|
v1, after1, found1 := strings.Cut(rest, ".")
|
|
if !found1 || v1 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after1
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v3 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v1, v3, true
|
|
}
|
|
|
|
// DecodeCatalogRevisionsByCandidateGroupHeadsValue reads one value of the state catalog-revisions under the form "candidate.<group>.<heads>", refusing a field CatalogRevisionsByCandidateGroupHeadsValue does not know and any text after the value.
|
|
func DecodeCatalogRevisionsByCandidateGroupHeadsValue(raw []byte) (CatalogRevisionsByCandidateGroupHeadsValue, error) {
|
|
var v CatalogRevisionsByCandidateGroupHeadsValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// CatalogRevisionsByEntryDigestKey is the key of one value of the state catalog-revisions under the form "entry.<digest>".
|
|
func CatalogRevisionsByEntryDigestKey(digest string) string { return "entry." + digest }
|
|
|
|
// ParseCatalogRevisionsByEntryDigestKey reads the parts of a key of the form "entry.<digest>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseCatalogRevisionsByEntryDigestKey(key string) (string, bool) {
|
|
rest := key
|
|
if !strings.HasPrefix(rest, "entry.") {
|
|
return "", false
|
|
}
|
|
rest = rest[6:]
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v1 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v1, true
|
|
}
|
|
|
|
// DecodeCatalogRevisionsByEntryDigestValue reads one value of the state catalog-revisions under the form "entry.<digest>", refusing a field CatalogRevisionsByEntryDigestValue does not know and any text after the value.
|
|
func DecodeCatalogRevisionsByEntryDigestValue(raw []byte) (CatalogRevisionsByEntryDigestValue, error) {
|
|
var v CatalogRevisionsByEntryDigestValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// RegistrationsByModuleKey is the key of one value of the state registrations under the form "<module>".
|
|
func RegistrationsByModuleKey(module string) string { return module }
|
|
|
|
// ParseRegistrationsByModuleKey reads the parts of a key of the form "<module>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseRegistrationsByModuleKey(key string) (string, bool) {
|
|
rest := key
|
|
if rest == "" {
|
|
return "", false
|
|
}
|
|
v0 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", false
|
|
}
|
|
return v0, true
|
|
}
|
|
|
|
// DecodeRegistrationsByModuleValue reads one value of the state registrations under the form "<module>", refusing a field RegistrationsByModuleValue does not know and any text after the value.
|
|
func DecodeRegistrationsByModuleValue(raw []byte) (RegistrationsByModuleValue, error) {
|
|
var v RegistrationsByModuleValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// RegistrationHistoryByModuleVersionKey is the key of one value of the state registration-history under the form "<module>.<version>".
|
|
func RegistrationHistoryByModuleVersionKey(module, version string) string {
|
|
return module + "." + version
|
|
}
|
|
|
|
// ParseRegistrationHistoryByModuleVersionKey reads the parts of a key of the form "<module>.<version>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseRegistrationHistoryByModuleVersionKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodeRegistrationHistoryByModuleVersionValue reads one value of the state registration-history under the form "<module>.<version>", refusing a field RegistrationHistoryByModuleVersionValue does not know and any text after the value.
|
|
func DecodeRegistrationHistoryByModuleVersionValue(raw []byte) (RegistrationHistoryByModuleVersionValue, error) {
|
|
var v RegistrationHistoryByModuleVersionValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// VersionsByModuleVersionKey is the key of one value of the state versions under the form "<module>.<version>".
|
|
func VersionsByModuleVersionKey(module, version string) string { return module + "." + version }
|
|
|
|
// ParseVersionsByModuleVersionKey reads the parts of a key of the form "<module>.<version>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseVersionsByModuleVersionKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodeVersionsByModuleVersionValue reads one value of the state versions under the form "<module>.<version>", refusing a field VersionsByModuleVersionValue does not know and any text after the value.
|
|
func DecodeVersionsByModuleVersionValue(raw []byte) (VersionsByModuleVersionValue, error) {
|
|
var v VersionsByModuleVersionValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// BuildEdgesByModuleBranchKey is the key of one value of the state build-edges under the form "<module>.<branch>".
|
|
func BuildEdgesByModuleBranchKey(module, branch string) string { return module + "." + branch }
|
|
|
|
// ParseBuildEdgesByModuleBranchKey reads the parts of a key of the form "<module>.<branch>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseBuildEdgesByModuleBranchKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodeBuildEdgesByModuleBranchValue reads one value of the state build-edges under the form "<module>.<branch>", refusing a field BuildEdgesByModuleBranchValue does not know and any text after the value.
|
|
func DecodeBuildEdgesByModuleBranchValue(raw []byte) (BuildEdgesByModuleBranchValue, error) {
|
|
var v BuildEdgesByModuleBranchValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// InputsByTimeDigestKey is the key of one value of the state inputs under the form "<time>.<digest>".
|
|
func InputsByTimeDigestKey(time, digest string) string { return time + "." + digest }
|
|
|
|
// ParseInputsByTimeDigestKey reads the parts of a key of the form "<time>.<digest>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseInputsByTimeDigestKey(key string) (string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", false
|
|
}
|
|
rest = after0
|
|
if rest == "" {
|
|
return "", "", false
|
|
}
|
|
v2 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", false
|
|
}
|
|
return v0, v2, true
|
|
}
|
|
|
|
// DecodeInputsByTimeDigestValue reads one value of the state inputs under the form "<time>.<digest>", refusing a field InputsByTimeDigestValue does not know and any text after the value.
|
|
func DecodeInputsByTimeDigestValue(raw []byte) (InputsByTimeDigestValue, error) {
|
|
var v InputsByTimeDigestValue
|
|
dec := json.NewDecoder(bytes.NewReader(raw))
|
|
dec.DisallowUnknownFields()
|
|
if err := dec.Decode(&v); err != nil {
|
|
return v, err
|
|
}
|
|
if dec.More() {
|
|
return v, errors.New("text after the value")
|
|
}
|
|
return v, nil
|
|
}
|
|
|
|
// ActingRule is a rule a seat the module claims declares in its acts: the step the module acts in, on which entries, and how long a new version of it may take before it acts (design 47, An acting part's new version acts first).
|
|
type ActingRule struct {
|
|
// a duration such as 30m
|
|
Bound string `json:"bound,omitempty"`
|
|
// which entries it acts on: every, or a language
|
|
On string `json:"on,omitempty"`
|
|
Seat string `json:"seat"`
|
|
// take-in, validate, check, build, compose, grant or place
|
|
Step string `json:"step"`
|
|
}
|
|
|
|
// ArtifactPackage is the package's name read from the revision's own files at the artifact's path (the module of its go.mod, the name of its package.json, the manifest's image name), written at take-in (design 47 G section 676).
|
|
type ArtifactPackage struct {
|
|
// go, npm or image
|
|
Ecosystem string `json:"ecosystem"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// Artifact is one artifact of a module in the catalog graph entry.
|
|
type Artifact struct {
|
|
// the artifact's kind
|
|
Kind string `json:"kind,omitempty"`
|
|
// the artifact's language as its manifest says it (go, typescript, ...); a step's build seat is read from it (design 47 G section 323)
|
|
Language string `json:"language"`
|
|
// the package's name read from the revision's own files at the artifact's path (the module of its go.mod, the name of its package.json, the manifest's image name), written at take-in (design 47 G section 676)
|
|
Package *ArtifactPackage `json:"package,omitempty"`
|
|
Ref ArtifactRef `json:"ref"`
|
|
}
|
|
|
|
// ArtifactRef is an artifact reference, <module>:<artifact>, such as mesh-grants:program (design 47 *Dependencies between artifacts*).
|
|
type ArtifactRef = string
|
|
|
|
// BuildEdge is the build edge of one language: the build module that builds the module, and the toolchain and recipe version its fingerprint names (ADR 0603 §2).
|
|
type BuildEdge struct {
|
|
// the build module
|
|
Module string `json:"module,omitempty"`
|
|
// the build module's recipe version
|
|
Recipe string `json:"recipe"`
|
|
// the installed toolchain's version
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// BuildEdges is the newest build's edge entries of a module on a watched branch other than the first, keyed by its fingerprint, which releases no version (design 47 G section 374).
|
|
type BuildEdges struct {
|
|
Edges []VersionEdge `json:"edges"`
|
|
// the build's fingerprint
|
|
Fp string `json:"fp"`
|
|
Source int64 `json:"source,omitempty"`
|
|
V int64 `json:"v"`
|
|
}
|
|
|
|
// CatalogEntry is one module of a catalog graph revision as its manifest declares it, stored once by its digest (ADR 0656, design 47 Two graphs).
|
|
type CatalogEntry struct {
|
|
// the acting rules of the seats it claims
|
|
Acts []ActingRule `json:"acts,omitempty"`
|
|
// the module's artifacts by reference, each with its language and kind (design 47 G section 47, section 323)
|
|
Artifacts []Artifact `json:"artifacts,omitempty"`
|
|
// the provisions it requires that no module offers yet
|
|
Awaits []string `json:"awaits,omitempty"`
|
|
// the images and modules it is built on
|
|
Bases []string `json:"bases,omitempty"`
|
|
// the merge commit it was last changed at
|
|
Commit string `json:"commit"`
|
|
// the edges into this module's artifacts, each from the artifact that comes first; the build and the delivery order by these alone
|
|
Edges []Edge `json:"edges,omitempty"`
|
|
// its fingerprint (src2: and 64 hex digits); absent when it has none
|
|
Fp string `json:"fp,omitempty"`
|
|
Inputs *EntryInputs `json:"inputs,omitempty"`
|
|
// each a seat verb or a module tool it calls
|
|
Invokes []string `json:"invokes,omitempty"`
|
|
// its verb edges left out because they lie on a cycle (ADR 0614 §3)
|
|
LeftOut []string `json:"left-out,omitempty"`
|
|
// the Go main package the check's first tier builds when this module acts: the from of the Go artifact its process runs, as its manifest names it beside path; absent when it runs no Go program (design 47, The check on the change's own acting parts)
|
|
Main string `json:"main,omitempty"`
|
|
// the validated manifest whole, kept as an object by the entry's digest, so no size limit applies; read by anyone but the indexer through the entry, never as a manifest (design 47 G section 443, section 442)
|
|
Manifest map[string]any `json:"manifest"`
|
|
// the sha256: digest of the manifest's bytes as the forge answered them, set by the indexer at take-in and never computed again from the manifest whole; the module's value and the manifests key are this digest (design 47 G section 506)
|
|
ManifestDigest string `json:"manifest-digest,omitempty"`
|
|
Module string `json:"module"`
|
|
// the manifest reads a node-engine must state to compose it, its templates' forms included, as the forge bridge read them at the merge (ADR 0614 §4, ADR 0632 §2)
|
|
Needs []string `json:"needs,omitempty"`
|
|
// why it has none
|
|
None string `json:"none,omitempty"`
|
|
// the mesh packages it builds against, by name, each with the version it builds against (design 47: its packages)
|
|
Packages map[string]string `json:"packages,omitempty"`
|
|
// the module's directory in its repository, '.' for a root
|
|
Path string `json:"path,omitempty"`
|
|
Provides []string `json:"provides,omitempty"`
|
|
Repository string `json:"repository"`
|
|
Requires []string `json:"requires,omitempty"`
|
|
// each seat it claims and the verbs it serves of it, as seat.verb
|
|
Serves []string `json:"serves,omitempty"`
|
|
// the events the manifest declares in its streams, by key (design 47 G section 365)
|
|
Streams []string `json:"streams,omitempty"`
|
|
// its build edges, by language (ADR 0603 §2)
|
|
Toolchains map[string]BuildEdge `json:"toolchains,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
// its manifest's verdict: accepted, refused or held
|
|
Verdict string `json:"verdict,omitempty"`
|
|
}
|
|
|
|
// CatalogRevisionDefinitionsItem is a type of the contract.
|
|
type CatalogRevisionDefinitionsItem struct {
|
|
Digest string `json:"digest"`
|
|
Seat string `json:"seat"`
|
|
}
|
|
|
|
// CatalogRevision is a catalog graph revision: the list of its entries' digests, with what it was read from.
|
|
type CatalogRevision struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
// the watched branch the revision is of
|
|
Branch string `json:"branch,omitempty"`
|
|
// the seat definitions it was judged with, each by its digest, read whole through seat-definitions
|
|
Definitions []CatalogRevisionDefinitionsItem `json:"definitions,omitempty"`
|
|
// one per module, by name
|
|
Entries []EntryRef `json:"entries"`
|
|
// a candidate's group
|
|
Group string `json:"group,omitempty"`
|
|
// a candidate's heads
|
|
Heads string `json:"heads,omitempty"`
|
|
// trunk or candidate
|
|
Kind string `json:"kind"`
|
|
// the catalog graph revision's number, counted by its holder
|
|
Revision int64 `json:"revision"`
|
|
// the source revision it was taken in from; for a candidate, the source revision its heads are merged onto
|
|
Source int64 `json:"source"`
|
|
// the trunk head of every repository it was read at
|
|
Trunk []Head `json:"trunk,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// Edge is one edge of the catalog graph between artifact references, B before A (ADR 0666 section 14): kind 1 B published before A builds (a package A imports), 2 B published before A delivers (fetched by reference at its start), 3 B delivered before A builds (its build module and toolchain), 4 B delivered before A delivers (a provision, bus state, a format's reader), 5 B has acted for A's new version (an acting rule), 6 B runs a version that serves A (a verb or a manifest word A uses).
|
|
type Edge struct {
|
|
// declared in the artifact entry's needs of A's manifest, where nothing else says it
|
|
Declared bool `json:"declared,omitempty"`
|
|
// B, the artifact that comes first
|
|
From ArtifactRef `json:"from"`
|
|
Kind int64 `json:"kind"`
|
|
// the part pointed to
|
|
Part ArtifactRef `json:"part,omitempty"`
|
|
// the edge makes the dependent stale (kinds 1, 3) or only orders it (kinds 2, 4, 5, 6) (design 47 G section 378)
|
|
Stale bool `json:"stale,omitempty"`
|
|
// A, the artifact that waits for it
|
|
To ArtifactRef `json:"to"`
|
|
// what it was derived from: the package, the provision, the verb or the rule
|
|
Why string `json:"why,omitempty"`
|
|
// the manifest word the edge came from
|
|
Word string `json:"word,omitempty"`
|
|
}
|
|
|
|
// EntryInputs is what the indexer computes its next revision from (the lead's ruling on milestone 47/G finding 1): what its fingerprint is computed from, the toolchains it was computed with, its manifest's problems and warnings, its artifacts' named paths and the source revisions it was taken in and its fingerprint moved at.
|
|
type EntryInputs struct {
|
|
// the source revision its fingerprint moved at
|
|
FpSrc int64 `json:"fp-src,omitempty"`
|
|
From *FingerprintInputs `json:"from,omitempty"`
|
|
// by artifact: the named paths it is built from
|
|
Paths map[string][]string `json:"paths,omitempty"`
|
|
// its manifest's problems, when refused or held
|
|
Problems []string `json:"problems,omitempty"`
|
|
// the source revision it was taken in at; 0 before the indexer heard it
|
|
Src int64 `json:"src,omitempty"`
|
|
// by language: the toolchain its fingerprint was computed with
|
|
Toolchains map[string]ToolchainUsed `json:"toolchains,omitempty"`
|
|
// the manifest fields the judge does not know, when held
|
|
Unknown []string `json:"unknown,omitempty"`
|
|
Warnings []string `json:"warnings,omitempty"`
|
|
}
|
|
|
|
// EntryRef is a type of the contract.
|
|
type EntryRef struct {
|
|
// the entry's digest, its object's name
|
|
Digest string `json:"digest"`
|
|
Module string `json:"module"`
|
|
}
|
|
|
|
// Fill is a store's fill against its cap.
|
|
type Fill struct {
|
|
At *time.Time `json:"at,omitempty"`
|
|
Bytes int64 `json:"bytes"`
|
|
// bytes
|
|
Cap int64 `json:"cap"`
|
|
// what full refuses, such as the next revision and the pending merge it would take in
|
|
Refused string `json:"refused,omitempty"`
|
|
// the kept data, by its name in the holder's manifest
|
|
Store string `json:"store"`
|
|
}
|
|
|
|
// FingerprintInputs is what its fingerprint is computed from: its tree, bases, builder, build contexts, lock files, named paths' objects, the mesh packages and imports it builds against.
|
|
type FingerprintInputs struct {
|
|
Bases []string `json:"bases,omitempty"`
|
|
Builder string `json:"builder,omitempty"`
|
|
Contexts map[string]string `json:"contexts,omitempty"`
|
|
ImportForm string `json:"import-form,omitempty"`
|
|
Imports []string `json:"imports,omitempty"`
|
|
Locks map[string]string `json:"locks,omitempty"`
|
|
Packages []string `json:"packages,omitempty"`
|
|
Paths map[string]string `json:"paths,omitempty"`
|
|
Tree string `json:"tree"`
|
|
}
|
|
|
|
// Head is a type of the contract.
|
|
type Head struct {
|
|
Commit string `json:"commit"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// OutdatedDependency is a type of the contract.
|
|
type OutdatedDependency struct {
|
|
Artifact ArtifactRef `json:"artifact"`
|
|
// the dependency's watched branch
|
|
Branch string `json:"branch"`
|
|
// the dependency's source revision
|
|
Source int64 `json:"source"`
|
|
}
|
|
|
|
// Outdated is one entry behind, by the part's digest (design 47 G section 375).
|
|
type Outdated struct {
|
|
// the act: a rebuild for a stale edge (kinds 1, 3), none for an ordering edge, which is shown only
|
|
Act string `json:"act,omitempty"`
|
|
// its build's fingerprint, for a build of another branch
|
|
Build string `json:"build,omitempty"`
|
|
Dependency OutdatedDependency `json:"dependency"`
|
|
Kind int64 `json:"kind"`
|
|
// the dependent module
|
|
Module string `json:"module"`
|
|
// what is newest: version and digest, or the fact
|
|
Newest string `json:"newest"`
|
|
// what the dependent recorded: version and digest, or the fact
|
|
Recorded string `json:"recorded"`
|
|
// its version, or empty for a build of another branch
|
|
Version string `json:"version,omitempty"`
|
|
}
|
|
|
|
// Policy is a module's policy: its steps' statuses, and per artifact what differs (ADR 0666 section 7).
|
|
type Policy struct {
|
|
// by artifact name, the statuses that differ from the module's
|
|
Artifacts map[string]StepStatuses `json:"artifacts,omitempty"`
|
|
Steps StepStatuses `json:"steps"`
|
|
}
|
|
|
|
// Registration is a module's registration (ADR 0666 section 2; design 47 *A module's registration*): its git origin, its manifest's path, its watched branches and its policy, every version with who changed it and the warrant of the operator's Approve.
|
|
type Registration struct {
|
|
At *time.Time `json:"at,omitempty"`
|
|
// its watched branches, the first the default a placement runs
|
|
Branches []string `json:"branches"`
|
|
// who asked the change
|
|
By string `json:"by,omitempty"`
|
|
Module string `json:"module"`
|
|
// its git origin, the repository as <owner>/<name>
|
|
Origin string `json:"origin"`
|
|
// the path of its manifest in the repository
|
|
Path string `json:"path"`
|
|
Policy Policy `json:"policy"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
// this registration's version, counted from 1
|
|
Version int64 `json:"version,omitempty"`
|
|
// the operator's Approve the version was written on: the ask's id
|
|
Warrant string `json:"warrant,omitempty"`
|
|
}
|
|
|
|
// RegistrationAsked is what a registration change asked: the authorising ask raised through the seat operator-channel, naming every value it moves, one line each; nothing is written before its warrant (ADR 0666 section 2).
|
|
type RegistrationAsked struct {
|
|
// the ask's id
|
|
Ask string `json:"ask,omitempty"`
|
|
// every value the change moves, as the ask names it ("nats:program unit: required -> bypass")
|
|
Lines []string `json:"lines,omitempty"`
|
|
Module string `json:"module"`
|
|
// why no ask was raised
|
|
Refused string `json:"refused,omitempty"`
|
|
// the refusal in words, naming the branch, the step or the module
|
|
Words string `json:"words,omitempty"`
|
|
}
|
|
|
|
// The values of RegistrationAsked's refused.
|
|
const (
|
|
RegistrationAskedRefusedUnprotectedBranch = "unprotected branch"
|
|
RegistrationAskedRefusedReservedBranchName = "reserved branch name"
|
|
RegistrationAskedRefusedPlaced = "placed"
|
|
RegistrationAskedRefusedReviewRequired = "review required"
|
|
RegistrationAskedRefusedUnknownModule = "unknown module"
|
|
RegistrationAskedRefusedNothingMoves = "nothing moves"
|
|
)
|
|
|
|
// StepStatuses is the status of each pipeline step (design 47 *Pipeline steps and the policy*); a step left out keeps the module's.
|
|
type StepStatuses struct {
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Approval string `json:"approval,omitempty"`
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Composition string `json:"composition,omitempty"`
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Integration string `json:"integration,omitempty"`
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Lint string `json:"lint,omitempty"`
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Review string `json:"review,omitempty"`
|
|
// required runs and holds the delivery until it passes; optional runs, a failure is shown and may be accepted; bypass runs nothing and is said as bypassed
|
|
Unit string `json:"unit,omitempty"`
|
|
}
|
|
|
|
// The values of StepStatuses's approval.
|
|
const (
|
|
StepStatusesApprovalRequired = "required"
|
|
StepStatusesApprovalOptional = "optional"
|
|
StepStatusesApprovalBypass = "bypass"
|
|
)
|
|
|
|
// The values of StepStatuses's composition.
|
|
const (
|
|
StepStatusesCompositionRequired = "required"
|
|
StepStatusesCompositionOptional = "optional"
|
|
StepStatusesCompositionBypass = "bypass"
|
|
)
|
|
|
|
// The values of StepStatuses's integration.
|
|
const (
|
|
StepStatusesIntegrationRequired = "required"
|
|
StepStatusesIntegrationOptional = "optional"
|
|
StepStatusesIntegrationBypass = "bypass"
|
|
)
|
|
|
|
// The values of StepStatuses's lint.
|
|
const (
|
|
StepStatusesLintRequired = "required"
|
|
StepStatusesLintOptional = "optional"
|
|
StepStatusesLintBypass = "bypass"
|
|
)
|
|
|
|
// The values of StepStatuses's review.
|
|
const (
|
|
StepStatusesReviewRequired = "required"
|
|
StepStatusesReviewOptional = "optional"
|
|
StepStatusesReviewBypass = "bypass"
|
|
)
|
|
|
|
// The values of StepStatuses's unit.
|
|
const (
|
|
StepStatusesUnitRequired = "required"
|
|
StepStatusesUnitOptional = "optional"
|
|
StepStatusesUnitBypass = "bypass"
|
|
)
|
|
|
|
// ToolchainUsed is a toolchain a fingerprint was computed with (ADR 0405 clause 7).
|
|
type ToolchainUsed struct {
|
|
Language string `json:"language"`
|
|
// the build module's recipe version
|
|
Recipe string `json:"recipe"`
|
|
// the installed toolchain's version
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// VersionArtifact is a type of the contract.
|
|
type VersionArtifact struct {
|
|
Artifact ArtifactRef `json:"artifact"`
|
|
// the published artifact's digest
|
|
Digest string `json:"digest"`
|
|
}
|
|
|
|
// VersionEdge is one catalog-graph edge of a released version's artifacts, as the release recorded it (design 47 G section 374).
|
|
type VersionEdge struct {
|
|
// the digest of the part pointed to, kinds 1-4
|
|
Digest string `json:"digest,omitempty"`
|
|
// kinds 5 and 6: the acting part, its step and the build that acted, or the verb or word used and the delivered version that serves it
|
|
Fact string `json:"fact,omitempty"`
|
|
// the entry was derived at the first fill (design 47 G section 377), not recorded at a release or a delivery
|
|
Filled bool `json:"filled,omitempty"`
|
|
Kind int64 `json:"kind"`
|
|
Part ArtifactRef `json:"part"`
|
|
// the edge makes the dependent stale (kinds 1, 3) or only orders it (kinds 2, 4, 5, 6) (section 378)
|
|
Stale bool `json:"stale"`
|
|
// the dependency's version, kinds 1-4; "not yet delivered" until the first delivery for 2, 4 and 6
|
|
Version string `json:"version,omitempty"`
|
|
// the manifest word the edge came from
|
|
Word string `json:"word,omitempty"`
|
|
}
|
|
|
|
// VersionEntry is one released version of a module: each artifact's digest, the source revision built and its edge entries (design 47 G section 349, section 374).
|
|
type VersionEntry struct {
|
|
Artifacts []VersionArtifact `json:"artifacts"`
|
|
At *time.Time `json:"at,omitempty"`
|
|
Edges []VersionEdge `json:"edges,omitempty"`
|
|
// released late: lower than the module's highest, recorded and not said
|
|
Late bool `json:"late,omitempty"`
|
|
// the module
|
|
Module string `json:"module"`
|
|
// the source revision built
|
|
Source int64 `json:"source,omitempty"`
|
|
V int64 `json:"v"`
|
|
// MAJOR.MINOR.PATCH
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// TakeInEntry is one module of a taken-in revision (design 47 G section 476, section 648).
|
|
type TakeInEntry struct {
|
|
Commit string `json:"commit"`
|
|
// the module's build-input fingerprint at the commit
|
|
Fingerprint string `json:"fingerprint"`
|
|
Module string `json:"module"`
|
|
// from a merged message; absent for a pushed one (design 47 G section 648)
|
|
Pull int64 `json:"pull,omitempty"`
|
|
// from a merged message; absent for a pushed one (design 47 G section 648)
|
|
Repository string `json:"repository,omitempty"`
|
|
}
|
|
|
|
// TakeInMember is one pull request at one commit.
|
|
type TakeInMember struct {
|
|
Head string `json:"head"`
|
|
Number int64 `json:"number"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// TakeInMerge is one merge a take-in event holds: the repository, its pull request and the merge commit the forge made of it.
|
|
type TakeInMerge struct {
|
|
Merge string `json:"merge"`
|
|
Number int64 `json:"number"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// TakeInPending is the body of the indexer's take-in.pending: a wait for a revision or a group, with the watched branch (design 47 G section 493).
|
|
type TakeInPending struct {
|
|
// the watched branch the revision is of (design 47 G section 476, section 493)
|
|
Branch string `json:"branch,omitempty"`
|
|
// who acted by hand, on a taken event
|
|
By string `json:"by,omitempty"`
|
|
// a hand drop: the merges are not taken in
|
|
Dropped bool `json:"dropped,omitempty"`
|
|
// the delivery group, for a group being gathered
|
|
Group string `json:"group,omitempty"`
|
|
// the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered
|
|
Key string `json:"key"`
|
|
// the event's kind, pending or taken
|
|
Kind string `json:"kind"`
|
|
// the keys of merges whose message the forge bridge's stream no longer holds
|
|
Lost []string `json:"lost,omitempty"`
|
|
// every approved member of a group with its head
|
|
Members []TakeInMember `json:"members,omitempty"`
|
|
// the merges it holds, oldest first
|
|
Merges []TakeInMerge `json:"merges"`
|
|
// why the indexer holds a merge it does not take in although no indexer build is named
|
|
OwnBuildUnknown string `json:"own-build-unknown,omitempty"`
|
|
// why the manifest of the indexer the revision names was refused
|
|
Refused string `json:"refused,omitempty"`
|
|
// when the wait began
|
|
Since time.Time `json:"since"`
|
|
// the layout version
|
|
V int64 `json:"v"`
|
|
// the indexer build a revision waits for
|
|
WaitsFor string `json:"waits-for,omitempty"`
|
|
// what waits: a revision or a group
|
|
What string `json:"what"`
|
|
// why they acted by hand, on a taken event
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// TakeInTaken is the body of the indexer's take-in.taken: a wait ended, with the branch, the source revision and the entries (design 47 G section 476, section 493).
|
|
type TakeInTaken struct {
|
|
// the watched branch the revision is of (design 47 G section 476, section 493)
|
|
Branch string `json:"branch,omitempty"`
|
|
// who acted by hand, on a taken event
|
|
By string `json:"by,omitempty"`
|
|
// a hand drop: the merges are not taken in
|
|
Dropped bool `json:"dropped,omitempty"`
|
|
// one entry per module of that revision; none for a hand drop (design 47 G section 476, section 493)
|
|
Entries []TakeInEntry `json:"entries,omitempty"`
|
|
// the delivery group, for a group being gathered
|
|
Group string `json:"group,omitempty"`
|
|
// the wait's key: m.<sequence> of its oldest merge, or g.<group> for a group being gathered
|
|
Key string `json:"key"`
|
|
// the event's kind, pending or taken
|
|
Kind string `json:"kind"`
|
|
// the keys of merges whose message the forge bridge's stream no longer holds
|
|
Lost []string `json:"lost,omitempty"`
|
|
// every approved member of a group with its head
|
|
Members []TakeInMember `json:"members,omitempty"`
|
|
// the merges it holds, oldest first
|
|
Merges []TakeInMerge `json:"merges"`
|
|
// why the indexer holds a merge it does not take in although no indexer build is named
|
|
OwnBuildUnknown string `json:"own-build-unknown,omitempty"`
|
|
// why the manifest of the indexer the revision names was refused
|
|
Refused string `json:"refused,omitempty"`
|
|
// when the wait began
|
|
Since time.Time `json:"since"`
|
|
// the source revision taken in (design 47 G section 476)
|
|
Source int64 `json:"source,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v"`
|
|
// the indexer build a revision waits for
|
|
WaitsFor string `json:"waits-for,omitempty"`
|
|
// what waits: a revision or a group
|
|
What string `json:"what"`
|
|
// why they acted by hand, on a taken event
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// ModulesInput is what modules takes.
|
|
type ModulesInput struct {
|
|
}
|
|
|
|
// ModulesAnswerModulesItem is a type of the contract.
|
|
type ModulesAnswerModulesItem struct {
|
|
// the merge commit it was last changed at
|
|
Commit string `json:"commit"`
|
|
// its fingerprint (src2: and 64 hex digits); absent when it has none
|
|
Fp string `json:"fp,omitempty"`
|
|
Module string `json:"module"`
|
|
// why it has none
|
|
None string `json:"none,omitempty"`
|
|
// the module's directory in its repository, '.' for a root
|
|
Path string `json:"path,omitempty"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// ModulesAnswer is what modules answers.
|
|
type ModulesAnswer struct {
|
|
Modules []ModulesAnswerModulesItem `json:"modules"`
|
|
}
|
|
|
|
// ModuleInput is what module takes.
|
|
type ModuleInput struct {
|
|
// the module's name
|
|
Module string `json:"module"`
|
|
}
|
|
|
|
// ModuleAnswerModule is a type of the contract.
|
|
type ModuleAnswerModule struct {
|
|
// the merge commit it was last changed at
|
|
Commit string `json:"commit"`
|
|
// its fingerprint (src2: and 64 hex digits); absent when it has none
|
|
Fp string `json:"fp,omitempty"`
|
|
// the module's manifest as the trunk holds it
|
|
Manifest map[string]any `json:"manifest,omitempty"`
|
|
Module string `json:"module"`
|
|
// why it has none
|
|
None string `json:"none,omitempty"`
|
|
// the module's directory in its repository, '.' for a root
|
|
Path string `json:"path,omitempty"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// ModuleAnswer is what module answers.
|
|
type ModuleAnswer struct {
|
|
Module ModuleAnswerModule `json:"module"`
|
|
}
|
|
|
|
// ProvidesInput is what provides takes.
|
|
type ProvidesInput struct {
|
|
// the provision, such as postgres-database
|
|
Provision string `json:"provision"`
|
|
}
|
|
|
|
// ProvidesAnswer is what provides answers.
|
|
type ProvidesAnswer = map[string]any
|
|
|
|
// DependentsInput is what dependents takes.
|
|
type DependentsInput struct {
|
|
// the module's name
|
|
Module string `json:"module"`
|
|
}
|
|
|
|
// DependentsAnswer is what dependents answers.
|
|
type DependentsAnswer = map[string]any
|
|
|
|
// SeatDefinitionsInput is what seat-definitions takes.
|
|
type SeatDefinitionsInput struct {
|
|
// the seat's name; none lists every trunk seat
|
|
Seat string `json:"seat,omitempty"`
|
|
}
|
|
|
|
// SeatDefinitionsAnswerEntry is a type of the contract.
|
|
type SeatDefinitionsAnswerEntry struct {
|
|
// the definition, resolved with the parts it includes
|
|
Definition map[string]any `json:"definition,omitempty"`
|
|
Digest string `json:"digest"`
|
|
Seat string `json:"seat"`
|
|
// trunk
|
|
Source string `json:"source"`
|
|
// why the definition could not be read, when it could not
|
|
Unparsed string `json:"unparsed,omitempty"`
|
|
}
|
|
|
|
// SeatDefinitionsAnswerSeatsItem is a type of the contract.
|
|
type SeatDefinitionsAnswerSeatsItem struct {
|
|
Digest string `json:"digest"`
|
|
Seat string `json:"seat"`
|
|
// trunk
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
// SeatDefinitionsAnswer is what seat-definitions answers.
|
|
type SeatDefinitionsAnswer struct {
|
|
Entry *SeatDefinitionsAnswerEntry `json:"entry,omitempty"`
|
|
Found bool `json:"found,omitempty"`
|
|
Revision int64 `json:"revision,omitempty"`
|
|
Seat string `json:"seat,omitempty"`
|
|
Seats []SeatDefinitionsAnswerSeatsItem `json:"seats,omitempty"`
|
|
}
|
|
|
|
// RevisionInput is what revision takes.
|
|
type RevisionInput struct {
|
|
// the last module of the page before; absent: the first page
|
|
After string `json:"after,omitempty"`
|
|
// the watched branch whose series is read, escaped as a key name is; absent: the branch the reader's placement names (design 47 *Watched branches and the catalog graph per branch*)
|
|
Branch string `json:"branch,omitempty"`
|
|
// a candidate's group
|
|
Group string `json:"group,omitempty"`
|
|
// a candidate's heads
|
|
Heads string `json:"heads,omitempty"`
|
|
// a kept revision; absent: the newest of trunk, or of the candidate named
|
|
Revision int64 `json:"revision,omitempty"`
|
|
}
|
|
|
|
// RevisionAnswer is what revision answers.
|
|
type RevisionAnswer struct {
|
|
// this page's entries whole, by module name
|
|
Entries []CatalogEntry `json:"entries,omitempty"`
|
|
// the module to ask after for the next page; absent on the last
|
|
Next string `json:"next,omitempty"`
|
|
// true for a watched branch with no revision yet: no revision, no entries and no error follow, and a reader holds the branch's view ready and empty (design 47 G section 530)
|
|
NoneYet bool `json:"none-yet,omitempty"`
|
|
Revision *CatalogRevision `json:"revision,omitempty"`
|
|
}
|
|
|
|
// RegistrationsInput is what registrations takes.
|
|
type RegistrationsInput struct {
|
|
// with every version of the one module
|
|
History bool `json:"history,omitempty"`
|
|
// one module; absent, every registration
|
|
Module string `json:"module,omitempty"`
|
|
}
|
|
|
|
// RegistrationsAnswer is what registrations answers.
|
|
type RegistrationsAnswer struct {
|
|
Fill *Fill `json:"fill,omitempty"`
|
|
// every version of the one module asked, oldest first
|
|
History []Registration `json:"history,omitempty"`
|
|
Registrations []Registration `json:"registrations"`
|
|
}
|
|
|
|
// RegisterInput is what register takes.
|
|
type RegisterInput struct {
|
|
Registration Registration `json:"registration"`
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// RegisterAnswer is what register answers.
|
|
type RegisterAnswer = RegistrationAsked
|
|
|
|
// PolicyInput is what policy takes.
|
|
type PolicyInput struct {
|
|
// one artifact; absent, the module's statuses
|
|
Artifact string `json:"artifact,omitempty"`
|
|
Module string `json:"module"`
|
|
Steps StepStatuses `json:"steps"`
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// PolicyAnswer is what policy answers.
|
|
type PolicyAnswer = RegistrationAsked
|
|
|
|
// WatchInput is what watch takes.
|
|
type WatchInput struct {
|
|
Branch string `json:"branch"`
|
|
Module string `json:"module"`
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// WatchAnswer is what watch answers.
|
|
type WatchAnswer = RegistrationAsked
|
|
|
|
// UnwatchInput is what unwatch takes.
|
|
type UnwatchInput struct {
|
|
Branch string `json:"branch"`
|
|
Module string `json:"module"`
|
|
Why string `json:"why,omitempty"`
|
|
}
|
|
|
|
// UnwatchAnswer is what unwatch answers.
|
|
type UnwatchAnswer = RegistrationAsked
|
|
|
|
// VersionsInput is what versions takes.
|
|
type VersionsInput struct {
|
|
// the module
|
|
Module string `json:"module"`
|
|
}
|
|
|
|
// VersionsAnswer is what versions answers.
|
|
type VersionsAnswer struct {
|
|
// the module
|
|
Module string `json:"module"`
|
|
Versions []VersionEntry `json:"versions"`
|
|
}
|
|
|
|
// OutdatedInput is what outdated takes.
|
|
type OutdatedInput struct {
|
|
// a watched branch, to answer for it alone
|
|
Branch string `json:"branch,omitempty"`
|
|
// one dependency, to answer for it alone
|
|
Dependency ArtifactRef `json:"dependency,omitempty"`
|
|
}
|
|
|
|
// OutdatedAnswer is what outdated answers.
|
|
type OutdatedAnswer struct {
|
|
Behind []Outdated `json:"behind"`
|
|
}
|
|
|
|
// InputInput is what input takes.
|
|
type InputInput struct {
|
|
// the input's sha256
|
|
Digest string `json:"digest"`
|
|
}
|
|
|
|
// InputAnswer is what input answers.
|
|
type InputAnswer struct {
|
|
// the input's sha256
|
|
Digest string `json:"digest"`
|
|
// the input's exact bytes, base64
|
|
Input string `json:"input"`
|
|
}
|
|
|
|
// EntryInput is what entry takes.
|
|
type EntryInput struct {
|
|
// the entry's fingerprint
|
|
Fingerprint string `json:"fingerprint"`
|
|
}
|
|
|
|
// EntryAnswer is what entry answers.
|
|
type EntryAnswer struct {
|
|
Entry CatalogEntry `json:"entry"`
|
|
}
|
|
|
|
// SeatDefinitionChangedEvent is the body of the event seat-definition-changed.
|
|
type SeatDefinitionChangedEvent struct {
|
|
Digest string `json:"digest"`
|
|
Seat string `json:"seat"`
|
|
// trunk
|
|
Source string `json:"source"`
|
|
}
|
|
|
|
// SeatDefinitionRemovedEvent is the body of the event seat-definition-removed.
|
|
type SeatDefinitionRemovedEvent struct {
|
|
Seat string `json:"seat"`
|
|
}
|
|
|
|
// ManifestAcceptedEventBusStateItem is a type of the contract.
|
|
type ManifestAcceptedEventBusStateItem struct {
|
|
Configuration map[string]any `json:"configuration,omitempty"`
|
|
Name string `json:"name"`
|
|
Options map[string]any `json:"options,omitempty"`
|
|
Storage string `json:"storage"`
|
|
Template string `json:"template,omitempty"`
|
|
Types []map[string]any `json:"types,omitempty"`
|
|
}
|
|
|
|
// ManifestAcceptedEvent is the body of the event manifest-accepted.
|
|
type ManifestAcceptedEvent struct {
|
|
BusState []ManifestAcceptedEventBusStateItem `json:"bus-state"`
|
|
Digest string `json:"digest"`
|
|
Judge string `json:"judge"`
|
|
Module string `json:"module"`
|
|
// each problem the indexer's re-judgement finds in a manifest it keeps accepted because its digest is unchanged: the manifest validator's strings, the same items its verdict writes as warnings, in the same order; an empty list when none (design 47 G section 668, 692)
|
|
Problems []string `json:"problems"`
|
|
// the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it
|
|
Revision int64 `json:"revision,omitempty"`
|
|
V int64 `json:"v"`
|
|
}
|
|
|
|
// ManifestRefusedEvent is the body of the event manifest-refused.
|
|
type ManifestRefusedEvent struct {
|
|
Digest string `json:"digest"`
|
|
Judge string `json:"judge"`
|
|
Module string `json:"module"`
|
|
Problems []string `json:"problems"`
|
|
// the indexer's revision of the verdict it says; a reader asks its first view again on a gap in it; zero from an indexer that does not say it
|
|
Revision int64 `json:"revision,omitempty"`
|
|
V int64 `json:"v"`
|
|
}
|
|
|
|
// CatalogRevisionEvent is the body of the event catalog-revision.
|
|
type CatalogRevisionEvent struct {
|
|
At *time.Time `json:"at,omitempty"`
|
|
// the watched branch the revision is of, escaped as a key name is
|
|
Branch string `json:"branch,omitempty"`
|
|
// the modules whose entries differ from the revision before it of the same kind
|
|
Changed []string `json:"changed,omitempty"`
|
|
// how many entries it lists
|
|
Entries int64 `json:"entries,omitempty"`
|
|
Group string `json:"group,omitempty"`
|
|
Heads string `json:"heads,omitempty"`
|
|
// trunk or candidate: a candidate's moves no running part
|
|
Kind string `json:"kind"`
|
|
Revision int64 `json:"revision"`
|
|
Source int64 `json:"source"`
|
|
V int64 `json:"v"`
|
|
}
|
|
|
|
// FillingEvent is the body of the event filling.
|
|
type FillingEvent = Fill
|
|
|
|
// FullEvent is the body of the event full.
|
|
type FullEvent = Fill
|
|
|
|
// RoomEvent is the body of the event room.
|
|
type RoomEvent = Fill
|
|
|
|
// RegistrationChangedEvent is the body of the event registration-changed.
|
|
type RegistrationChangedEvent struct {
|
|
At *time.Time `json:"at,omitempty"`
|
|
By string `json:"by,omitempty"`
|
|
Module string `json:"module"`
|
|
// every value it moved, one line each
|
|
Moved []string `json:"moved"`
|
|
V int64 `json:"v,omitempty"`
|
|
Version int64 `json:"version"`
|
|
Warrant string `json:"warrant"`
|
|
}
|
|
|
|
// VersionReleasedEvent is the body of the event version-released.
|
|
type VersionReleasedEvent struct {
|
|
// each artifact's digest
|
|
Artifacts []VersionArtifact `json:"artifacts"`
|
|
At *time.Time `json:"at,omitempty"`
|
|
// the module
|
|
Module string `json:"module"`
|
|
// the source revision built
|
|
Source int64 `json:"source"`
|
|
V int64 `json:"v"`
|
|
// MAJOR.MINOR.PATCH
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// VersionsFilledEvent is the body of the event versions-filled.
|
|
type VersionsFilledEvent struct {
|
|
At time.Time `json:"at"`
|
|
// how many modules were filled
|
|
Modules int64 `json:"modules,omitempty"`
|
|
V int64 `json:"v"`
|
|
}
|
|
|
|
// ManifestsByDigestValue is one value of the state manifests under the key <digest>.
|
|
type ManifestsByDigestValue struct {
|
|
// the manifest, UTF-8 JSON text
|
|
Manifest string `json:"manifest"`
|
|
Module string `json:"module"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// ModulesByModuleValueInputs2 is a type of the contract.
|
|
type ModulesByModuleValueInputs2 struct {
|
|
Bases []string `json:"bases,omitempty"`
|
|
Builder string `json:"builder,omitempty"`
|
|
Contexts map[string]string `json:"contexts,omitempty"`
|
|
ImportForm string `json:"import-form,omitempty"`
|
|
Imports []string `json:"imports,omitempty"`
|
|
Locks map[string]string `json:"locks,omitempty"`
|
|
Packages []string `json:"packages,omitempty"`
|
|
Paths map[string]string `json:"paths,omitempty"`
|
|
Tree string `json:"tree"`
|
|
}
|
|
|
|
// ModulesByModuleValue is one value of the state modules under the key <module>.
|
|
type ModulesByModuleValue struct {
|
|
Commit string `json:"commit"`
|
|
// the old-form fingerprint
|
|
Fp string `json:"fp,omitempty"`
|
|
FpSrc int64 `json:"fp-src,omitempty"`
|
|
// src2: fingerprint
|
|
Fp2 string `json:"fp2,omitempty"`
|
|
Inputs2 *ModulesByModuleValueInputs2 `json:"inputs2,omitempty"`
|
|
// manifest digest
|
|
Manifest string `json:"manifest,omitempty"`
|
|
Needs []string `json:"needs,omitempty"`
|
|
None string `json:"none,omitempty"`
|
|
// why it has none
|
|
None2 string `json:"none2,omitempty"`
|
|
Packages map[string]string `json:"packages,omitempty"`
|
|
Path string `json:"path,omitempty"`
|
|
Paths map[string][]string `json:"paths,omitempty"`
|
|
Problems []string `json:"problems,omitempty"`
|
|
Repository string `json:"repository"`
|
|
// the source revision
|
|
Src int64 `json:"src,omitempty"`
|
|
// by language: the toolchain FP2 was computed with
|
|
Toolchains map[string]ToolchainUsed `json:"toolchains,omitempty"`
|
|
Unknown []string `json:"unknown,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
Verdict string `json:"verdict,omitempty"`
|
|
Warnings []string `json:"warnings,omitempty"`
|
|
}
|
|
|
|
// CandidatesByGroupValuePullsItemFpsValue is a type of the contract.
|
|
type CandidatesByGroupValuePullsItemFpsValue struct {
|
|
Fp2 string `json:"fp2,omitempty"`
|
|
Manifest string `json:"manifest,omitempty"`
|
|
None2 string `json:"none2,omitempty"`
|
|
Packages map[string]string `json:"packages,omitempty"`
|
|
Paths map[string]string `json:"paths,omitempty"`
|
|
}
|
|
|
|
// CandidatesByGroupValuePullsItem is a type of the contract.
|
|
type CandidatesByGroupValuePullsItem struct {
|
|
Fps map[string]CandidatesByGroupValuePullsItemFpsValue `json:"fps,omitempty"`
|
|
Head string `json:"head"`
|
|
Modules []string `json:"modules"`
|
|
Number int64 `json:"number"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// CandidatesByGroupValue is one value of the state candidates under the key <group>.
|
|
type CandidatesByGroupValue struct {
|
|
// the source revision it is read on
|
|
Base int64 `json:"base"`
|
|
Fpset string `json:"fpset,omitempty"`
|
|
Group string `json:"group"`
|
|
Heads string `json:"heads"`
|
|
Pulls []CandidatesByGroupValuePullsItem `json:"pulls"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// VerdictsByDigestValue is one value of the state verdicts under the key <digest>.
|
|
type VerdictsByDigestValue struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
Judge string `json:"judge,omitempty"`
|
|
Module string `json:"module"`
|
|
Problems []string `json:"problems,omitempty"`
|
|
State string `json:"state"`
|
|
Unknown []string `json:"unknown,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
Warnings []string `json:"warnings,omitempty"`
|
|
}
|
|
|
|
// PredefinedByListValue is one value of the state predefined under the key list.
|
|
type PredefinedByListValue struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
Commit string `json:"commit"`
|
|
// the foundation's predefined list as kept
|
|
List any `json:"list"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// ConfigCandidatesByPullValueDeclaresValueValue is a type of the contract.
|
|
type ConfigCandidatesByPullValueDeclaresValueValue struct {
|
|
// the default
|
|
Default any `json:"default"`
|
|
Description string `json:"description,omitempty"`
|
|
// the allowed values
|
|
Enum any `json:"enum,omitempty"`
|
|
Kind string `json:"kind"`
|
|
// a declared bound; 0 is a bound, absent is none
|
|
Maximum *float64 `json:"maximum,omitempty"`
|
|
// a declared bound; 0 is a bound, absent is none
|
|
Minimum *float64 `json:"minimum,omitempty"`
|
|
Pattern string `json:"pattern,omitempty"`
|
|
Predefined string `json:"predefined,omitempty"`
|
|
Required bool `json:"required,omitempty"`
|
|
Runtime bool `json:"runtime,omitempty"`
|
|
Trusted bool `json:"trusted,omitempty"`
|
|
Type string `json:"type,omitempty"`
|
|
Why string `json:"why"`
|
|
}
|
|
|
|
// ConfigCandidatesByPullValue is one value of the state config-candidates under the key <pull>.
|
|
type ConfigCandidatesByPullValue struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
// module to key to declaration
|
|
Declares map[string]map[string]ConfigCandidatesByPullValueDeclaresValueValue `json:"declares"`
|
|
Head string `json:"head"`
|
|
Pull string `json:"pull"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// PackagesByModuleValuePackagesItem is a type of the contract.
|
|
type PackagesByModuleValuePackagesItem struct {
|
|
Digest string `json:"digest"`
|
|
Package string `json:"package"`
|
|
}
|
|
|
|
// PackagesByModuleValue is one value of the state packages under the key <module>.
|
|
type PackagesByModuleValue struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
Commit string `json:"commit"`
|
|
Dir string `json:"dir,omitempty"`
|
|
// the Go module path
|
|
Module string `json:"module"`
|
|
Packages []PackagesByModuleValuePackagesItem `json:"packages"`
|
|
Repository string `json:"repository"`
|
|
// digest of go.mod and go.sum
|
|
Requires string `json:"requires,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNewestContentsPackagesItem is a type of the contract.
|
|
type PackagesByPackageSeriesValueNewestContentsPackagesItem struct {
|
|
Digest string `json:"digest"`
|
|
Package string `json:"package"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNewestContents is a type of the contract.
|
|
type PackagesByPackageSeriesValueNewestContents struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
Commit string `json:"commit"`
|
|
Dir string `json:"dir,omitempty"`
|
|
// the Go module path
|
|
Module string `json:"module"`
|
|
Packages []PackagesByPackageSeriesValueNewestContentsPackagesItem `json:"packages"`
|
|
Repository string `json:"repository"`
|
|
// digest of go.mod and go.sum
|
|
Requires string `json:"requires,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNewest is a type of the contract.
|
|
type PackagesByPackageSeriesValueNewest struct {
|
|
Commit string `json:"commit,omitempty"`
|
|
Contents *PackagesByPackageSeriesValueNewestContents `json:"contents,omitempty"`
|
|
Digest string `json:"digest,omitempty"`
|
|
Fingerprint string `json:"fingerprint,omitempty"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNumberedContentsPackagesItem is a type of the contract.
|
|
type PackagesByPackageSeriesValueNumberedContentsPackagesItem struct {
|
|
Digest string `json:"digest"`
|
|
Package string `json:"package"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNumberedContents is a type of the contract.
|
|
type PackagesByPackageSeriesValueNumberedContents struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
Commit string `json:"commit"`
|
|
Dir string `json:"dir,omitempty"`
|
|
// the Go module path
|
|
Module string `json:"module"`
|
|
Packages []PackagesByPackageSeriesValueNumberedContentsPackagesItem `json:"packages"`
|
|
Repository string `json:"repository"`
|
|
// digest of go.mod and go.sum
|
|
Requires string `json:"requires,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValueNumbered is a type of the contract.
|
|
type PackagesByPackageSeriesValueNumbered struct {
|
|
Commit string `json:"commit,omitempty"`
|
|
Contents *PackagesByPackageSeriesValueNumberedContents `json:"contents,omitempty"`
|
|
Digest string `json:"digest,omitempty"`
|
|
Fingerprint string `json:"fingerprint,omitempty"`
|
|
Version string `json:"version"`
|
|
}
|
|
|
|
// PackagesByPackageSeriesValue is one value of the state packages under the key <package>.<series>.
|
|
type PackagesByPackageSeriesValue struct {
|
|
// when (RFC 3339 time)
|
|
At *time.Time `json:"at,omitempty"`
|
|
GoModule string `json:"go-module,omitempty"`
|
|
Name string `json:"name"`
|
|
Newest *PackagesByPackageSeriesValueNewest `json:"newest,omitempty"`
|
|
Numbered *PackagesByPackageSeriesValueNumbered `json:"numbered,omitempty"`
|
|
Package string `json:"package,omitempty"`
|
|
Seat string `json:"seat,omitempty"`
|
|
Series string `json:"series"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// CatalogRevisionsByBranchRevisionValue is one value of the state catalog-revisions under the key <branch>.<revision>.
|
|
type CatalogRevisionsByBranchRevisionValue = CatalogRevision
|
|
|
|
// CatalogRevisionsByCandidateGroupHeadsValue is one value of the state catalog-revisions under the key candidate.<group>.<heads>.
|
|
type CatalogRevisionsByCandidateGroupHeadsValue = CatalogRevision
|
|
|
|
// CatalogRevisionsByEntryDigestValue is one value of the state catalog-revisions under the key entry.<digest>.
|
|
type CatalogRevisionsByEntryDigestValue = CatalogEntry
|
|
|
|
// RegistrationsByModuleValue is one value of the state registrations under the key <module>.
|
|
type RegistrationsByModuleValue = Registration
|
|
|
|
// RegistrationHistoryByModuleVersionValue is one value of the state registration-history under the key <module>.<version>.
|
|
type RegistrationHistoryByModuleVersionValue = Registration
|
|
|
|
// VersionsByModuleVersionValue is one value of the state versions under the key <module>.<version>.
|
|
type VersionsByModuleVersionValue = VersionEntry
|
|
|
|
// BuildEdgesByModuleBranchValue is one value of the state build-edges under the key <module>.<branch>.
|
|
type BuildEdgesByModuleBranchValue = BuildEdges
|
|
|
|
// InputsByTimeDigestValue is one value of the state inputs under the key <time>.<digest>.
|
|
type InputsByTimeDigestValue = string
|