Builds: design 47 G §528, §645, §321 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
567 lines
20 KiB
Go
567 lines
20 KiB
Go
// Code generated by seatgen from the seat definitions; DO NOT EDIT.
|
|
|
|
// Package meshdeliverychecker is the contract of the seat "mesh-delivery-checker", defined whole (seats/mesh-delivery-checker/seat.json): The merge check's tries: start one, read one, end one. The seat says each check's end as checked and what the checker owes the forge as owed; the checker's other events stay under its own subjects (ADR 0620 §2).
|
|
package meshdeliverychecker
|
|
|
|
import (
|
|
"bytes"
|
|
"encoding/json"
|
|
"errors"
|
|
"strings"
|
|
"time"
|
|
)
|
|
|
|
// Seat is the seat's name.
|
|
const Seat = "mesh-delivery-checker"
|
|
|
|
const (
|
|
VerbTry = "try"
|
|
VerbTryRead = "try-read"
|
|
VerbTryEnd = "try-end"
|
|
VerbInput = "input"
|
|
)
|
|
|
|
const (
|
|
EventChecked = "checked"
|
|
EventOwed = "owed"
|
|
)
|
|
|
|
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
|
func Verbs() []string {
|
|
return []string{VerbTry, VerbTryRead, VerbTryEnd, VerbInput}
|
|
}
|
|
|
|
// Events is every event published on the seat's subject: a new copy each call.
|
|
func Events() []string {
|
|
return []string{EventChecked, EventOwed}
|
|
}
|
|
|
|
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
|
const (
|
|
Family = "mesh-delivery-checker.events"
|
|
FamilyMaxAgeDays = 7
|
|
)
|
|
|
|
// SubjectChecked is where checked is published.
|
|
const SubjectChecked = "mesh.seat.mesh-delivery-checker.event.checked"
|
|
|
|
// StreamOwed is the stream owed is kept in.
|
|
const StreamOwed = "SEAT_mesh-delivery-checker_owed"
|
|
|
|
// SubjectOwed is where owed is published, on mesh.seat.mesh-delivery-checker.event.owed.<repository>.<number>.
|
|
func SubjectOwed(repository, number string) string {
|
|
return "mesh.seat.mesh-delivery-checker.event.owed." + repository + "." + number
|
|
}
|
|
|
|
// SubjectOwedAll hears every owed.
|
|
const SubjectOwedAll = "mesh.seat.mesh-delivery-checker.event.owed.*.*"
|
|
|
|
// The holder's own events, listed beside the seat and published under the holder's subjects (ADR 0620 §2).
|
|
const (
|
|
HolderEventVerdict = "verdict"
|
|
HolderEventPreviewWritten = "preview.written"
|
|
)
|
|
|
|
// HolderSubjectVerdict is where the holder publishes verdict, kept in checker.asks.
|
|
func HolderSubjectVerdict(holder string) string { return "mesh.stream." + holder + ".event.verdict" }
|
|
|
|
// HolderSubjectPreviewWritten is where the holder publishes preview.written, kept in checks.
|
|
func HolderSubjectPreviewWritten(holder string) string {
|
|
return "mesh.stream." + holder + ".event.preview.written"
|
|
}
|
|
|
|
const (
|
|
StateVerdicts = "verdicts"
|
|
StateKept = "kept"
|
|
StateOwed = "owed"
|
|
StatePreviews = "previews"
|
|
)
|
|
|
|
// VerdictsByGroupHeadsKey is the key of one value of the state verdicts under the form "<group>.<heads>".
|
|
func VerdictsByGroupHeadsKey(group, heads string) string { return group + "." + heads }
|
|
|
|
// ParseVerdictsByGroupHeadsKey reads the parts of a key of the form "<group>.<heads>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseVerdictsByGroupHeadsKey(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
|
|
}
|
|
|
|
// DecodeVerdictsByGroupHeadsValue reads one value of the state verdicts under the form "<group>.<heads>", refusing a field VerdictsByGroupHeadsValue does not know and any text after the value.
|
|
func DecodeVerdictsByGroupHeadsValue(raw []byte) (VerdictsByGroupHeadsValue, error) {
|
|
var v VerdictsByGroupHeadsValue
|
|
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
|
|
}
|
|
|
|
// KeptByLevelDigestKey is the key of one value of the state kept under the form "<level>.<digest>".
|
|
func KeptByLevelDigestKey(level, digest string) string { return level + "." + digest }
|
|
|
|
// ParseKeptByLevelDigestKey reads the parts of a key of the form "<level>.<digest>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseKeptByLevelDigestKey(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
|
|
}
|
|
|
|
// DecodeKeptByLevelDigestValue reads one value of the state kept under the form "<level>.<digest>", refusing a field KeptByLevelDigestValue does not know and any text after the value.
|
|
func DecodeKeptByLevelDigestValue(raw []byte) (KeptByLevelDigestValue, error) {
|
|
var v KeptByLevelDigestValue
|
|
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
|
|
}
|
|
|
|
// OwedByRepositoryNumberHeadActKey is the key of one value of the state owed under the form "<repository>.<number>.<head>.<act>".
|
|
func OwedByRepositoryNumberHeadActKey(repository, number, head, act string) string {
|
|
return repository + "." + number + "." + head + "." + act
|
|
}
|
|
|
|
// ParseOwedByRepositoryNumberHeadActKey reads the parts of a key of the form "<repository>.<number>.<head>.<act>", in the order of the form; the last result is false for a key of another form.
|
|
func ParseOwedByRepositoryNumberHeadActKey(key string) (string, string, string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", "", "", false
|
|
}
|
|
rest = after0
|
|
v2, after2, found2 := strings.Cut(rest, ".")
|
|
if !found2 || v2 == "" {
|
|
return "", "", "", "", false
|
|
}
|
|
rest = after2
|
|
v4, after4, found4 := strings.Cut(rest, ".")
|
|
if !found4 || v4 == "" {
|
|
return "", "", "", "", false
|
|
}
|
|
rest = after4
|
|
if rest == "" {
|
|
return "", "", "", "", false
|
|
}
|
|
v6 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", "", "", false
|
|
}
|
|
return v0, v2, v4, v6, true
|
|
}
|
|
|
|
// DecodeOwedByRepositoryNumberHeadActValue reads one value of the state owed under the form "<repository>.<number>.<head>.<act>", refusing a field OwedByRepositoryNumberHeadActValue does not know and any text after the value.
|
|
func DecodeOwedByRepositoryNumberHeadActValue(raw []byte) (OwedByRepositoryNumberHeadActValue, error) {
|
|
var v OwedByRepositoryNumberHeadActValue
|
|
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
|
|
}
|
|
|
|
// PreviewsByRepositoryHeadTrunkKey is the key of one value of the state previews under the form "<repository>.<head>.<trunk>".
|
|
func PreviewsByRepositoryHeadTrunkKey(repository, head, trunk string) string {
|
|
return repository + "." + head + "." + trunk
|
|
}
|
|
|
|
// ParsePreviewsByRepositoryHeadTrunkKey reads the parts of a key of the form "<repository>.<head>.<trunk>", in the order of the form; the last result is false for a key of another form.
|
|
func ParsePreviewsByRepositoryHeadTrunkKey(key string) (string, string, string, bool) {
|
|
rest := key
|
|
v0, after0, found0 := strings.Cut(rest, ".")
|
|
if !found0 || v0 == "" {
|
|
return "", "", "", false
|
|
}
|
|
rest = after0
|
|
v2, after2, found2 := strings.Cut(rest, ".")
|
|
if !found2 || v2 == "" {
|
|
return "", "", "", false
|
|
}
|
|
rest = after2
|
|
if rest == "" {
|
|
return "", "", "", false
|
|
}
|
|
v4 := rest
|
|
rest = ""
|
|
if rest != "" {
|
|
return "", "", "", false
|
|
}
|
|
return v0, v2, v4, true
|
|
}
|
|
|
|
// DecodePreviewsByRepositoryHeadTrunkValue reads one value of the state previews under the form "<repository>.<head>.<trunk>", refusing a field PreviewsByRepositoryHeadTrunkValue does not know and any text after the value.
|
|
func DecodePreviewsByRepositoryHeadTrunkValue(raw []byte) (PreviewsByRepositoryHeadTrunkValue, error) {
|
|
var v PreviewsByRepositoryHeadTrunkValue
|
|
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
|
|
}
|
|
|
|
// CheckedEntry is one entry of the candidate checked: a module at its fingerprint.
|
|
type CheckedEntry struct {
|
|
// the entry's fingerprint
|
|
Fp string `json:"fp"`
|
|
// the module
|
|
Module string `json:"module"`
|
|
// the node it was composed for, when the check composed it on one
|
|
Node string `json:"node,omitempty"`
|
|
}
|
|
|
|
// Owed is the status the checker owes the forge for a head, said under its id and safe to repeat (a status replaces what stands); the forge bridge performs it through the seat git's verb status (design 47 *What the gate owes the forge*).
|
|
type Owed struct {
|
|
// the act: always status
|
|
Act string `json:"act"`
|
|
// its context, mesh/check
|
|
Context string `json:"context"`
|
|
// what it says
|
|
Description string `json:"description,omitempty"`
|
|
// the pull request's head the status is on
|
|
Head string `json:"head"`
|
|
// the act's id, the same each time it is said again
|
|
ID string `json:"id"`
|
|
// the pull request's number
|
|
Number int64 `json:"number"`
|
|
// the repository, <owner>/<name>
|
|
Repository string `json:"repository"`
|
|
// when the checker first said it
|
|
Said *time.Time `json:"said,omitempty"`
|
|
// pending, success, failure or error
|
|
State string `json:"state"`
|
|
// the page it links to
|
|
Target string `json:"target,omitempty"`
|
|
}
|
|
|
|
// The values of Owed's act.
|
|
const (
|
|
OwedActStatus = "status"
|
|
)
|
|
|
|
// TryInputMembersItem is a type of the contract.
|
|
type TryInputMembersItem struct {
|
|
// the full commit to try, 40 or 64 hex digits
|
|
Head string `json:"head"`
|
|
// <owner>/<name>
|
|
Repository string `json:"repository"`
|
|
// the trunk commit to merge it onto, or the trunk's branch for its head now; the trunk's head when absent
|
|
Trunk string `json:"trunk,omitempty"`
|
|
}
|
|
|
|
// TryInput is what try takes.
|
|
type TryInput struct {
|
|
// the full commit to try, 40 or 64 hex digits, for a try of one member (instead of members)
|
|
Head string `json:"head,omitempty"`
|
|
// unit or integration: only this level; both when absent
|
|
Level string `json:"level,omitempty"`
|
|
// the group: one repository at most once, each at the exact commit asked and the trunk commit it is merged onto; instead of repository and head
|
|
Members []TryInputMembersItem `json:"members,omitempty"`
|
|
// <owner>/<name>, for a try of one member (instead of members)
|
|
Repository string `json:"repository,omitempty"`
|
|
// a go test -run pattern: only those tests run, and nothing is kept
|
|
Tests string `json:"tests,omitempty"`
|
|
// the trunk commit to merge it onto, or the trunk's branch for its head now; the trunk's head when absent
|
|
Trunk string `json:"trunk,omitempty"`
|
|
}
|
|
|
|
// TryAnswer is what try answers.
|
|
type TryAnswer struct {
|
|
// the try's id
|
|
ID string `json:"id"`
|
|
// its state
|
|
State string `json:"state,omitempty"`
|
|
}
|
|
|
|
// TryReadInput is what try-read takes.
|
|
type TryReadInput struct {
|
|
// the try's id, try-<digits>
|
|
ID string `json:"id"`
|
|
}
|
|
|
|
// TryReadAnswer is what try-read answers.
|
|
type TryReadAnswer = map[string]any
|
|
|
|
// TryEndInput is what try-end takes.
|
|
type TryEndInput struct {
|
|
// the try's id, try-<digits>
|
|
ID string `json:"id"`
|
|
// why it is ended, in words
|
|
Why string `json:"why"`
|
|
}
|
|
|
|
// TryEndAnswer is what try-end answers.
|
|
type TryEndAnswer struct {
|
|
// it is ended
|
|
Ended bool `json:"ended"`
|
|
// the try
|
|
ID string `json:"id"`
|
|
}
|
|
|
|
// InputInput is what input takes.
|
|
type InputInput struct {
|
|
// the input's sha256, 64 lowercase hex digits, as the run ask names it
|
|
Digest string `json:"digest"`
|
|
}
|
|
|
|
// InputAnswer is what input answers.
|
|
type InputAnswer struct {
|
|
// the digest asked
|
|
Digest string `json:"digest"`
|
|
// the input's exact bytes, base64, so no encoding on the way changes a byte the digest covers
|
|
Input string `json:"input"`
|
|
}
|
|
|
|
// CheckedEvent is the body of the event checked.
|
|
type CheckedEvent struct {
|
|
// when
|
|
At *time.Time `json:"at,omitempty"`
|
|
// the candidate's catalog graph revision judged, by its number on the seat mesh-catalog
|
|
Catalog int64 `json:"catalog,omitempty"`
|
|
// the entries checked
|
|
Entries []CheckedEntry `json:"entries,omitempty"`
|
|
// the group, its branch
|
|
Group string `json:"group"`
|
|
// the heads checked, 12 hex digits, as the candidate's revisions are keyed
|
|
Heads string `json:"heads"`
|
|
// the source revision the heads are merged onto
|
|
Source int64 `json:"source,omitempty"`
|
|
// pass, fail, or could not run when a part the check needs did not answer
|
|
Verdict string `json:"verdict"`
|
|
// what failed first, or the part not heard
|
|
Words string `json:"words,omitempty"`
|
|
}
|
|
|
|
// The values of CheckedEvent's verdict.
|
|
const (
|
|
CheckedEventVerdictPass = "pass"
|
|
CheckedEventVerdictFail = "fail"
|
|
CheckedEventVerdictCouldNotRun = "could not run"
|
|
)
|
|
|
|
// OwedEvent is the body of the event owed.
|
|
type OwedEvent = Owed
|
|
|
|
// VerdictHolderEventSeriesItem is a type of the contract.
|
|
type VerdictHolderEventSeriesItem struct {
|
|
// its artifact, or the package's ecosystem name as the module's packages name it
|
|
Artifact string `json:"artifact"`
|
|
// the series on trunk
|
|
From string `json:"from"`
|
|
// the module whose artifact's series changes
|
|
Module string `json:"module"`
|
|
// the series the checked head gives it
|
|
To string `json:"to"`
|
|
}
|
|
|
|
// VerdictHolderEvent is the body of the holder's event verdict.
|
|
type VerdictHolderEvent struct {
|
|
// the commit checked
|
|
Head string `json:"head"`
|
|
// the generated files out of step with their seat definitions, each path (design 26)
|
|
OutOfStep []string `json:"out-of-step,omitempty"`
|
|
// the pull request's number, for a pull request's check
|
|
Pull int64 `json:"pull,omitempty"`
|
|
// owner/repo
|
|
Repository string `json:"repository"`
|
|
// each change of an artifact's series the checked head makes against trunk's manifests, once each (design 32); absent when it changes none
|
|
Series []VerdictHolderEventSeriesItem `json:"series,omitempty"`
|
|
// pass or fail
|
|
Verdict string `json:"verdict"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueComposition is a type of the contract.
|
|
type VerdictsByGroupHeadsValueComposition struct {
|
|
Fpset string `json:"fpset,omitempty"`
|
|
Machines []string `json:"machines,omitempty"`
|
|
Sdk string `json:"sdk,omitempty"`
|
|
// not-run, pass or fail
|
|
State string `json:"state"`
|
|
Words string `json:"words,omitempty"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueFailed is a type of the contract.
|
|
type VerdictsByGroupHeadsValueFailed struct {
|
|
Machine string `json:"machine,omitempty"`
|
|
Test string `json:"test,omitempty"`
|
|
Words string `json:"words,omitempty"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueFailuresItem is a type of the contract.
|
|
type VerdictsByGroupHeadsValueFailuresItem struct {
|
|
Machine string `json:"machine,omitempty"`
|
|
Test string `json:"test,omitempty"`
|
|
Words string `json:"words,omitempty"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueJudgedByHeadsItem is a type of the contract.
|
|
type VerdictsByGroupHeadsValueJudgedByHeadsItem struct {
|
|
Commit string `json:"commit"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueJudgedByProgram is a type of the contract.
|
|
type VerdictsByGroupHeadsValueJudgedByProgram struct {
|
|
Commit string `json:"commit"`
|
|
Dir string `json:"dir"`
|
|
Package string `json:"package"`
|
|
Repository string `json:"repository"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueJudgedBy is the checking program that judged the check: where it was built, the key its build is kept under, whether this check's run built it, and the heads it read (ADR 0644, ADR 0656). Absent in a value written before it.
|
|
type VerdictsByGroupHeadsValueJudgedBy struct {
|
|
Built bool `json:"built,omitempty"`
|
|
Heads []VerdictsByGroupHeadsValueJudgedByHeadsItem `json:"heads"`
|
|
// program- and 16 hex digits
|
|
Key string `json:"key"`
|
|
Program VerdictsByGroupHeadsValueJudgedByProgram `json:"program"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueLevelsValue is a type of the contract.
|
|
type VerdictsByGroupHeadsValueLevelsValue struct {
|
|
Kept int64 `json:"kept"`
|
|
Run int64 `json:"run"`
|
|
Skipped int64 `json:"skipped,omitempty"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueSeriesItem is a type of the contract.
|
|
type VerdictsByGroupHeadsValueSeriesItem struct {
|
|
Artifact string `json:"artifact"`
|
|
From string `json:"from"`
|
|
Module string `json:"module"`
|
|
To string `json:"to"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValueTook is milliseconds.
|
|
type VerdictsByGroupHeadsValueTook struct {
|
|
Clone int64 `json:"clone,omitempty"`
|
|
Composition int64 `json:"composition,omitempty"`
|
|
IntegrationRun int64 `json:"integration-run,omitempty"`
|
|
IntegrationSetup int64 `json:"integration-setup,omitempty"`
|
|
Lint int64 `json:"lint,omitempty"`
|
|
Queue int64 `json:"queue,omitempty"`
|
|
Unit int64 `json:"unit,omitempty"`
|
|
}
|
|
|
|
// VerdictsByGroupHeadsValue is one value of the state verdicts under the key <group>.<heads>.
|
|
type VerdictsByGroupHeadsValue struct {
|
|
Beside map[string]string `json:"beside,omitempty"`
|
|
CarriedFrom map[string]string `json:"carried-from,omitempty"`
|
|
Composition *VerdictsByGroupHeadsValueComposition `json:"composition,omitempty"`
|
|
Failed *VerdictsByGroupHeadsValueFailed `json:"failed,omitempty"`
|
|
Failures []VerdictsByGroupHeadsValueFailuresItem `json:"failures,omitempty"`
|
|
Group string `json:"group"`
|
|
// 12 hex digits
|
|
Heads string `json:"heads"`
|
|
// the checking program that judged the check: where it was built, the key its build is kept under, whether this check's run built it, and the heads it read (ADR 0644, ADR 0656). Absent in a value written before it
|
|
JudgedBy *VerdictsByGroupHeadsValueJudgedBy `json:"judged-by,omitempty"`
|
|
// by level, unit or integration
|
|
Levels map[string]VerdictsByGroupHeadsValueLevelsValue `json:"levels,omitempty"`
|
|
Machines []string `json:"machines,omitempty"`
|
|
OverBound []string `json:"over-bound,omitempty"`
|
|
Sdk string `json:"sdk,omitempty"`
|
|
Series []VerdictsByGroupHeadsValueSeriesItem `json:"series,omitempty"`
|
|
// running, pass or fail
|
|
State string `json:"state"`
|
|
// milliseconds
|
|
Took *VerdictsByGroupHeadsValueTook `json:"took,omitempty"`
|
|
// repository to the trunk head merged onto
|
|
Trunk map[string]string `json:"trunk,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// KeptByLevelDigestValue is one value of the state kept under the key <level>.<digest>.
|
|
type KeptByLevelDigestValue struct {
|
|
// when (RFC 3339 time)
|
|
At string `json:"at,omitempty"`
|
|
Level string `json:"level"`
|
|
Package string `json:"package"`
|
|
Repository string `json:"repository"`
|
|
// pass: a failure is never kept
|
|
State string `json:"state"`
|
|
Tests int64 `json:"tests,omitempty"`
|
|
Took int64 `json:"took,omitempty"`
|
|
Toolchain string `json:"toolchain,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// OwedByRepositoryNumberHeadActValue is one value of the state owed under the key <repository>.<number>.<head>.<act>.
|
|
type OwedByRepositoryNumberHeadActValue struct {
|
|
// status=<context>, view, note or comment.<seq>
|
|
Act string `json:"act"`
|
|
Context string `json:"context,omitempty"`
|
|
Ref string `json:"ref,omitempty"`
|
|
State string `json:"state,omitempty"`
|
|
Target string `json:"target,omitempty"`
|
|
Text string `json:"text,omitempty"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|
|
|
|
// PreviewsByRepositoryHeadTrunkValueModulesValue is a type of the contract.
|
|
type PreviewsByRepositoryHeadTrunkValueModulesValue struct {
|
|
Locks map[string]string `json:"locks,omitempty"`
|
|
// manifest digest
|
|
Manifest string `json:"manifest"`
|
|
Packages []string `json:"packages,omitempty"`
|
|
Paths map[string]string `json:"paths,omitempty"`
|
|
Tree string `json:"tree"`
|
|
}
|
|
|
|
// PreviewsByRepositoryHeadTrunkValue is one value of the state previews under the key <repository>.<head>.<trunk>.
|
|
type PreviewsByRepositoryHeadTrunkValue struct {
|
|
// files in conflict
|
|
Conflicts []string `json:"conflicts,omitempty"`
|
|
Head string `json:"head"`
|
|
// the merge commit
|
|
Merge string `json:"merge,omitempty"`
|
|
// by directory
|
|
Modules map[string]PreviewsByRepositoryHeadTrunkValueModulesValue `json:"modules,omitempty"`
|
|
Repository string `json:"repository"`
|
|
Trunk string `json:"trunk"`
|
|
// the layout version
|
|
V int64 `json:"v,omitempty"`
|
|
}
|