Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/content-service-api/go/content-manifest.go
2500 views
1
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package api
6
7
import (
8
digest "github.com/opencontainers/go-digest"
9
ociv1 "github.com/opencontainers/image-spec/specs-go/v1"
10
)
11
12
const (
13
// ContentTypeManifest manifest is the content type for a JSON serialized WorkspaceContentManifest
14
ContentTypeManifest = "application/vnd.gitpod.ws.manifest.v1+json"
15
16
// MediaTypeUncompressedLayer is a valid OCIv1 media type for uncompressed layer archives
17
MediaTypeUncompressedLayer = ociv1.MediaTypeImageLayer
18
)
19
20
// WorkspaceContentManifest describes the content that makes up a workspace
21
type WorkspaceContentManifest struct {
22
Layers []WorkspaceContentLayer `json:"layers"`
23
}
24
25
// WorkspaceContentLayer describes the disposition of a single content layer.
26
type WorkspaceContentLayer struct {
27
ociv1.Descriptor
28
29
// Bucket where to find the actual layer file.
30
Bucket string `json:"bucket"`
31
// Object naem of the actual layer file in the bucket.
32
Object string `json:"object"`
33
// DiffID is the digest of the uncompressed targeted content.
34
DiffID digest.Digest `json:"diffID"`
35
36
// Workspace instance ID this content layer came from
37
InstanceID string `json:"instanceID"`
38
}
39
40