Skip to content

Commit 3c368d3

Browse files
committed
internal/mod/modregistry: new package
Note: experimental feature. This provides a CUE-centric interface for fetching and putting modules to an OCI registry. The module-uploading API splits the checking and the uploading from one another so that the caller is free to implement more checks without needing to duplicate the checking work, while still giving good confidence that the basic checks have taken place. This adds three new dependencies to go.mod; one (ociregistry) is maintained by ourselves; the others are generally considered foundational to the OCI ecosystem, are small (<1000 lines), stable (they're maintained by the core OCI maintainers), and have minimal dependencies themselves: github.com/opencontainers/image-spec github.com/opencontainers/go-digest image-spec provides the core definition of the OCI manifest struct type. go-digest is depended on by that to provide the hashing defined by the spec. For #2330. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I787085894f7191e24630bcf49775c713e593819e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/557457 Reviewed-by: Daniel Martí <[email protected]> Reviewed-by: Paul Jolly <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
1 parent e3d42af commit 3c368d3

File tree

4 files changed

+602
-0
lines changed

4 files changed

+602
-0
lines changed

go.mod

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module cuelang.org/go
33
go 1.20
44

55
require (
6+
cuelabs.dev/go/oci/ociregistry v0.0.0-20230802165206-d5c26bbb71e9
67
github.com/cockroachdb/apd/v3 v3.2.1
78
github.com/emicklei/proto v1.10.0
89
github.com/go-quicktest/qt v1.101.0
@@ -11,6 +12,8 @@ require (
1112
github.com/google/uuid v1.2.0
1213
github.com/kr/pretty v0.3.1
1314
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de
15+
github.com/opencontainers/go-digest v1.0.0
16+
github.com/opencontainers/image-spec v1.1.0-rc4
1417
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0
1518
github.com/rogpeppe/go-internal v1.11.1-0.20230926105539-32ae33786ecc
1619
github.com/spf13/cobra v1.7.0

go.sum

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
cuelabs.dev/go/oci/ociregistry v0.0.0-20230802165206-d5c26bbb71e9 h1:csvQm6RHCrV0KcjWiI5ZXCbmbqO9xsfVO6+lEm8Mfxc=
2+
cuelabs.dev/go/oci/ociregistry v0.0.0-20230802165206-d5c26bbb71e9/go.mod h1:TwQm/ek5h72Rl2KOtWOW3EsC+7mKJ05cbGojNxvRwAo=
13
github.com/cockroachdb/apd/v3 v3.2.1 h1:U+8j7t0axsIgvQUqthuNm82HIrYXodOV2iWLWtEaIwg=
24
github.com/cockroachdb/apd/v3 v3.2.1/go.mod h1:klXJcjp+FffLTHlhIG69tezTDvdP065naDsHzKhYSqc=
35
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -24,6 +26,10 @@ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQ
2426
github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0=
2527
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de h1:D5x39vF5KCwKQaw+OC9ZPiLVHXz3UFw2+psEX+gYcto=
2628
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de/go.mod h1:kJun4WP5gFuHZgRjZUWWuH1DTxCtxbHDOIJsudS8jzY=
29+
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
30+
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
31+
github.com/opencontainers/image-spec v1.1.0-rc4 h1:oOxKUJWnFC4YGHCCMNql1x4YaDfYBTS5Y4x/Cgeo1E0=
32+
github.com/opencontainers/image-spec v1.1.0-rc4/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8=
2733
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
2834
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0 h1:sadMIsgmHpEOGbUs6VtHBXRR1OHevnj7hLx9ZcdNGW4=
2935
github.com/protocolbuffers/txtpbfmt v0.0.0-20230328191034-3462fbc510c0/go.mod h1:jgxiZysxFPM+iWKwQwPR+y+Jvo54ARd4EisXxKYpB5c=

0 commit comments

Comments
 (0)