File: types.go

package info (click to toggle)
docker.io 26.1.5%2Bdfsg1-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 68,644 kB
  • sloc: sh: 5,748; makefile: 912; ansic: 664; asm: 228; python: 162
file content (54 lines) | stat: -rw-r--r-- 997 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package sourceresolver

import (
	"context"

	"github.com/moby/buildkit/solver/pb"
	spb "github.com/moby/buildkit/sourcepolicy/pb"
	digest "github.com/opencontainers/go-digest"
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
)

type ResolverType int

const (
	ResolverTypeRegistry ResolverType = iota
	ResolverTypeOCILayout
)

type MetaResolver interface {
	ResolveSourceMetadata(ctx context.Context, op *pb.SourceOp, opt Opt) (*MetaResponse, error)
}

type Opt struct {
	LogName        string
	SourcePolicies []*spb.Policy
	Platform       *ocispecs.Platform

	ImageOpt     *ResolveImageOpt
	OCILayoutOpt *ResolveOCILayoutOpt
}

type MetaResponse struct {
	Op *pb.SourceOp

	Image *ResolveImageResponse
}

type ResolveImageOpt struct {
	ResolveMode string
}

type ResolveImageResponse struct {
	Digest digest.Digest
	Config []byte
}

type ResolveOCILayoutOpt struct {
	Store ResolveImageConfigOptStore
}

type ResolveImageConfigOptStore struct {
	SessionID string
	StoreID   string
}