Remove gogoproto.customtype
gogoproto.customtype is used to have go-digest.Digest instead of string. While it is convinient, protoc-gen-go doesn't support the extension and that blocks #6564. Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
imagesapi "github.com/containerd/containerd/api/services/images/v1"
|
||||
"github.com/containerd/containerd/api/types"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/opencontainers/go-digest"
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
@@ -58,7 +59,7 @@ func descFromProto(desc *types.Descriptor) ocispec.Descriptor {
|
||||
return ocispec.Descriptor{
|
||||
MediaType: desc.MediaType,
|
||||
Size: desc.Size_,
|
||||
Digest: desc.Digest,
|
||||
Digest: digest.Digest(desc.Digest),
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
@@ -67,7 +68,7 @@ func descToProto(desc *ocispec.Descriptor) types.Descriptor {
|
||||
return types.Descriptor{
|
||||
MediaType: desc.MediaType,
|
||||
Size_: desc.Size,
|
||||
Digest: desc.Digest,
|
||||
Digest: desc.Digest.String(),
|
||||
Annotations: desc.Annotations,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user