DC7 other-bytes: the publish answer of the four registry seats gains other-bytes, each seat one form higher
Builds: design 47 H2 H-A-729, H-A-589 (1), H-A-590 (2)
This commit is contained in:
@@ -13,7 +13,7 @@ const Seat = "container-image-registry"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 1
|
||||
const Form = 2
|
||||
|
||||
// FormRegistry is the form of what the part registry adds.
|
||||
const FormRegistry = 1
|
||||
@@ -21,8 +21,8 @@ const FormRegistry = 1
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "1 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd HeldEvent=b6d4c12500df Hold=c5a97a2f2d5a HoldAnswer=7d536ccb729f HoldsBySeatNameDigestValue=db093998a869 KeptEvent=ec3ef89ef8a7 ListAnswer=ca49dd7f20ee Listed=b9f1d1232e64 MirrorAnswer=0d59df97b53b NameOfAnswer=cc75a2f37394 Outcome=1e66f7bf6725 PublishAnswer=a0df0b922e1e PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 ReleaseAnswer=d30bd6000a16 ReleasedEvent=b6d4c12500df RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 Repository=740e54e0b3b0 TagsAnswer=fe178191458a TagsAnswerTagsItem=eee02e024d64 VersionsAnswer=47e11ca2aea9 WindowsByCallerValue=23d9294dde92 WindowsByCallerValueDroppedItem=d748f0e58825"
|
||||
generatedForms = "2 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd HeldEvent=b6d4c12500df Hold=c5a97a2f2d5a HoldAnswer=7d536ccb729f HoldsBySeatNameDigestValue=db093998a869 KeptEvent=ec3ef89ef8a7 ListAnswer=ca49dd7f20ee Listed=b9f1d1232e64 MirrorAnswer=0d59df97b53b NameOfAnswer=cc75a2f37394 Outcome=1e66f7bf6725 PublishAnswer=1923c8239f6c PublishAnswerOtherBytes=06b1c9853343 PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 ReleaseAnswer=d30bd6000a16 ReleasedEvent=b6d4c12500df RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 Repository=740e54e0b3b0 TagsAnswer=fe178191458a TagsAnswerTagsItem=eee02e024d64 VersionsAnswer=47e11ca2aea9 WindowsByCallerValue=23d9294dde92 WindowsByCallerValueDroppedItem=d748f0e58825"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -329,6 +329,14 @@ const (
|
||||
PublishInputKindUpstream = "upstream"
|
||||
)
|
||||
|
||||
// PublishAnswerOtherBytes is the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729).
|
||||
type PublishAnswerOtherBytes struct {
|
||||
// the digest the holder holds for that name and version
|
||||
Digest string `json:"digest"`
|
||||
// the fingerprint the holder keeps for it, absent where it keeps none
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
}
|
||||
|
||||
// PublishAnswer is what publish answers.
|
||||
type PublishAnswer struct {
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
@@ -337,6 +345,8 @@ type PublishAnswer struct {
|
||||
Held bool `json:"held,omitempty"`
|
||||
// the digests of the parts the holder lacks, to send by publish-part
|
||||
Lacks []string `json:"lacks,omitempty"`
|
||||
// the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729)
|
||||
OtherBytes *PublishAnswerOtherBytes `json:"other-bytes,omitempty"`
|
||||
// the transfer
|
||||
Transfer string `json:"transfer"`
|
||||
}
|
||||
|
||||
@@ -57,6 +57,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v NameOfInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "name-of answers the copy's reference", subject: "", given: "{\"reference\":\"container-image-registry/upstream/docker.io/library/nats@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\"}", wire: "{\"reference\":\"container-image-registry/upstream/docker.io/library/nats@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\"}",
|
||||
decode: func(b []byte) (any, error) { var v NameOfAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes: the name and version are held with another digest (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -12,7 +12,7 @@ const Seat = "go-package-registry"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 1
|
||||
const Form = 2
|
||||
|
||||
// FormRegistry is the form of what the part registry adds.
|
||||
const FormRegistry = 1
|
||||
@@ -20,8 +20,8 @@ const FormRegistry = 1
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "1 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd KeptEvent=ec3ef89ef8a7 Outcome=1e66f7bf6725 PublishAnswer=a0df0b922e1e PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 VersionsAnswer=47e11ca2aea9"
|
||||
generatedForms = "2 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd KeptEvent=ec3ef89ef8a7 Outcome=1e66f7bf6725 PublishAnswer=1923c8239f6c PublishAnswerOtherBytes=06b1c9853343 PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 VersionsAnswer=47e11ca2aea9"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -189,6 +189,14 @@ const (
|
||||
PublishInputKindUpstream = "upstream"
|
||||
)
|
||||
|
||||
// PublishAnswerOtherBytes is the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729).
|
||||
type PublishAnswerOtherBytes struct {
|
||||
// the digest the holder holds for that name and version
|
||||
Digest string `json:"digest"`
|
||||
// the fingerprint the holder keeps for it, absent where it keeps none
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
}
|
||||
|
||||
// PublishAnswer is what publish answers.
|
||||
type PublishAnswer struct {
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
@@ -197,6 +205,8 @@ type PublishAnswer struct {
|
||||
Held bool `json:"held,omitempty"`
|
||||
// the digests of the parts the holder lacks, to send by publish-part
|
||||
Lacks []string `json:"lacks,omitempty"`
|
||||
// the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729)
|
||||
OtherBytes *PublishAnswerOtherBytes `json:"other-bytes,omitempty"`
|
||||
// the transfer
|
||||
Transfer string `json:"transfer"`
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v VersionsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a tagged version sharing its digest with another tag is kept, not removed", subject: "", given: "{\"kept\":true,\"reason\":\"shared-digest\",\"removed\":false,\"tags\":[\"0.1.19\"]}", wire: "{\"kept\":true,\"reason\":\"shared-digest\",\"removed\":false,\"tags\":[\"0.1.19\"]}",
|
||||
decode: func(b []byte) (any, error) { var v RemoveAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes: the name and version are held with another digest (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -12,7 +12,7 @@ const Seat = "npm-package-registry"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 1
|
||||
const Form = 2
|
||||
|
||||
// FormRegistry is the form of what the part registry adds.
|
||||
const FormRegistry = 1
|
||||
@@ -20,8 +20,8 @@ const FormRegistry = 1
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "1 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd KeptEvent=ec3ef89ef8a7 Outcome=1e66f7bf6725 PublishAnswer=a0df0b922e1e PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 VersionsAnswer=47e11ca2aea9"
|
||||
generatedForms = "2 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd KeptEvent=ec3ef89ef8a7 Outcome=1e66f7bf6725 PublishAnswer=1923c8239f6c PublishAnswerOtherBytes=06b1c9853343 PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 VersionsAnswer=47e11ca2aea9"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -189,6 +189,14 @@ const (
|
||||
PublishInputKindUpstream = "upstream"
|
||||
)
|
||||
|
||||
// PublishAnswerOtherBytes is the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729).
|
||||
type PublishAnswerOtherBytes struct {
|
||||
// the digest the holder holds for that name and version
|
||||
Digest string `json:"digest"`
|
||||
// the fingerprint the holder keeps for it, absent where it keeps none
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
}
|
||||
|
||||
// PublishAnswer is what publish answers.
|
||||
type PublishAnswer struct {
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
@@ -197,6 +205,8 @@ type PublishAnswer struct {
|
||||
Held bool `json:"held,omitempty"`
|
||||
// the digests of the parts the holder lacks, to send by publish-part
|
||||
Lacks []string `json:"lacks,omitempty"`
|
||||
// the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729)
|
||||
OtherBytes *PublishAnswerOtherBytes `json:"other-bytes,omitempty"`
|
||||
// the transfer
|
||||
Transfer string `json:"transfer"`
|
||||
}
|
||||
|
||||
@@ -37,6 +37,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v VersionsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a tagged version sharing its digest with another tag is kept, not removed", subject: "", given: "{\"kept\":true,\"reason\":\"shared-digest\",\"removed\":false,\"tags\":[\"0.1.19\"]}", wire: "{\"kept\":true,\"reason\":\"shared-digest\",\"removed\":false,\"tags\":[\"0.1.19\"]}",
|
||||
decode: func(b []byte) (any, error) { var v RemoveAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes: the name and version are held with another digest (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -13,7 +13,7 @@ const Seat = "oci-artifact-registry"
|
||||
|
||||
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
|
||||
// a reader of a value of another form says "form N, this reader knows M".
|
||||
const Form = 2
|
||||
const Form = 3
|
||||
|
||||
// FormRegistry is the form of what the part registry adds.
|
||||
const FormRegistry = 1
|
||||
@@ -21,8 +21,8 @@ const FormRegistry = 1
|
||||
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
|
||||
// whose fields changed while its forms did not (design 47 H2 §780).
|
||||
const (
|
||||
generatedForms = "2 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd HeldEvent=b6d4c12500df Hold=c5a97a2f2d5a HoldAnswer=7d536ccb729f HoldsBySeatNameDigestValue=db093998a869 KeptEvent=ec3ef89ef8a7 ListAnswer=ffc9dd135c75 Listed=b9f1d1232e64 Outcome=1e66f7bf6725 PublishAnswer=a0df0b922e1e PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 ReleaseAnswer=d30bd6000a16 ReleasedEvent=b6d4c12500df RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 Repository=740e54e0b3b0 VersionsAnswer=47e11ca2aea9 WindowsByCallerValue=23d9294dde92 WindowsByCallerValueDroppedItem=d748f0e58825"
|
||||
generatedForms = "3 registry:1"
|
||||
generatedFieldsDigest = "Artifact=79361e4ab1cd HeldEvent=b6d4c12500df Hold=c5a97a2f2d5a HoldAnswer=7d536ccb729f HoldsBySeatNameDigestValue=db093998a869 KeptEvent=ec3ef89ef8a7 ListAnswer=ffc9dd135c75 Listed=b9f1d1232e64 Outcome=1e66f7bf6725 PublishAnswer=1923c8239f6c PublishAnswerOtherBytes=06b1c9853343 PublishPartAnswer=aebe3c6c89e9 PublishedEvent=ec3ef89ef8a7 RefusedEvent=ec3ef89ef8a7 ReleaseAnswer=d30bd6000a16 ReleasedEvent=b6d4c12500df RemoveAnswer=bccb5a322d69 RemovedEvent=ec3ef89ef8a7 Repository=740e54e0b3b0 VersionsAnswer=47e11ca2aea9 WindowsByCallerValue=23d9294dde92 WindowsByCallerValueDroppedItem=d748f0e58825"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -320,6 +320,14 @@ const (
|
||||
PublishInputKindUpstream = "upstream"
|
||||
)
|
||||
|
||||
// PublishAnswerOtherBytes is the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729).
|
||||
type PublishAnswerOtherBytes struct {
|
||||
// the digest the holder holds for that name and version
|
||||
Digest string `json:"digest"`
|
||||
// the fingerprint the holder keeps for it, absent where it keeps none
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
}
|
||||
|
||||
// PublishAnswer is what publish answers.
|
||||
type PublishAnswer struct {
|
||||
// is the form of what this value carries, left out while it is 1 (design 47 H2 §780).
|
||||
@@ -328,6 +336,8 @@ type PublishAnswer struct {
|
||||
Held bool `json:"held,omitempty"`
|
||||
// the digests of the parts the holder lacks, to send by publish-part
|
||||
Lacks []string `json:"lacks,omitempty"`
|
||||
// the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729)
|
||||
OtherBytes *PublishAnswerOtherBytes `json:"other-bytes,omitempty"`
|
||||
// the transfer
|
||||
Transfer string `json:"transfer"`
|
||||
}
|
||||
|
||||
@@ -57,6 +57,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v ListInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "list answers a capped page with the cursor of the next", subject: "", given: "{\"capped\":true,\"next\":\"c-4183\",\"repositories\":[{\"manifests\":[{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"held\":false,\"index\":false,\"size\":4096}],\"name\":\"mail/files\"}],\"total\":3}", wire: "{\"capped\":true,\"next\":\"c-4183\",\"repositories\":[{\"manifests\":[{\"digest\":\"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"held\":false,\"index\":false,\"size\":4096}],\"name\":\"mail/files\"}],\"total\":3}",
|
||||
decode: func(b []byte) (any, error) { var v ListAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes: the name and version are held with another digest (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\",\"fingerprint\":\"src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)", subject: "", given: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}", wire: "{\"other-bytes\":{\"digest\":\"sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\"},\"transfer\":\"\"}",
|
||||
decode: func(b []byte) (any, error) { var v PublishAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -80,6 +80,23 @@
|
||||
"held": {
|
||||
"type": "boolean",
|
||||
"description": "the digest is held already: nothing to send; the outcome follows as an event"
|
||||
},
|
||||
"other-bytes": {
|
||||
"type": "object",
|
||||
"description": "the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729)",
|
||||
"properties": {
|
||||
"digest": {
|
||||
"type": "string",
|
||||
"description": "the digest the holder holds for that name and version"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the fingerprint the holder keeps for it, absent where it keeps none"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"digest"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
||||
@@ -160,5 +160,26 @@
|
||||
"given": {
|
||||
"reference": "container-image-registry/upstream/docker.io/library/nats@sha256:eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes: the name and version are held with another digest (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
||||
"fingerprint": "src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"name": "hold",
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 \u00a72); never an image of the holder's own. Emits held.",
|
||||
"description": "Keep one untagged bundle, archive or copied base from removal by retention, as the artifact sweep's rules keep it (ADR 0617 §2); never an image of the holder's own. Emits held.",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -218,7 +218,7 @@
|
||||
},
|
||||
{
|
||||
"name": "list",
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every image manifest and index, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 \u00a73).",
|
||||
"description": "What the store holds of one repository, or of every repository the seat holds when none is named: every image manifest and index, each with its digest, whether it is an index (and the manifests an index names), the tags naming it, its size and whether it is held. Read from the store itself, so a manifest no tag names is listed too; it reads only (ADR 0632 §3).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -500,5 +500,6 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"form": 2
|
||||
}
|
||||
|
||||
@@ -106,5 +106,26 @@
|
||||
"0.1.19"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes: the name and version are held with another digest (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
||||
"fingerprint": "src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -31,5 +31,6 @@
|
||||
"description": "form none: the Go module proxy's read side, answered anonymously, with no credential (design 51)"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"form": 2
|
||||
}
|
||||
|
||||
@@ -106,5 +106,26 @@
|
||||
"0.1.19"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes: the name and version are held with another digest (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
||||
"fingerprint": "src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -31,5 +31,6 @@
|
||||
"description": "form none: the npm registry's read side, answered anonymously, with no credential (design 51)"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"form": 2
|
||||
}
|
||||
|
||||
@@ -164,5 +164,26 @@
|
||||
"total": 3,
|
||||
"next": "c-4183"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes: the name and version are held with another digest (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
|
||||
"fingerprint": "src2:dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "publish answers other-bytes, the holder keeping no fingerprint (H-A-729)",
|
||||
"of": "verb:publish.answer",
|
||||
"given": {
|
||||
"transfer": "",
|
||||
"other-bytes": {
|
||||
"digest": "sha256:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -397,5 +397,5 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
"form": 2
|
||||
"form": 3
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ export type KeptEvent = registry.KeptEvent;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishAnswerOtherBytes = registry.PublishAnswerOtherBytes;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
|
||||
+10
@@ -96,6 +96,14 @@ export interface PublishInput {
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
export interface PublishAnswerOtherBytes {
|
||||
/** the digest the holder holds for that name and version */
|
||||
"digest": string;
|
||||
/** the fingerprint the holder keeps for it, absent where it keeps none */
|
||||
"fingerprint"?: string;
|
||||
}
|
||||
|
||||
/** is what publish answers. */
|
||||
export interface PublishAnswer {
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
@@ -104,6 +112,8 @@ export interface PublishAnswer {
|
||||
"held"?: boolean;
|
||||
/** the digests of the parts the holder lacks, to send by publish-part */
|
||||
"lacks"?: string[];
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
"other-bytes"?: PublishAnswerOtherBytes;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export type KeptEvent = registry.KeptEvent;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishAnswerOtherBytes = registry.PublishAnswerOtherBytes;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
|
||||
+10
@@ -96,6 +96,14 @@ export interface PublishInput {
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
export interface PublishAnswerOtherBytes {
|
||||
/** the digest the holder holds for that name and version */
|
||||
"digest": string;
|
||||
/** the fingerprint the holder keeps for it, absent where it keeps none */
|
||||
"fingerprint"?: string;
|
||||
}
|
||||
|
||||
/** is what publish answers. */
|
||||
export interface PublishAnswer {
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
@@ -104,6 +112,8 @@ export interface PublishAnswer {
|
||||
"held"?: boolean;
|
||||
/** the digests of the parts the holder lacks, to send by publish-part */
|
||||
"lacks"?: string[];
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
"other-bytes"?: PublishAnswerOtherBytes;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ export type KeptEvent = registry.KeptEvent;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishAnswerOtherBytes = registry.PublishAnswerOtherBytes;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
|
||||
+10
@@ -96,6 +96,14 @@ export interface PublishInput {
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
export interface PublishAnswerOtherBytes {
|
||||
/** the digest the holder holds for that name and version */
|
||||
"digest": string;
|
||||
/** the fingerprint the holder keeps for it, absent where it keeps none */
|
||||
"fingerprint"?: string;
|
||||
}
|
||||
|
||||
/** is what publish answers. */
|
||||
export interface PublishAnswer {
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
@@ -104,6 +112,8 @@ export interface PublishAnswer {
|
||||
"held"?: boolean;
|
||||
/** the digests of the parts the holder lacks, to send by publish-part */
|
||||
"lacks"?: string[];
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
"other-bytes"?: PublishAnswerOtherBytes;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ export type KeptEvent = registry.KeptEvent;
|
||||
export type Outcome = registry.Outcome;
|
||||
export type Part = registry.Part;
|
||||
export type PublishAnswer = registry.PublishAnswer;
|
||||
export type PublishAnswerOtherBytes = registry.PublishAnswerOtherBytes;
|
||||
export type PublishInput = registry.PublishInput;
|
||||
export type PublishPartAnswer = registry.PublishPartAnswer;
|
||||
export type PublishPartInput = registry.PublishPartInput;
|
||||
|
||||
+10
@@ -96,6 +96,14 @@ export interface PublishInput {
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
export interface PublishAnswerOtherBytes {
|
||||
/** the digest the holder holds for that name and version */
|
||||
"digest": string;
|
||||
/** the fingerprint the holder keeps for it, absent where it keeps none */
|
||||
"fingerprint"?: string;
|
||||
}
|
||||
|
||||
/** is what publish answers. */
|
||||
export interface PublishAnswer {
|
||||
/** is the form of what this value carries, left out while it is 1 (design 47 H2 §780). */
|
||||
@@ -104,6 +112,8 @@ export interface PublishAnswer {
|
||||
"held"?: boolean;
|
||||
/** the digests of the parts the holder lacks, to send by publish-part */
|
||||
"lacks"?: string[];
|
||||
/** the holder holds that name and version with another digest: the digest and the fingerprint it keeps for them, answered instead of failing the call (the fingerprint absent where it keeps none); present only in that case, and never with lacks; the holder says both digests and both fingerprints in its journal (design 47 H2 H-A-589 (1), H-A-729) */
|
||||
"other-bytes"?: PublishAnswerOtherBytes;
|
||||
/** the transfer */
|
||||
"transfer": string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user