mirror of
				https://gitea.com/Lydanne/buildx.git
				synced 2025-11-04 10:03:42 +08:00 
			
		
		
		
	vendor: github.com/moby/buildkit db304eb93126 (v0.13.0-dev)
full diff: d6e142600e...db304eb931
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
			
			
This commit is contained in:
		
							
								
								
									
										5
									
								
								vendor/github.com/moby/buildkit/client/build.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/moby/buildkit/client/build.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -84,6 +84,11 @@ func (g *gatewayClientForBuild) ResolveImageConfig(ctx context.Context, in *gate
 | 
			
		||||
	return g.gateway.ResolveImageConfig(ctx, in, opts...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (g *gatewayClientForBuild) ResolveSourceMeta(ctx context.Context, in *gatewayapi.ResolveSourceMetaRequest, opts ...grpc.CallOption) (*gatewayapi.ResolveSourceMetaResponse, error) {
 | 
			
		||||
	ctx = buildid.AppendToOutgoingContext(ctx, g.buildID)
 | 
			
		||||
	return g.gateway.ResolveSourceMeta(ctx, in, opts...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (g *gatewayClientForBuild) Solve(ctx context.Context, in *gatewayapi.SolveRequest, opts ...grpc.CallOption) (*gatewayapi.SolveResponse, error) {
 | 
			
		||||
	ctx = buildid.AppendToOutgoingContext(ctx, g.buildID)
 | 
			
		||||
	return g.gateway.Solve(ctx, in, opts...)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										26
									
								
								vendor/github.com/moby/buildkit/client/llb/exec.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								vendor/github.com/moby/buildkit/client/llb/exec.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -46,6 +46,7 @@ type mount struct {
 | 
			
		||||
	tmpfsOpt     TmpfsInfo
 | 
			
		||||
	cacheSharing CacheMountSharingMode
 | 
			
		||||
	noOutput     bool
 | 
			
		||||
	contentCache MountContentCache
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ExecOp struct {
 | 
			
		||||
@@ -281,6 +282,9 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
 | 
			
		||||
		} else if m.source != nil {
 | 
			
		||||
			addCap(&e.constraints, pb.CapExecMountBind)
 | 
			
		||||
		}
 | 
			
		||||
		if m.contentCache != MountContentCacheDefault {
 | 
			
		||||
			addCap(&e.constraints, pb.CapExecMountContentCache)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if len(e.secrets) > 0 {
 | 
			
		||||
@@ -366,6 +370,14 @@ func (e *ExecOp) Marshal(ctx context.Context, c *Constraints) (digest.Digest, []
 | 
			
		||||
				pm.CacheOpt.Sharing = pb.CacheSharingOpt_LOCKED
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		switch m.contentCache {
 | 
			
		||||
		case MountContentCacheDefault:
 | 
			
		||||
			pm.ContentCache = pb.MountContentCache_DEFAULT
 | 
			
		||||
		case MountContentCacheOn:
 | 
			
		||||
			pm.ContentCache = pb.MountContentCache_ON
 | 
			
		||||
		case MountContentCacheOff:
 | 
			
		||||
			pm.ContentCache = pb.MountContentCache_OFF
 | 
			
		||||
		}
 | 
			
		||||
		if m.tmpfs {
 | 
			
		||||
			pm.MountType = pb.MountType_TMPFS
 | 
			
		||||
			pm.TmpfsOpt = &pb.TmpfsOpt{
 | 
			
		||||
@@ -492,6 +504,12 @@ func ForceNoOutput(m *mount) {
 | 
			
		||||
	m.noOutput = true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func ContentCache(cache MountContentCache) MountOption {
 | 
			
		||||
	return func(m *mount) {
 | 
			
		||||
		m.contentCache = cache
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func AsPersistentCacheDir(id string, sharing CacheMountSharingMode) MountOption {
 | 
			
		||||
	return func(m *mount) {
 | 
			
		||||
		m.cacheID = id
 | 
			
		||||
@@ -783,3 +801,11 @@ const (
 | 
			
		||||
	UlimitSigpending UlimitName = "sigpending"
 | 
			
		||||
	UlimitStack      UlimitName = "stack"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type MountContentCache int
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	MountContentCacheDefault MountContentCache = iota
 | 
			
		||||
	MountContentCacheOn
 | 
			
		||||
	MountContentCacheOff
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										34
									
								
								vendor/github.com/moby/buildkit/client/llb/resolver.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										34
									
								
								vendor/github.com/moby/buildkit/client/llb/resolver.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,11 +1,7 @@
 | 
			
		||||
package llb
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	digest "github.com/opencontainers/go-digest"
 | 
			
		||||
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb/sourceresolver"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// WithMetaResolver adds a metadata resolver to an image
 | 
			
		||||
@@ -31,30 +27,4 @@ func WithLayerLimit(l int) ImageOption {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ImageMetaResolver can resolve image config metadata from a reference
 | 
			
		||||
type ImageMetaResolver interface {
 | 
			
		||||
	ResolveImageConfig(ctx context.Context, ref string, opt ResolveImageConfigOpt) (string, digest.Digest, []byte, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ResolverType int
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	ResolverTypeRegistry ResolverType = iota
 | 
			
		||||
	ResolverTypeOCILayout
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ResolveImageConfigOpt struct {
 | 
			
		||||
	ResolverType
 | 
			
		||||
 | 
			
		||||
	Platform    *ocispecs.Platform
 | 
			
		||||
	ResolveMode string
 | 
			
		||||
	LogName     string
 | 
			
		||||
 | 
			
		||||
	Store ResolveImageConfigOptStore
 | 
			
		||||
 | 
			
		||||
	SourcePolicies []*spb.Policy
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type ResolveImageConfigOptStore struct {
 | 
			
		||||
	SessionID string
 | 
			
		||||
	StoreID   string
 | 
			
		||||
}
 | 
			
		||||
type ImageMetaResolver = sourceresolver.ImageMetaResolver
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								vendor/github.com/moby/buildkit/client/llb/source.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								vendor/github.com/moby/buildkit/client/llb/source.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -10,6 +10,7 @@ import (
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"github.com/distribution/reference"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb/sourceresolver"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/apicaps"
 | 
			
		||||
	"github.com/moby/buildkit/util/gitutil"
 | 
			
		||||
@@ -136,10 +137,11 @@ func Image(ref string, opts ...ImageOption) State {
 | 
			
		||||
				if p == nil {
 | 
			
		||||
					p = c.Platform
 | 
			
		||||
				}
 | 
			
		||||
				_, _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, ResolveImageConfigOpt{
 | 
			
		||||
					Platform:     p,
 | 
			
		||||
					ResolveMode:  info.resolveMode.String(),
 | 
			
		||||
					ResolverType: ResolverTypeRegistry,
 | 
			
		||||
				_, _, dt, err := info.metaResolver.ResolveImageConfig(ctx, ref, sourceresolver.Opt{
 | 
			
		||||
					Platform: p,
 | 
			
		||||
					ImageOpt: &sourceresolver.ResolveImageOpt{
 | 
			
		||||
						ResolveMode: info.resolveMode.String(),
 | 
			
		||||
					},
 | 
			
		||||
				})
 | 
			
		||||
				if err != nil {
 | 
			
		||||
					return State{}, err
 | 
			
		||||
@@ -152,10 +154,11 @@ func Image(ref string, opts ...ImageOption) State {
 | 
			
		||||
			if p == nil {
 | 
			
		||||
				p = c.Platform
 | 
			
		||||
			}
 | 
			
		||||
			ref, dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, ResolveImageConfigOpt{
 | 
			
		||||
				Platform:     p,
 | 
			
		||||
				ResolveMode:  info.resolveMode.String(),
 | 
			
		||||
				ResolverType: ResolverTypeRegistry,
 | 
			
		||||
			ref, dgst, dt, err := info.metaResolver.ResolveImageConfig(context.TODO(), ref, sourceresolver.Opt{
 | 
			
		||||
				Platform: p,
 | 
			
		||||
				ImageOpt: &sourceresolver.ResolveImageOpt{
 | 
			
		||||
					ResolveMode: info.resolveMode.String(),
 | 
			
		||||
				},
 | 
			
		||||
			})
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return State{}, err
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										59
									
								
								vendor/github.com/moby/buildkit/client/llb/sourceresolver/imageresolver.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								vendor/github.com/moby/buildkit/client/llb/sourceresolver/imageresolver.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,59 @@
 | 
			
		||||
package sourceresolver
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"github.com/distribution/reference"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/imageutil"
 | 
			
		||||
	digest "github.com/opencontainers/go-digest"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type ImageMetaResolver interface {
 | 
			
		||||
	ResolveImageConfig(ctx context.Context, ref string, opt Opt) (string, digest.Digest, []byte, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type imageMetaResolver struct {
 | 
			
		||||
	mr MetaResolver
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _ ImageMetaResolver = &imageMetaResolver{}
 | 
			
		||||
 | 
			
		||||
func NewImageMetaResolver(mr MetaResolver) ImageMetaResolver {
 | 
			
		||||
	return &imageMetaResolver{
 | 
			
		||||
		mr: mr,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (imr *imageMetaResolver) ResolveImageConfig(ctx context.Context, ref string, opt Opt) (string, digest.Digest, []byte, error) {
 | 
			
		||||
	parsed, err := reference.ParseNormalizedNamed(ref)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, errors.Wrapf(err, "could not parse reference %q", ref)
 | 
			
		||||
	}
 | 
			
		||||
	ref = parsed.String()
 | 
			
		||||
	op := &pb.SourceOp{
 | 
			
		||||
		Identifier: "docker-image://" + ref,
 | 
			
		||||
	}
 | 
			
		||||
	if opt := opt.OCILayoutOpt; opt != nil {
 | 
			
		||||
		op.Identifier = "oci-layout://" + ref
 | 
			
		||||
		op.Attrs = map[string]string{}
 | 
			
		||||
		if opt.Store.SessionID != "" {
 | 
			
		||||
			op.Attrs[pb.AttrOCILayoutSessionID] = opt.Store.SessionID
 | 
			
		||||
		}
 | 
			
		||||
		if opt.Store.StoreID != "" {
 | 
			
		||||
			op.Attrs[pb.AttrOCILayoutStoreID] = opt.Store.StoreID
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	res, err := imr.mr.ResolveSourceMetadata(ctx, op, opt)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, errors.Wrapf(err, "failed to resolve source metadata for %s", ref)
 | 
			
		||||
	}
 | 
			
		||||
	if res.Image == nil {
 | 
			
		||||
		return "", "", nil, &imageutil.ResolveToNonImageError{Ref: ref, Updated: res.Op.Identifier}
 | 
			
		||||
	}
 | 
			
		||||
	ref = strings.TrimPrefix(res.Op.Identifier, "docker-image://")
 | 
			
		||||
	ref = strings.TrimPrefix(ref, "oci-layout://")
 | 
			
		||||
	return ref, res.Image.Digest, res.Image.Config, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										54
									
								
								vendor/github.com/moby/buildkit/client/llb/sourceresolver/types.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								vendor/github.com/moby/buildkit/client/llb/sourceresolver/types.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,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
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										49
									
								
								vendor/github.com/moby/buildkit/exporter/containerimage/image/docker_image.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										49
									
								
								vendor/github.com/moby/buildkit/exporter/containerimage/image/docker_image.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,49 +0,0 @@
 | 
			
		||||
package image
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/docker/docker/api/types/strslice"
 | 
			
		||||
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// HealthConfig holds configuration settings for the HEALTHCHECK feature.
 | 
			
		||||
type HealthConfig struct {
 | 
			
		||||
	// Test is the test to perform to check that the container is healthy.
 | 
			
		||||
	// An empty slice means to inherit the default.
 | 
			
		||||
	// The options are:
 | 
			
		||||
	// {} : inherit healthcheck
 | 
			
		||||
	// {"NONE"} : disable healthcheck
 | 
			
		||||
	// {"CMD", args...} : exec arguments directly
 | 
			
		||||
	// {"CMD-SHELL", command} : run command with system's default shell
 | 
			
		||||
	Test []string `json:",omitempty"`
 | 
			
		||||
 | 
			
		||||
	// Zero means to inherit. Durations are expressed as integer nanoseconds.
 | 
			
		||||
	Interval      time.Duration `json:",omitempty"` // Interval is the time to wait between checks.
 | 
			
		||||
	Timeout       time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung.
 | 
			
		||||
	StartPeriod   time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down.
 | 
			
		||||
	StartInterval time.Duration `json:",omitempty"` // StartInterval is the time to wait between checks during the start period.
 | 
			
		||||
 | 
			
		||||
	// Retries is the number of consecutive failures needed to consider a container as unhealthy.
 | 
			
		||||
	// Zero means inherit.
 | 
			
		||||
	Retries int `json:",omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ImageConfig is a docker compatible config for an image
 | 
			
		||||
type ImageConfig struct {
 | 
			
		||||
	ocispecs.ImageConfig
 | 
			
		||||
 | 
			
		||||
	Healthcheck *HealthConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy
 | 
			
		||||
 | 
			
		||||
	OnBuild []string          // ONBUILD metadata that were defined on the image Dockerfile
 | 
			
		||||
	Shell   strslice.StrSlice `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Image is the JSON structure which describes some basic information about the image.
 | 
			
		||||
// This provides the `application/vnd.oci.image.config.v1+json` mediatype when marshalled to JSON.
 | 
			
		||||
type Image struct {
 | 
			
		||||
	ocispecs.Image
 | 
			
		||||
 | 
			
		||||
	// Config defines the execution parameters which should be used as a base when running a container using the image.
 | 
			
		||||
	Config ImageConfig `json:"config,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/build.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/build.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -7,14 +7,14 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/containerd/containerd/platforms"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/exptypes"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/image"
 | 
			
		||||
	"github.com/moby/buildkit/frontend/gateway/client"
 | 
			
		||||
	dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
 | 
			
		||||
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
	"golang.org/x/sync/errgroup"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type BuildFunc func(ctx context.Context, platform *ocispecs.Platform, idx int) (client.Reference, *image.Image, error)
 | 
			
		||||
type BuildFunc func(ctx context.Context, platform *ocispecs.Platform, idx int) (client.Reference, *dockerspec.DockerOCIImage, error)
 | 
			
		||||
 | 
			
		||||
func (bc *Client) Build(ctx context.Context, fn BuildFunc) (*ResultBuilder, error) {
 | 
			
		||||
	res := client.NewResult()
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/config.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/config.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -13,11 +13,11 @@ import (
 | 
			
		||||
	"github.com/distribution/reference"
 | 
			
		||||
	controlapi "github.com/moby/buildkit/api/services/control"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/image"
 | 
			
		||||
	"github.com/moby/buildkit/frontend/attestations"
 | 
			
		||||
	"github.com/moby/buildkit/frontend/gateway/client"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/flightcontrol"
 | 
			
		||||
	dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
 | 
			
		||||
	"github.com/moby/patternmatcher/ignorefile"
 | 
			
		||||
	digest "github.com/opencontainers/go-digest"
 | 
			
		||||
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
			
		||||
@@ -460,7 +460,7 @@ func (bc *Client) MainContext(ctx context.Context, opts ...llb.LocalOption) (*ll
 | 
			
		||||
	return &st, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (bc *Client) NamedContext(ctx context.Context, name string, opt ContextOpt) (*llb.State, *image.Image, error) {
 | 
			
		||||
func (bc *Client) NamedContext(ctx context.Context, name string, opt ContextOpt) (*llb.State, *dockerspec.DockerOCIImage, error) {
 | 
			
		||||
	named, err := reference.ParseNormalizedNamed(name)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, nil, errors.Wrapf(err, "invalid context name %s", name)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										52
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										52
									
								
								vendor/github.com/moby/buildkit/frontend/dockerui/namedcontext.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -10,11 +10,12 @@ import (
 | 
			
		||||
 | 
			
		||||
	"github.com/distribution/reference"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb/sourceresolver"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/exptypes"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/image"
 | 
			
		||||
	"github.com/moby/buildkit/frontend/gateway/client"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/imageutil"
 | 
			
		||||
	dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
 | 
			
		||||
	"github.com/moby/patternmatcher/ignorefile"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
@@ -25,13 +26,14 @@ const (
 | 
			
		||||
	maxContextRecursion = 10
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt) (*llb.State, *image.Image, error) {
 | 
			
		||||
func (bc *Client) namedContext(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt) (*llb.State, *dockerspec.DockerOCIImage, error) {
 | 
			
		||||
	return bc.namedContextRecursive(ctx, name, nameWithPlatform, opt, 0)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt, count int) (*llb.State, *image.Image, error) {
 | 
			
		||||
func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWithPlatform string, opt ContextOpt, count int) (*llb.State, *dockerspec.DockerOCIImage, error) {
 | 
			
		||||
	opts := bc.bopts.Opts
 | 
			
		||||
	v, ok := opts[contextPrefix+nameWithPlatform]
 | 
			
		||||
	contextKey := contextPrefix + nameWithPlatform
 | 
			
		||||
	v, ok := opts[contextKey]
 | 
			
		||||
	if !ok {
 | 
			
		||||
		return nil, nil, nil
 | 
			
		||||
	}
 | 
			
		||||
@@ -71,21 +73,28 @@ func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWi
 | 
			
		||||
 | 
			
		||||
		named = reference.TagNameOnly(named)
 | 
			
		||||
 | 
			
		||||
		ref, dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), llb.ResolveImageConfigOpt{
 | 
			
		||||
			Platform:     opt.Platform,
 | 
			
		||||
			ResolveMode:  opt.ResolveMode,
 | 
			
		||||
			LogName:      fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, ref),
 | 
			
		||||
			ResolverType: llb.ResolverTypeRegistry,
 | 
			
		||||
		ref, dgst, data, err := bc.client.ResolveImageConfig(ctx, named.String(), sourceresolver.Opt{
 | 
			
		||||
			LogName:  fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, ref),
 | 
			
		||||
			Platform: opt.Platform,
 | 
			
		||||
			ImageOpt: &sourceresolver.ResolveImageOpt{
 | 
			
		||||
				ResolveMode: opt.ResolveMode,
 | 
			
		||||
			},
 | 
			
		||||
		})
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			e := &imageutil.ResolveToNonImageError{}
 | 
			
		||||
			if errors.As(err, &e) {
 | 
			
		||||
				return bc.namedContextRecursive(ctx, e.Updated, name, opt, count+1)
 | 
			
		||||
				before, after, ok := strings.Cut(e.Updated, "://")
 | 
			
		||||
				if !ok {
 | 
			
		||||
					return nil, nil, errors.Errorf("could not parse ref: %s", e.Updated)
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				bc.bopts.Opts[contextKey] = before + ":" + after
 | 
			
		||||
				return bc.namedContextRecursive(ctx, name, nameWithPlatform, opt, count+1)
 | 
			
		||||
			}
 | 
			
		||||
			return nil, nil, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		var img image.Image
 | 
			
		||||
		var img dockerspec.DockerOCIImage
 | 
			
		||||
		if err := json.Unmarshal(data, &img); err != nil {
 | 
			
		||||
			return nil, nil, err
 | 
			
		||||
		}
 | 
			
		||||
@@ -139,22 +148,21 @@ func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWi
 | 
			
		||||
			return nil, nil, errors.Wrapf(err, "could not wrap %q with digest", name)
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// TODO: How should source policy be handled here with a dummy ref?
 | 
			
		||||
		_, dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), llb.ResolveImageConfigOpt{
 | 
			
		||||
			Platform:     opt.Platform,
 | 
			
		||||
			ResolveMode:  opt.ResolveMode,
 | 
			
		||||
			LogName:      fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, dummyRef.String()),
 | 
			
		||||
			ResolverType: llb.ResolverTypeOCILayout,
 | 
			
		||||
			Store: llb.ResolveImageConfigOptStore{
 | 
			
		||||
				SessionID: bc.bopts.SessionID,
 | 
			
		||||
				StoreID:   named.Name(),
 | 
			
		||||
		_, dgst, data, err := bc.client.ResolveImageConfig(ctx, dummyRef.String(), sourceresolver.Opt{
 | 
			
		||||
			LogName:  fmt.Sprintf("[context %s] load metadata for %s", nameWithPlatform, dummyRef.String()),
 | 
			
		||||
			Platform: opt.Platform,
 | 
			
		||||
			OCILayoutOpt: &sourceresolver.ResolveOCILayoutOpt{
 | 
			
		||||
				Store: sourceresolver.ResolveImageConfigOptStore{
 | 
			
		||||
					SessionID: bc.bopts.SessionID,
 | 
			
		||||
					StoreID:   named.Name(),
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
		})
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, nil, err
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		var img image.Image
 | 
			
		||||
		var img dockerspec.DockerOCIImage
 | 
			
		||||
		if err := json.Unmarshal(data, &img); err != nil {
 | 
			
		||||
			return nil, nil, errors.Wrap(err, "could not parse oci-layout image config")
 | 
			
		||||
		}
 | 
			
		||||
@@ -239,7 +247,7 @@ func (bc *Client) namedContextRecursive(ctx context.Context, name string, nameWi
 | 
			
		||||
			if err := json.Unmarshal([]byte(md), &m); err != nil {
 | 
			
		||||
				return nil, nil, errors.Wrapf(err, "failed to parse input metadata %s", md)
 | 
			
		||||
			}
 | 
			
		||||
			var img *image.Image
 | 
			
		||||
			var img *dockerspec.DockerOCIImage
 | 
			
		||||
			if dtic, ok := m[exptypes.ExporterImageConfigKey]; ok {
 | 
			
		||||
				st, err = st.WithImageConfig(dtic)
 | 
			
		||||
				if err != nil {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/client/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/client/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -6,6 +6,7 @@ import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
 | 
			
		||||
	"github.com/moby/buildkit/client/llb"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb/sourceresolver"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	"github.com/moby/buildkit/solver/result"
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
@@ -26,8 +27,9 @@ func NewResult() *Result {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Client interface {
 | 
			
		||||
	sourceresolver.MetaResolver
 | 
			
		||||
	Solve(ctx context.Context, req SolveRequest) (*Result, error)
 | 
			
		||||
	ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error)
 | 
			
		||||
	ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error)
 | 
			
		||||
	BuildOpts() BuildOpts
 | 
			
		||||
	Inputs(ctx context.Context) (map[string]llb.State, error)
 | 
			
		||||
	NewContainer(ctx context.Context, req NewContainerRequest) (Container, error)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										128
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										128
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/grpcclient/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -12,10 +12,12 @@ import (
 | 
			
		||||
	"syscall"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	distreference "github.com/distribution/reference"
 | 
			
		||||
	"github.com/gogo/googleapis/google/rpc"
 | 
			
		||||
	gogotypes "github.com/gogo/protobuf/types"
 | 
			
		||||
	"github.com/golang/protobuf/ptypes/any"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb"
 | 
			
		||||
	"github.com/moby/buildkit/client/llb/sourceresolver"
 | 
			
		||||
	"github.com/moby/buildkit/frontend/gateway/client"
 | 
			
		||||
	pb "github.com/moby/buildkit/frontend/gateway/pb"
 | 
			
		||||
	"github.com/moby/buildkit/identity"
 | 
			
		||||
@@ -23,6 +25,7 @@ import (
 | 
			
		||||
	"github.com/moby/buildkit/util/apicaps"
 | 
			
		||||
	"github.com/moby/buildkit/util/bklog"
 | 
			
		||||
	"github.com/moby/buildkit/util/grpcerrors"
 | 
			
		||||
	"github.com/moby/buildkit/util/imageutil"
 | 
			
		||||
	"github.com/moby/sys/signal"
 | 
			
		||||
	digest "github.com/opencontainers/go-digest"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
@@ -479,7 +482,35 @@ func (c *grpcClient) Solve(ctx context.Context, creq client.SolveRequest) (res *
 | 
			
		||||
	return res, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (string, digest.Digest, []byte, error) {
 | 
			
		||||
func (c *grpcClient) ResolveSourceMetadata(ctx context.Context, op *opspb.SourceOp, opt sourceresolver.Opt) (*sourceresolver.MetaResponse, error) {
 | 
			
		||||
	if c.caps.Supports(pb.CapSourceMetaResolver) != nil {
 | 
			
		||||
		var ref string
 | 
			
		||||
		if v, ok := strings.CutPrefix(op.Identifier, "docker-image://"); ok {
 | 
			
		||||
			ref = v
 | 
			
		||||
		} else if v, ok := strings.CutPrefix(op.Identifier, "oci-layout://"); ok {
 | 
			
		||||
			ref = v
 | 
			
		||||
		} else {
 | 
			
		||||
			return &sourceresolver.MetaResponse{Op: op}, nil
 | 
			
		||||
		}
 | 
			
		||||
		retRef, dgst, config, err := c.ResolveImageConfig(ctx, ref, opt)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
		if strings.HasPrefix(op.Identifier, "docker-image://") {
 | 
			
		||||
			op.Identifier = "docker-image://" + retRef
 | 
			
		||||
		} else if strings.HasPrefix(op.Identifier, "oci-layout://") {
 | 
			
		||||
			op.Identifier = "oci-layout://" + retRef
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return &sourceresolver.MetaResponse{
 | 
			
		||||
			Op: op,
 | 
			
		||||
			Image: &sourceresolver.ResolveImageResponse{
 | 
			
		||||
				Digest: dgst,
 | 
			
		||||
				Config: config,
 | 
			
		||||
			},
 | 
			
		||||
		}, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var p *opspb.Platform
 | 
			
		||||
	if platform := opt.Platform; platform != nil {
 | 
			
		||||
		p = &opspb.Platform{
 | 
			
		||||
@@ -491,16 +522,97 @@ func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt llb
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	resp, err := c.client.ResolveImageConfig(ctx, &pb.ResolveImageConfigRequest{
 | 
			
		||||
		ResolverType:   int32(opt.ResolverType),
 | 
			
		||||
		Ref:            ref,
 | 
			
		||||
	req := &pb.ResolveSourceMetaRequest{
 | 
			
		||||
		Source:         op,
 | 
			
		||||
		Platform:       p,
 | 
			
		||||
		ResolveMode:    opt.ResolveMode,
 | 
			
		||||
		LogName:        opt.LogName,
 | 
			
		||||
		SessionID:      opt.Store.SessionID,
 | 
			
		||||
		StoreID:        opt.Store.StoreID,
 | 
			
		||||
		SourcePolicies: opt.SourcePolicies,
 | 
			
		||||
	})
 | 
			
		||||
	}
 | 
			
		||||
	resp, err := c.client.ResolveSourceMeta(ctx, req)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	r := &sourceresolver.MetaResponse{
 | 
			
		||||
		Op: resp.Source,
 | 
			
		||||
	}
 | 
			
		||||
	if resp.Image != nil {
 | 
			
		||||
		r.Image = &sourceresolver.ResolveImageResponse{
 | 
			
		||||
			Digest: resp.Image.Digest,
 | 
			
		||||
			Config: resp.Image.Config,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return r, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *grpcClient) resolveImageConfigViaSourceMetadata(ctx context.Context, ref string, opt sourceresolver.Opt, p *opspb.Platform) (string, digest.Digest, []byte, error) {
 | 
			
		||||
	op := &opspb.SourceOp{
 | 
			
		||||
		Identifier: "docker-image://" + ref,
 | 
			
		||||
	}
 | 
			
		||||
	if opt.OCILayoutOpt != nil {
 | 
			
		||||
		named, err := distreference.ParseNormalizedNamed(ref)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", "", nil, err
 | 
			
		||||
		}
 | 
			
		||||
		op.Identifier = "oci-layout://" + named.String()
 | 
			
		||||
		op.Attrs = map[string]string{
 | 
			
		||||
			opspb.AttrOCILayoutSessionID: opt.OCILayoutOpt.Store.SessionID,
 | 
			
		||||
			opspb.AttrOCILayoutStoreID:   opt.OCILayoutOpt.Store.StoreID,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	req := &pb.ResolveSourceMetaRequest{
 | 
			
		||||
		Source:         op,
 | 
			
		||||
		Platform:       p,
 | 
			
		||||
		LogName:        opt.LogName,
 | 
			
		||||
		SourcePolicies: opt.SourcePolicies,
 | 
			
		||||
	}
 | 
			
		||||
	resp, err := c.client.ResolveSourceMeta(ctx, req)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if resp.Image == nil {
 | 
			
		||||
		return "", "", nil, &imageutil.ResolveToNonImageError{Ref: ref, Updated: resp.Source.Identifier}
 | 
			
		||||
	}
 | 
			
		||||
	ref = strings.TrimPrefix(resp.Source.Identifier, "docker-image://")
 | 
			
		||||
	ref = strings.TrimPrefix(ref, "oci-layout://")
 | 
			
		||||
	return ref, resp.Image.Digest, resp.Image.Config, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *grpcClient) ResolveImageConfig(ctx context.Context, ref string, opt sourceresolver.Opt) (string, digest.Digest, []byte, error) {
 | 
			
		||||
	var p *opspb.Platform
 | 
			
		||||
	if platform := opt.Platform; platform != nil {
 | 
			
		||||
		p = &opspb.Platform{
 | 
			
		||||
			OS:           platform.OS,
 | 
			
		||||
			Architecture: platform.Architecture,
 | 
			
		||||
			Variant:      platform.Variant,
 | 
			
		||||
			OSVersion:    platform.OSVersion,
 | 
			
		||||
			OSFeatures:   platform.OSFeatures,
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if c.caps.Supports(pb.CapSourceMetaResolver) == nil {
 | 
			
		||||
		return c.resolveImageConfigViaSourceMetadata(ctx, ref, opt, p)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	req := &pb.ResolveImageConfigRequest{
 | 
			
		||||
		Ref:            ref,
 | 
			
		||||
		LogName:        opt.LogName,
 | 
			
		||||
		SourcePolicies: opt.SourcePolicies,
 | 
			
		||||
		Platform:       p,
 | 
			
		||||
	}
 | 
			
		||||
	if iopt := opt.ImageOpt; iopt != nil {
 | 
			
		||||
		req.ResolveMode = iopt.ResolveMode
 | 
			
		||||
		req.ResolverType = int32(sourceresolver.ResolverTypeRegistry)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if iopt := opt.OCILayoutOpt; iopt != nil {
 | 
			
		||||
		req.ResolverType = int32(sourceresolver.ResolverTypeOCILayout)
 | 
			
		||||
		req.StoreID = iopt.Store.StoreID
 | 
			
		||||
		req.SessionID = iopt.Store.SessionID
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	resp, err := c.client.ResolveImageConfig(ctx, req)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										11
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/caps.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -68,6 +68,10 @@ const (
 | 
			
		||||
	// CapAttestations is the capability to indicate that attestation
 | 
			
		||||
	// references will be attached to results
 | 
			
		||||
	CapAttestations apicaps.CapID = "reference.attestations"
 | 
			
		||||
 | 
			
		||||
	// CapSourceMetaResolver is the capability to indicates support for ResolveSourceMetadata
 | 
			
		||||
	// function in gateway API
 | 
			
		||||
	CapSourceMetaResolver apicaps.CapID = "source.metaresolver"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
@@ -231,4 +235,11 @@ func init() {
 | 
			
		||||
		Enabled: true,
 | 
			
		||||
		Status:  apicaps.CapStatusExperimental,
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	Caps.Init(apicaps.Cap{
 | 
			
		||||
		ID:      CapSourceMetaResolver,
 | 
			
		||||
		Name:    "source meta resolver",
 | 
			
		||||
		Enabled: true,
 | 
			
		||||
		Status:  apicaps.CapStatusExperimental,
 | 
			
		||||
	})
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1324
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1324
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										20
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/github.com/moby/buildkit/frontend/gateway/pb/gateway.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -17,6 +17,8 @@ option (gogoproto.unmarshaler_all) = true;
 | 
			
		||||
service LLBBridge {
 | 
			
		||||
	// apicaps:CapResolveImage
 | 
			
		||||
	rpc ResolveImageConfig(ResolveImageConfigRequest) returns (ResolveImageConfigResponse);
 | 
			
		||||
	// apicaps:CapSourceMetaResolver
 | 
			
		||||
	rpc ResolveSourceMeta(ResolveSourceMetaRequest) returns (ResolveSourceMetaResponse);
 | 
			
		||||
	// apicaps:CapSolveBase
 | 
			
		||||
	rpc Solve(SolveRequest) returns (SolveResponse);
 | 
			
		||||
	// apicaps:CapReadFile
 | 
			
		||||
@@ -132,6 +134,24 @@ message ResolveImageConfigResponse {
 | 
			
		||||
	string Ref = 3;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message ResolveSourceMetaRequest {
 | 
			
		||||
	pb.SourceOp Source = 1;
 | 
			
		||||
	pb.Platform Platform = 2;
 | 
			
		||||
	string LogName = 3;
 | 
			
		||||
	string ResolveMode = 4;
 | 
			
		||||
	repeated moby.buildkit.v1.sourcepolicy.Policy SourcePolicies = 8;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message ResolveSourceMetaResponse {
 | 
			
		||||
	pb.SourceOp Source = 1;
 | 
			
		||||
	ResolveSourceImageResponse Image = 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message ResolveSourceImageResponse {
 | 
			
		||||
	string Digest = 1 [(gogoproto.customtype) = "github.com/opencontainers/go-digest.Digest", (gogoproto.nullable) = false];
 | 
			
		||||
	bytes Config = 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message SolveRequest {
 | 
			
		||||
	pb.Definition Definition = 1;
 | 
			
		||||
	string Frontend = 2;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										7
									
								
								vendor/github.com/moby/buildkit/solver/pb/caps.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								vendor/github.com/moby/buildkit/solver/pb/caps.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -57,6 +57,7 @@ const (
 | 
			
		||||
	CapExecMountTmpfsSize                apicaps.CapID = "exec.mount.tmpfs.size"
 | 
			
		||||
	CapExecMountSecret                   apicaps.CapID = "exec.mount.secret"
 | 
			
		||||
	CapExecMountSSH                      apicaps.CapID = "exec.mount.ssh"
 | 
			
		||||
	CapExecMountContentCache             apicaps.CapID = "exec.mount.cache.content"
 | 
			
		||||
	CapExecCgroupsMounted                apicaps.CapID = "exec.cgroup"
 | 
			
		||||
	CapExecSecretEnv                     apicaps.CapID = "exec.secretenv"
 | 
			
		||||
 | 
			
		||||
@@ -337,6 +338,12 @@ func init() {
 | 
			
		||||
		Status:  apicaps.CapStatusExperimental,
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	Caps.Init(apicaps.Cap{
 | 
			
		||||
		ID:      CapExecMountContentCache,
 | 
			
		||||
		Enabled: true,
 | 
			
		||||
		Status:  apicaps.CapStatusExperimental,
 | 
			
		||||
	})
 | 
			
		||||
 | 
			
		||||
	Caps.Init(apicaps.Cap{
 | 
			
		||||
		ID:      CapExecCgroupsMounted,
 | 
			
		||||
		Enabled: true,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										420
									
								
								vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										420
									
								
								vendor/github.com/moby/buildkit/solver/pb/ops.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -117,6 +117,35 @@ func (MountType) EnumDescriptor() ([]byte, []int) {
 | 
			
		||||
	return fileDescriptor_8de16154b2733812, []int{2}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MountContentCache ...
 | 
			
		||||
type MountContentCache int32
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
	MountContentCache_DEFAULT MountContentCache = 0
 | 
			
		||||
	MountContentCache_ON      MountContentCache = 1
 | 
			
		||||
	MountContentCache_OFF     MountContentCache = 2
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var MountContentCache_name = map[int32]string{
 | 
			
		||||
	0: "DEFAULT",
 | 
			
		||||
	1: "ON",
 | 
			
		||||
	2: "OFF",
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var MountContentCache_value = map[string]int32{
 | 
			
		||||
	"DEFAULT": 0,
 | 
			
		||||
	"ON":      1,
 | 
			
		||||
	"OFF":     2,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x MountContentCache) String() string {
 | 
			
		||||
	return proto.EnumName(MountContentCache_name, int32(x))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (MountContentCache) EnumDescriptor() ([]byte, []int) {
 | 
			
		||||
	return fileDescriptor_8de16154b2733812, []int{3}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// CacheSharingOpt defines different sharing modes for cache mount
 | 
			
		||||
type CacheSharingOpt int32
 | 
			
		||||
 | 
			
		||||
@@ -146,7 +175,7 @@ func (x CacheSharingOpt) String() string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (CacheSharingOpt) EnumDescriptor() ([]byte, []int) {
 | 
			
		||||
	return fileDescriptor_8de16154b2733812, []int{3}
 | 
			
		||||
	return fileDescriptor_8de16154b2733812, []int{4}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Op represents a vertex of the LLB DAG.
 | 
			
		||||
@@ -771,17 +800,18 @@ func (m *SecretEnv) GetOptional() bool {
 | 
			
		||||
 | 
			
		||||
// Mount specifies how to mount an input Op as a filesystem.
 | 
			
		||||
type Mount struct {
 | 
			
		||||
	Input     InputIndex  `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
 | 
			
		||||
	Selector  string      `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
 | 
			
		||||
	Dest      string      `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
 | 
			
		||||
	Output    OutputIndex `protobuf:"varint,4,opt,name=output,proto3,customtype=OutputIndex" json:"output"`
 | 
			
		||||
	Readonly  bool        `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
 | 
			
		||||
	MountType MountType   `protobuf:"varint,6,opt,name=mountType,proto3,enum=pb.MountType" json:"mountType,omitempty"`
 | 
			
		||||
	TmpfsOpt  *TmpfsOpt   `protobuf:"bytes,19,opt,name=TmpfsOpt,proto3" json:"TmpfsOpt,omitempty"`
 | 
			
		||||
	CacheOpt  *CacheOpt   `protobuf:"bytes,20,opt,name=cacheOpt,proto3" json:"cacheOpt,omitempty"`
 | 
			
		||||
	SecretOpt *SecretOpt  `protobuf:"bytes,21,opt,name=secretOpt,proto3" json:"secretOpt,omitempty"`
 | 
			
		||||
	SSHOpt    *SSHOpt     `protobuf:"bytes,22,opt,name=SSHOpt,proto3" json:"SSHOpt,omitempty"`
 | 
			
		||||
	ResultID  string      `protobuf:"bytes,23,opt,name=resultID,proto3" json:"resultID,omitempty"`
 | 
			
		||||
	Input        InputIndex        `protobuf:"varint,1,opt,name=input,proto3,customtype=InputIndex" json:"input"`
 | 
			
		||||
	Selector     string            `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"`
 | 
			
		||||
	Dest         string            `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
 | 
			
		||||
	Output       OutputIndex       `protobuf:"varint,4,opt,name=output,proto3,customtype=OutputIndex" json:"output"`
 | 
			
		||||
	Readonly     bool              `protobuf:"varint,5,opt,name=readonly,proto3" json:"readonly,omitempty"`
 | 
			
		||||
	MountType    MountType         `protobuf:"varint,6,opt,name=mountType,proto3,enum=pb.MountType" json:"mountType,omitempty"`
 | 
			
		||||
	TmpfsOpt     *TmpfsOpt         `protobuf:"bytes,19,opt,name=TmpfsOpt,proto3" json:"TmpfsOpt,omitempty"`
 | 
			
		||||
	CacheOpt     *CacheOpt         `protobuf:"bytes,20,opt,name=cacheOpt,proto3" json:"cacheOpt,omitempty"`
 | 
			
		||||
	SecretOpt    *SecretOpt        `protobuf:"bytes,21,opt,name=secretOpt,proto3" json:"secretOpt,omitempty"`
 | 
			
		||||
	SSHOpt       *SSHOpt           `protobuf:"bytes,22,opt,name=SSHOpt,proto3" json:"SSHOpt,omitempty"`
 | 
			
		||||
	ResultID     string            `protobuf:"bytes,23,opt,name=resultID,proto3" json:"resultID,omitempty"`
 | 
			
		||||
	ContentCache MountContentCache `protobuf:"varint,24,opt,name=contentCache,proto3,enum=pb.MountContentCache" json:"contentCache,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *Mount) Reset()         { *m = Mount{} }
 | 
			
		||||
@@ -876,6 +906,13 @@ func (m *Mount) GetResultID() string {
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *Mount) GetContentCache() MountContentCache {
 | 
			
		||||
	if m != nil {
 | 
			
		||||
		return m.ContentCache
 | 
			
		||||
	}
 | 
			
		||||
	return MountContentCache_DEFAULT
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TmpfsOpt defines options describing tpmfs mounts
 | 
			
		||||
type TmpfsOpt struct {
 | 
			
		||||
	// Specify an upper limit on the size of the filesystem.
 | 
			
		||||
@@ -2799,6 +2836,7 @@ func init() {
 | 
			
		||||
	proto.RegisterEnum("pb.NetMode", NetMode_name, NetMode_value)
 | 
			
		||||
	proto.RegisterEnum("pb.SecurityMode", SecurityMode_name, SecurityMode_value)
 | 
			
		||||
	proto.RegisterEnum("pb.MountType", MountType_name, MountType_value)
 | 
			
		||||
	proto.RegisterEnum("pb.MountContentCache", MountContentCache_name, MountContentCache_value)
 | 
			
		||||
	proto.RegisterEnum("pb.CacheSharingOpt", CacheSharingOpt_name, CacheSharingOpt_value)
 | 
			
		||||
	proto.RegisterType((*Op)(nil), "pb.Op")
 | 
			
		||||
	proto.RegisterType((*Platform)(nil), "pb.Platform")
 | 
			
		||||
@@ -2854,169 +2892,172 @@ func init() {
 | 
			
		||||
func init() { proto.RegisterFile("ops.proto", fileDescriptor_8de16154b2733812) }
 | 
			
		||||
 | 
			
		||||
var fileDescriptor_8de16154b2733812 = []byte{
 | 
			
		||||
	// 2577 bytes of a gzipped FileDescriptorProto
 | 
			
		||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0x4f, 0x6f, 0x5b, 0xc7,
 | 
			
		||||
	0x11, 0x17, 0xff, 0x93, 0x43, 0x89, 0x66, 0xd6, 0x4e, 0xc2, 0xa8, 0xae, 0xac, 0xbc, 0xa4, 0x81,
 | 
			
		||||
	0x2c, 0xdb, 0x12, 0xaa, 0x00, 0x71, 0x60, 0x04, 0x45, 0x25, 0x91, 0x8e, 0x18, 0xc7, 0xa2, 0xb0,
 | 
			
		||||
	0xb4, 0x9d, 0x1e, 0x0a, 0x18, 0x4f, 0x8f, 0x4b, 0xea, 0x41, 0xef, 0xbd, 0x7d, 0x78, 0x6f, 0x69,
 | 
			
		||||
	0x89, 0x3d, 0xf4, 0xd0, 0x53, 0x8f, 0x01, 0x0a, 0x14, 0xbd, 0x14, 0xfd, 0x12, 0x3d, 0xb6, 0xf7,
 | 
			
		||||
	0x00, 0xb9, 0xe4, 0xd0, 0x43, 0xd0, 0x43, 0x5a, 0x38, 0x97, 0x7e, 0x88, 0x16, 0x28, 0x66, 0x76,
 | 
			
		||||
	0xdf, 0x1f, 0x52, 0x32, 0x6c, 0xb7, 0x45, 0x4f, 0x9c, 0x37, 0xf3, 0xdb, 0xd9, 0xd9, 0xd9, 0x99,
 | 
			
		||||
	0x9d, 0xd9, 0x25, 0x34, 0x64, 0x18, 0x6f, 0x85, 0x91, 0x54, 0x92, 0x15, 0xc3, 0xe3, 0xd5, 0x3b,
 | 
			
		||||
	0x13, 0x57, 0x9d, 0x4c, 0x8f, 0xb7, 0x1c, 0xe9, 0x6f, 0x4f, 0xe4, 0x44, 0x6e, 0x93, 0xe8, 0x78,
 | 
			
		||||
	0x3a, 0xa6, 0x2f, 0xfa, 0x20, 0x4a, 0x0f, 0xb1, 0xfe, 0x51, 0x84, 0xe2, 0x20, 0x64, 0xef, 0x42,
 | 
			
		||||
	0xd5, 0x0d, 0xc2, 0xa9, 0x8a, 0x3b, 0x85, 0xf5, 0xd2, 0x46, 0x73, 0xa7, 0xb1, 0x15, 0x1e, 0x6f,
 | 
			
		||||
	0xf5, 0x91, 0xc3, 0x8d, 0x80, 0xad, 0x43, 0x59, 0x9c, 0x0b, 0xa7, 0x53, 0x5c, 0x2f, 0x6c, 0x34,
 | 
			
		||||
	0x77, 0x00, 0x01, 0xbd, 0x73, 0xe1, 0x0c, 0xc2, 0x83, 0x25, 0x4e, 0x12, 0xf6, 0x01, 0x54, 0x63,
 | 
			
		||||
	0x39, 0x8d, 0x1c, 0xd1, 0x29, 0x11, 0x66, 0x19, 0x31, 0x43, 0xe2, 0x10, 0xca, 0x48, 0x51, 0xd3,
 | 
			
		||||
	0xd8, 0xf5, 0x44, 0xa7, 0x9c, 0x69, 0xba, 0xef, 0x7a, 0x1a, 0x43, 0x12, 0xf6, 0x1e, 0x54, 0x8e,
 | 
			
		||||
	0xa7, 0xae, 0x37, 0xea, 0x54, 0x08, 0xd2, 0x44, 0xc8, 0x1e, 0x32, 0x08, 0xa3, 0x65, 0x08, 0xf2,
 | 
			
		||||
	0x45, 0x34, 0x11, 0x9d, 0x6a, 0x06, 0x7a, 0x88, 0x0c, 0x0d, 0x22, 0x19, 0xce, 0x35, 0x72, 0xc7,
 | 
			
		||||
	0xe3, 0x4e, 0x2d, 0x9b, 0xab, 0xeb, 0x8e, 0xc7, 0x7a, 0x2e, 0x94, 0xb0, 0x0d, 0xa8, 0x87, 0x9e,
 | 
			
		||||
	0xad, 0xc6, 0x32, 0xf2, 0x3b, 0x90, 0xd9, 0x7d, 0x64, 0x78, 0x3c, 0x95, 0xb2, 0xbb, 0xd0, 0x74,
 | 
			
		||||
	0x64, 0x10, 0xab, 0xc8, 0x76, 0x03, 0x15, 0x77, 0x9a, 0x04, 0x7e, 0x13, 0xc1, 0x5f, 0xc8, 0xe8,
 | 
			
		||||
	0x54, 0x44, 0xfb, 0x99, 0x90, 0xe7, 0x91, 0x7b, 0x65, 0x28, 0xca, 0xd0, 0xfa, 0x6d, 0x01, 0xea,
 | 
			
		||||
	0x89, 0x56, 0x66, 0xc1, 0xf2, 0x6e, 0xe4, 0x9c, 0xb8, 0x4a, 0x38, 0x6a, 0x1a, 0x89, 0x4e, 0x61,
 | 
			
		||||
	0xbd, 0xb0, 0xd1, 0xe0, 0x73, 0x3c, 0xd6, 0x82, 0xe2, 0x60, 0x48, 0xfe, 0x6e, 0xf0, 0xe2, 0x60,
 | 
			
		||||
	0xc8, 0x3a, 0x50, 0x7b, 0x62, 0x47, 0xae, 0x1d, 0x28, 0x72, 0x70, 0x83, 0x27, 0x9f, 0xec, 0x3a,
 | 
			
		||||
	0x34, 0x06, 0xc3, 0x27, 0x22, 0x8a, 0x5d, 0x19, 0x90, 0x5b, 0x1b, 0x3c, 0x63, 0xb0, 0x35, 0x80,
 | 
			
		||||
	0xc1, 0xf0, 0xbe, 0xb0, 0x51, 0x69, 0xdc, 0xa9, 0xac, 0x97, 0x36, 0x1a, 0x3c, 0xc7, 0xb1, 0x7e,
 | 
			
		||||
	0x09, 0x15, 0xda, 0x6a, 0xf6, 0x19, 0x54, 0x47, 0xee, 0x44, 0xc4, 0x4a, 0x9b, 0xb3, 0xb7, 0xf3,
 | 
			
		||||
	0xd5, 0x77, 0x37, 0x96, 0xfe, 0xfa, 0xdd, 0x8d, 0xcd, 0x5c, 0x4c, 0xc9, 0x50, 0x04, 0x8e, 0x0c,
 | 
			
		||||
	0x94, 0xed, 0x06, 0x22, 0x8a, 0xb7, 0x27, 0xf2, 0x8e, 0x1e, 0xb2, 0xd5, 0xa5, 0x1f, 0x6e, 0x34,
 | 
			
		||||
	0xb0, 0x9b, 0x50, 0x71, 0x83, 0x91, 0x38, 0x27, 0xfb, 0x4b, 0x7b, 0x57, 0x8d, 0xaa, 0xe6, 0x60,
 | 
			
		||||
	0xaa, 0xc2, 0xa9, 0xea, 0xa3, 0x88, 0x6b, 0x84, 0xf5, 0x75, 0x01, 0xaa, 0x3a, 0x94, 0xd8, 0x75,
 | 
			
		||||
	0x28, 0xfb, 0x42, 0xd9, 0x34, 0x7f, 0x73, 0xa7, 0xae, 0xb7, 0x54, 0xd9, 0x9c, 0xb8, 0x18, 0xa5,
 | 
			
		||||
	0xbe, 0x9c, 0xa2, 0xef, 0x8b, 0x59, 0x94, 0x3e, 0x44, 0x0e, 0x37, 0x02, 0xf6, 0x23, 0xa8, 0x05,
 | 
			
		||||
	0x42, 0x9d, 0xc9, 0xe8, 0x94, 0x7c, 0xd4, 0xd2, 0x61, 0x71, 0x28, 0xd4, 0x43, 0x39, 0x12, 0x3c,
 | 
			
		||||
	0x91, 0xb1, 0xdb, 0x50, 0x8f, 0x85, 0x33, 0x8d, 0x5c, 0x35, 0x23, 0x7f, 0xb5, 0x76, 0xda, 0x14,
 | 
			
		||||
	0xac, 0x86, 0x47, 0xe0, 0x14, 0xc1, 0x6e, 0x41, 0x23, 0x16, 0x4e, 0x24, 0x94, 0x08, 0x9e, 0x91,
 | 
			
		||||
	0xff, 0x9a, 0x3b, 0x2b, 0x06, 0x1e, 0x09, 0xd5, 0x0b, 0x9e, 0xf1, 0x4c, 0x6e, 0x7d, 0x5d, 0x84,
 | 
			
		||||
	0x32, 0xda, 0xcc, 0x18, 0x94, 0xed, 0x68, 0xa2, 0x33, 0xaa, 0xc1, 0x89, 0x66, 0x6d, 0x28, 0xa1,
 | 
			
		||||
	0x8e, 0x22, 0xb1, 0x90, 0x44, 0x8e, 0x73, 0x36, 0x32, 0x1b, 0x8a, 0x24, 0x8e, 0x9b, 0xc6, 0x22,
 | 
			
		||||
	0x32, 0xfb, 0x48, 0x34, 0xbb, 0x09, 0x8d, 0x30, 0x92, 0xe7, 0xb3, 0xa7, 0xda, 0x82, 0x2c, 0x4a,
 | 
			
		||||
	0x91, 0x89, 0x06, 0xd4, 0x43, 0x43, 0xb1, 0x4d, 0x00, 0x71, 0xae, 0x22, 0xfb, 0x40, 0xc6, 0x2a,
 | 
			
		||||
	0xee, 0x54, 0xc9, 0x5a, 0x8a, 0x7b, 0x64, 0xf4, 0x8f, 0x78, 0x4e, 0xca, 0x56, 0xa1, 0x7e, 0x22,
 | 
			
		||||
	0x63, 0x15, 0xd8, 0xbe, 0xa0, 0x0c, 0x69, 0xf0, 0xf4, 0x9b, 0x59, 0x50, 0x9d, 0x7a, 0xae, 0xef,
 | 
			
		||||
	0xaa, 0x4e, 0x23, 0xd3, 0xf1, 0x98, 0x38, 0xdc, 0x48, 0x30, 0x8a, 0x9d, 0x49, 0x24, 0xa7, 0xe1,
 | 
			
		||||
	0x91, 0x1d, 0x89, 0x40, 0x51, 0xfe, 0x34, 0xf8, 0x1c, 0x8f, 0x7d, 0x02, 0xef, 0x44, 0xc2, 0x97,
 | 
			
		||||
	0xcf, 0x04, 0x6d, 0xd4, 0x50, 0x4d, 0x8f, 0x63, 0x8e, 0x8e, 0x8d, 0xdd, 0x67, 0x82, 0x72, 0xa8,
 | 
			
		||||
	0xce, 0x5f, 0x0c, 0xb0, 0x6e, 0x43, 0x55, 0xdb, 0x8d, 0x6e, 0x41, 0xca, 0x64, 0x0a, 0xd1, 0x98,
 | 
			
		||||
	0x21, 0xfd, 0xa3, 0x24, 0x43, 0xfa, 0x47, 0x56, 0x17, 0xaa, 0xda, 0x42, 0x44, 0x1f, 0xe2, 0xaa,
 | 
			
		||||
	0x0c, 0x1a, 0x69, 0xe4, 0x0d, 0xe5, 0x58, 0xe9, 0x88, 0xe4, 0x44, 0x93, 0x56, 0x3b, 0xd2, 0xfe,
 | 
			
		||||
	0x2f, 0x71, 0xa2, 0xad, 0x07, 0xd0, 0x48, 0x77, 0x96, 0xa6, 0xe8, 0x1a, 0x35, 0xc5, 0x7e, 0x17,
 | 
			
		||||
	0x07, 0x90, 0xbb, 0xf4, 0xa4, 0x44, 0xa3, 0x1b, 0x65, 0xa8, 0x5c, 0x19, 0xd8, 0x1e, 0x29, 0xaa,
 | 
			
		||||
	0xf3, 0xf4, 0xdb, 0xfa, 0x5d, 0x09, 0x2a, 0xb4, 0x30, 0xb6, 0x81, 0x19, 0x11, 0x4e, 0xf5, 0x0a,
 | 
			
		||||
	0x4a, 0x7b, 0xcc, 0x64, 0x04, 0x50, 0xee, 0xa5, 0x09, 0x81, 0x79, 0xb8, 0x8a, 0xd1, 0xe9, 0x09,
 | 
			
		||||
	0x47, 0xc9, 0xc8, 0xcc, 0x93, 0x7e, 0xe3, 0xfc, 0x23, 0xcc, 0x50, 0x1d, 0x30, 0x44, 0xb3, 0x5b,
 | 
			
		||||
	0x50, 0x95, 0x94, 0x56, 0x14, 0x33, 0x2f, 0x48, 0x36, 0x03, 0x41, 0xe5, 0x91, 0xb0, 0x47, 0x32,
 | 
			
		||||
	0xf0, 0x66, 0x14, 0x49, 0x75, 0x9e, 0x7e, 0x63, 0xa0, 0x53, 0x1e, 0x3d, 0x9a, 0x85, 0xfa, 0x58,
 | 
			
		||||
	0x6d, 0xe9, 0x40, 0x7f, 0x98, 0x30, 0x79, 0x26, 0xc7, 0x83, 0xf3, 0x91, 0x1f, 0x8e, 0xe3, 0x41,
 | 
			
		||||
	0xa8, 0x3a, 0x57, 0xb3, 0x90, 0x4c, 0x78, 0x3c, 0x95, 0x22, 0xd2, 0xb1, 0x9d, 0x13, 0x81, 0xc8,
 | 
			
		||||
	0x6b, 0x19, 0x72, 0xdf, 0xf0, 0x78, 0x2a, 0xcd, 0x32, 0x0d, 0xa1, 0x6f, 0x12, 0x34, 0x97, 0x69,
 | 
			
		||||
	0x88, 0xcd, 0xe4, 0x18, 0xa1, 0xc3, 0xe1, 0x01, 0x22, 0xdf, 0xca, 0x4e, 0x77, 0xcd, 0xe1, 0x46,
 | 
			
		||||
	0xa2, 0x57, 0x1b, 0x4f, 0x3d, 0xd5, 0xef, 0x76, 0xde, 0xd6, 0xae, 0x4c, 0xbe, 0xad, 0xb5, 0x6c,
 | 
			
		||||
	0x01, 0xe8, 0xd6, 0xd8, 0xfd, 0x85, 0x8e, 0x97, 0x12, 0x27, 0xda, 0xea, 0x43, 0x3d, 0x31, 0xf1,
 | 
			
		||||
	0x42, 0x18, 0xdc, 0x81, 0x5a, 0x7c, 0x62, 0x47, 0x6e, 0x30, 0xa1, 0x1d, 0x6a, 0xed, 0x5c, 0x4d,
 | 
			
		||||
	0x57, 0x34, 0xd4, 0x7c, 0xb4, 0x22, 0xc1, 0x58, 0x32, 0x09, 0xa9, 0xcb, 0x74, 0xb5, 0xa1, 0x34,
 | 
			
		||||
	0x75, 0x47, 0xa4, 0x67, 0x85, 0x23, 0x89, 0x9c, 0x89, 0xab, 0x83, 0x72, 0x85, 0x23, 0x89, 0xf6,
 | 
			
		||||
	0xf9, 0x72, 0xa4, 0x6b, 0xe6, 0x0a, 0x27, 0x7a, 0x2e, 0xec, 0x2a, 0x0b, 0x61, 0xe7, 0x25, 0xbe,
 | 
			
		||||
	0xf9, 0xbf, 0xcc, 0xf6, 0x9b, 0x02, 0xd4, 0x93, 0x42, 0x8f, 0xe5, 0xc6, 0x1d, 0x89, 0x40, 0xb9,
 | 
			
		||||
	0x63, 0x57, 0x44, 0x66, 0xe2, 0x1c, 0x87, 0xdd, 0x81, 0x8a, 0xad, 0x54, 0x94, 0x1c, 0xe2, 0x6f,
 | 
			
		||||
	0xe7, 0xbb, 0x84, 0xad, 0x5d, 0x94, 0xf4, 0x02, 0x15, 0xcd, 0xb8, 0x46, 0xad, 0x7e, 0x0c, 0x90,
 | 
			
		||||
	0x31, 0xd1, 0xd6, 0x53, 0x31, 0x33, 0x5a, 0x91, 0x64, 0xd7, 0xa0, 0xf2, 0xcc, 0xf6, 0xa6, 0x49,
 | 
			
		||||
	0x46, 0xea, 0x8f, 0x7b, 0xc5, 0x8f, 0x0b, 0xd6, 0x9f, 0x8b, 0x50, 0x33, 0x5d, 0x03, 0xbb, 0x0d,
 | 
			
		||||
	0x35, 0xea, 0x1a, 0x8c, 0x45, 0x97, 0xa7, 0x5f, 0x02, 0x61, 0xdb, 0x69, 0x3b, 0x94, 0xb3, 0xd1,
 | 
			
		||||
	0xa8, 0xd2, 0x6d, 0x91, 0xb1, 0x31, 0x6b, 0x8e, 0x4a, 0x23, 0x31, 0x36, 0x7d, 0x4f, 0x8b, 0xba,
 | 
			
		||||
	0x0c, 0x31, 0x76, 0x03, 0x17, 0xfd, 0xc3, 0x51, 0xc4, 0x6e, 0x27, 0xab, 0x2e, 0x93, 0xc6, 0xb7,
 | 
			
		||||
	0xf2, 0x1a, 0x2f, 0x2e, 0xba, 0x0f, 0xcd, 0xdc, 0x34, 0x97, 0xac, 0xfa, 0xfd, 0xfc, 0xaa, 0xcd,
 | 
			
		||||
	0x94, 0xa4, 0x4e, 0x37, 0x6d, 0x99, 0x17, 0xfe, 0x0b, 0xff, 0x7d, 0x04, 0x90, 0xa9, 0x7c, 0xf5,
 | 
			
		||||
	0xe3, 0xcb, 0xfa, 0x53, 0x09, 0x60, 0x10, 0x62, 0x0d, 0x1c, 0xd9, 0x54, 0xb5, 0x97, 0xdd, 0x49,
 | 
			
		||||
	0x20, 0x23, 0xf1, 0x94, 0xd2, 0x9c, 0xc6, 0xd7, 0x79, 0x53, 0xf3, 0x28, 0x63, 0xd8, 0x2e, 0x34,
 | 
			
		||||
	0x47, 0x22, 0x76, 0x22, 0x97, 0x02, 0xca, 0x38, 0xfd, 0x06, 0xae, 0x29, 0xd3, 0xb3, 0xd5, 0xcd,
 | 
			
		||||
	0x10, 0xda, 0x57, 0xf9, 0x31, 0x6c, 0x07, 0x96, 0xc5, 0x79, 0x28, 0x23, 0x65, 0x66, 0xd1, 0xcd,
 | 
			
		||||
	0xe5, 0x15, 0xdd, 0xa6, 0x22, 0x9f, 0x66, 0xe2, 0x4d, 0x91, 0x7d, 0x30, 0x1b, 0xca, 0x8e, 0x1d,
 | 
			
		||||
	0xc6, 0xa6, 0xa4, 0x77, 0x16, 0xe6, 0xdb, 0xb7, 0x43, 0xed, 0xb4, 0xbd, 0x0f, 0x71, 0xad, 0xbf,
 | 
			
		||||
	0xfa, 0xdb, 0x8d, 0x5b, 0xb9, 0x3e, 0xc8, 0x97, 0xc7, 0xb3, 0x6d, 0x8a, 0x97, 0x53, 0x57, 0x6d,
 | 
			
		||||
	0x4f, 0x95, 0xeb, 0x6d, 0xdb, 0xa1, 0x8b, 0xea, 0x70, 0x60, 0xbf, 0xcb, 0x49, 0x35, 0xfb, 0x18,
 | 
			
		||||
	0x5a, 0x61, 0x24, 0x27, 0x91, 0x88, 0xe3, 0xa7, 0x54, 0x15, 0x4d, 0xb7, 0xfa, 0x86, 0xa9, 0xde,
 | 
			
		||||
	0x24, 0xf9, 0x14, 0x05, 0x7c, 0x25, 0xcc, 0x7f, 0xae, 0xfe, 0x04, 0xda, 0x8b, 0x2b, 0x7e, 0x9d,
 | 
			
		||||
	0xdd, 0x5b, 0xbd, 0x0b, 0x8d, 0x74, 0x05, 0x2f, 0x1b, 0x58, 0xcf, 0x6f, 0xfb, 0x1f, 0x0b, 0x50,
 | 
			
		||||
	0xd5, 0xf9, 0xc8, 0xee, 0x42, 0xc3, 0x93, 0x8e, 0x8d, 0x06, 0x24, 0x37, 0x83, 0x77, 0xb2, 0x74,
 | 
			
		||||
	0xdd, 0xfa, 0x3c, 0x91, 0xe9, 0xfd, 0xc8, 0xb0, 0x18, 0x9e, 0x6e, 0x30, 0x96, 0x49, 0xfe, 0xb4,
 | 
			
		||||
	0xb2, 0x41, 0xfd, 0x60, 0x2c, 0xb9, 0x16, 0xae, 0x3e, 0x80, 0xd6, 0xbc, 0x8a, 0x4b, 0xec, 0x7c,
 | 
			
		||||
	0x6f, 0x3e, 0xd0, 0xa9, 0x1a, 0xa4, 0x83, 0xf2, 0x66, 0xdf, 0x85, 0x46, 0xca, 0x67, 0x9b, 0x17,
 | 
			
		||||
	0x0d, 0x5f, 0xce, 0x8f, 0xcc, 0xd9, 0x6a, 0xfd, 0xba, 0x00, 0x90, 0xd9, 0x86, 0xe7, 0x1c, 0xde,
 | 
			
		||||
	0x41, 0x82, 0xac, 0x7b, 0x48, 0xbf, 0xa9, 0xf8, 0xda, 0xca, 0x26, 0x5b, 0x96, 0x39, 0xd1, 0x6c,
 | 
			
		||||
	0x0b, 0x60, 0x94, 0xe6, 0xfa, 0x0b, 0x4e, 0x80, 0x1c, 0x02, 0xf5, 0x7b, 0x76, 0x30, 0x99, 0xda,
 | 
			
		||||
	0x13, 0x61, 0x5a, 0xbc, 0xf4, 0xdb, 0x1a, 0x40, 0x3d, 0xb1, 0x90, 0xad, 0x43, 0x33, 0x36, 0x56,
 | 
			
		||||
	0x61, 0x1b, 0x8d, 0xa6, 0x54, 0x78, 0x9e, 0x85, 0xed, 0x70, 0x64, 0x07, 0x13, 0x31, 0xd7, 0x0e,
 | 
			
		||||
	0x73, 0xe4, 0x70, 0x23, 0xb0, 0xbe, 0x80, 0x0a, 0x31, 0x30, 0x7b, 0x63, 0x65, 0x47, 0xca, 0x74,
 | 
			
		||||
	0xd6, 0xba, 0x79, 0x94, 0x31, 0x99, 0xb4, 0x57, 0xc6, 0xf8, 0xe6, 0x1a, 0xc0, 0xde, 0xc7, 0x16,
 | 
			
		||||
	0x75, 0x64, 0xdc, 0x7d, 0x19, 0x0e, 0xc5, 0xd6, 0x27, 0x50, 0x4f, 0xd8, 0xe8, 0x15, 0xcf, 0x0d,
 | 
			
		||||
	0x84, 0x31, 0x91, 0x68, 0xbc, 0x91, 0x38, 0x27, 0x76, 0x64, 0x3b, 0x4a, 0xe8, 0x1e, 0xa6, 0xc2,
 | 
			
		||||
	0x33, 0x86, 0xf5, 0x1e, 0x34, 0x73, 0x49, 0x89, 0xb1, 0xf8, 0x84, 0xf6, 0x58, 0x1f, 0x0d, 0xfa,
 | 
			
		||||
	0xc3, 0xfa, 0x14, 0x56, 0xe6, 0x12, 0x04, 0x2b, 0x99, 0x3b, 0x4a, 0x2a, 0x99, 0xae, 0x52, 0x17,
 | 
			
		||||
	0x5a, 0x31, 0x06, 0xe5, 0x33, 0x61, 0x9f, 0x9a, 0x36, 0x8c, 0x68, 0xeb, 0x0f, 0x78, 0xf1, 0x4a,
 | 
			
		||||
	0xda, 0xe3, 0x1f, 0x02, 0x9c, 0x28, 0x15, 0x3e, 0xa5, 0x7e, 0xd9, 0x28, 0x6b, 0x20, 0x87, 0x10,
 | 
			
		||||
	0xec, 0x06, 0x34, 0xf1, 0x23, 0x36, 0x72, 0xad, 0x9a, 0x46, 0xc4, 0x1a, 0xf0, 0x03, 0x68, 0x8c,
 | 
			
		||||
	0xd3, 0xe1, 0x25, 0x13, 0x1f, 0xc9, 0xe8, 0x77, 0xa0, 0x1e, 0x48, 0x23, 0xd3, 0x7b, 0x5b, 0x0b,
 | 
			
		||||
	0x64, 0x3a, 0xce, 0xf6, 0x3c, 0x23, 0xab, 0xe8, 0x71, 0xb6, 0xe7, 0x91, 0xd0, 0xba, 0x05, 0x6f,
 | 
			
		||||
	0x5c, 0xb8, 0x42, 0xb2, 0xb7, 0xa0, 0x3a, 0x76, 0x3d, 0x45, 0x15, 0x0b, 0xaf, 0x0b, 0xe6, 0xcb,
 | 
			
		||||
	0xfa, 0x57, 0x01, 0x20, 0x8b, 0x2d, 0x4c, 0x19, 0x2c, 0x3d, 0x88, 0x59, 0xd6, 0xa5, 0xc6, 0x83,
 | 
			
		||||
	0xba, 0x6f, 0x0e, 0x31, 0x13, 0x19, 0xd7, 0xe7, 0xe3, 0x71, 0x2b, 0x39, 0xe3, 0xf4, 0xf1, 0xb6,
 | 
			
		||||
	0x63, 0x8e, 0xb7, 0xd7, 0xb9, 0xe6, 0xa5, 0x33, 0x50, 0x17, 0x96, 0xbf, 0xf5, 0x43, 0x96, 0xeb,
 | 
			
		||||
	0xdc, 0x48, 0x56, 0x1f, 0xc0, 0xca, 0xdc, 0x94, 0xaf, 0x58, 0xd0, 0xb2, 0xc3, 0x38, 0x9f, 0xe8,
 | 
			
		||||
	0x3b, 0x50, 0xd5, 0xcf, 0x05, 0x6c, 0x03, 0x6a, 0xb6, 0xa3, 0x73, 0x3c, 0x77, 0xce, 0xa0, 0x70,
 | 
			
		||||
	0x97, 0xd8, 0x3c, 0x11, 0x5b, 0x7f, 0x29, 0x02, 0x64, 0xfc, 0xd7, 0x68, 0xc5, 0xef, 0x41, 0x2b,
 | 
			
		||||
	0x16, 0x8e, 0x0c, 0x46, 0x76, 0x34, 0x23, 0xa9, 0xb9, 0xcf, 0x5e, 0x36, 0x64, 0x01, 0x99, 0x6b,
 | 
			
		||||
	0xcb, 0x4b, 0x2f, 0x6f, 0xcb, 0x37, 0xa0, 0xec, 0xc8, 0x70, 0x66, 0xea, 0x16, 0x9b, 0x5f, 0xc8,
 | 
			
		||||
	0xbe, 0x0c, 0x67, 0x07, 0x4b, 0x9c, 0x10, 0x6c, 0x0b, 0xaa, 0xfe, 0x29, 0x3d, 0xa0, 0xe8, 0x8b,
 | 
			
		||||
	0xe0, 0xb5, 0x79, 0xec, 0xc3, 0x53, 0xa4, 0x0f, 0x96, 0xb8, 0x41, 0xb1, 0x5b, 0x50, 0xf1, 0x4f,
 | 
			
		||||
	0x47, 0x6e, 0x64, 0x2a, 0xcf, 0xd5, 0x45, 0x78, 0xd7, 0x8d, 0xe8, 0xbd, 0x04, 0x31, 0xcc, 0x82,
 | 
			
		||||
	0x62, 0xe4, 0x9b, 0xd7, 0x92, 0xf6, 0x82, 0x37, 0xfd, 0x83, 0x25, 0x5e, 0x8c, 0xfc, 0xbd, 0x3a,
 | 
			
		||||
	0x54, 0xb5, 0x5f, 0xad, 0x7f, 0x96, 0xa0, 0x35, 0x6f, 0x25, 0xee, 0x6c, 0x1c, 0x39, 0xc9, 0xce,
 | 
			
		||||
	0xc6, 0x91, 0x93, 0xde, 0x58, 0x8a, 0xb9, 0x1b, 0x8b, 0x05, 0x15, 0x79, 0x16, 0x88, 0x28, 0xff,
 | 
			
		||||
	0x52, 0xb4, 0x7f, 0x22, 0xcf, 0x02, 0xec, 0x9a, 0xb5, 0x68, 0xae, 0x09, 0xad, 0x98, 0x26, 0xf4,
 | 
			
		||||
	0x7d, 0x58, 0x19, 0x4b, 0xcf, 0x93, 0x67, 0xc3, 0x99, 0xef, 0xb9, 0xc1, 0xa9, 0xe9, 0x44, 0xe7,
 | 
			
		||||
	0x99, 0x6c, 0x03, 0xae, 0x8c, 0xdc, 0x08, 0xcd, 0xd9, 0x97, 0x81, 0x12, 0x01, 0xdd, 0x83, 0x11,
 | 
			
		||||
	0xb7, 0xc8, 0x66, 0x9f, 0xc1, 0xba, 0xad, 0x94, 0xf0, 0x43, 0xf5, 0x38, 0x08, 0x6d, 0xe7, 0xb4,
 | 
			
		||||
	0x2b, 0x1d, 0xca, 0x42, 0x3f, 0xb4, 0x95, 0x7b, 0xec, 0x7a, 0xae, 0x9a, 0x91, 0x33, 0xea, 0xfc,
 | 
			
		||||
	0xa5, 0x38, 0xf6, 0x01, 0xb4, 0x9c, 0x48, 0xd8, 0x4a, 0x74, 0x45, 0xac, 0x8e, 0x6c, 0x75, 0xd2,
 | 
			
		||||
	0xa9, 0xd3, 0xc8, 0x05, 0x2e, 0xae, 0xc1, 0x46, 0x6b, 0xbf, 0x70, 0xbd, 0x91, 0x83, 0x77, 0xcf,
 | 
			
		||||
	0x86, 0x5e, 0xc3, 0x1c, 0x93, 0x6d, 0x01, 0x23, 0x46, 0xcf, 0x0f, 0xd5, 0x2c, 0x85, 0x02, 0x41,
 | 
			
		||||
	0x2f, 0x91, 0xe0, 0x81, 0xab, 0x5c, 0x5f, 0xc4, 0xca, 0xf6, 0x43, 0xba, 0x56, 0x97, 0x78, 0xc6,
 | 
			
		||||
	0x60, 0x37, 0xa1, 0xed, 0x06, 0x8e, 0x37, 0x1d, 0x89, 0xa7, 0x21, 0x2e, 0x24, 0x0a, 0xe2, 0xce,
 | 
			
		||||
	0x32, 0x9d, 0x2a, 0x57, 0x0c, 0xff, 0xc8, 0xb0, 0x11, 0x2a, 0xce, 0x17, 0xa0, 0x2b, 0x1a, 0x6a,
 | 
			
		||||
	0xf8, 0x09, 0xd4, 0xfa, 0xb2, 0x00, 0xed, 0xc5, 0xc0, 0xc3, 0x6d, 0x0b, 0x71, 0xf1, 0xe6, 0xe6,
 | 
			
		||||
	0x8d, 0x74, 0xba, 0x95, 0xc5, 0xdc, 0x56, 0x26, 0xb5, 0xb4, 0x94, 0xab, 0xa5, 0x69, 0x58, 0x94,
 | 
			
		||||
	0x5f, 0x1c, 0x16, 0x73, 0x0b, 0xad, 0x2c, 0x2c, 0xd4, 0xfa, 0x7d, 0x01, 0xae, 0x2c, 0x04, 0xf7,
 | 
			
		||||
	0x2b, 0x5b, 0xb4, 0x0e, 0x4d, 0xdf, 0x3e, 0x15, 0xfa, 0xdd, 0x22, 0x36, 0x25, 0x24, 0xcf, 0xfa,
 | 
			
		||||
	0x1f, 0xd8, 0x17, 0xc0, 0x72, 0x3e, 0xa3, 0x2e, 0xb5, 0x2d, 0x09, 0x90, 0x43, 0xa9, 0xee, 0xcb,
 | 
			
		||||
	0xa9, 0xa9, 0xc5, 0x49, 0x80, 0x24, 0xcc, 0x8b, 0x61, 0x54, 0xba, 0x24, 0x8c, 0xac, 0x43, 0xa8,
 | 
			
		||||
	0x27, 0x06, 0xb2, 0x1b, 0xe6, 0x61, 0xa9, 0x90, 0xbd, 0x97, 0x3e, 0x8e, 0x45, 0x84, 0xb6, 0xeb,
 | 
			
		||||
	0x57, 0xa6, 0x77, 0xa1, 0xa2, 0x7b, 0xd4, 0xe2, 0x45, 0x84, 0x96, 0x58, 0x43, 0xa8, 0x19, 0x0e,
 | 
			
		||||
	0xdb, 0x84, 0xea, 0xf1, 0x2c, 0x7d, 0x64, 0x31, 0xc7, 0x05, 0x7e, 0x8f, 0x0c, 0x02, 0xcf, 0x20,
 | 
			
		||||
	0x8d, 0x60, 0xd7, 0xa0, 0x7c, 0x3c, 0xeb, 0x77, 0xf5, 0xad, 0x13, 0x4f, 0x32, 0xfc, 0xda, 0xab,
 | 
			
		||||
	0x6a, 0x83, 0xac, 0xcf, 0x61, 0x39, 0x3f, 0x2e, 0x2d, 0xec, 0x85, 0x5c, 0x61, 0x4f, 0x8f, 0xec,
 | 
			
		||||
	0xe2, 0xcb, 0xae, 0x1f, 0x1f, 0x01, 0xd0, 0x33, 0xf0, 0xeb, 0x5e, 0x5b, 0x7e, 0x0c, 0x35, 0xf3,
 | 
			
		||||
	0x7c, 0xcc, 0x3e, 0x58, 0x78, 0x0e, 0x6f, 0xa5, 0x6f, 0xcb, 0x73, 0x6f, 0xe2, 0xd6, 0x3d, 0x6c,
 | 
			
		||||
	0x60, 0xcf, 0x44, 0xd4, 0x75, 0xc7, 0xe3, 0xd7, 0x9d, 0xee, 0x1e, 0xb4, 0x1e, 0x87, 0xe1, 0x7f,
 | 
			
		||||
	0x36, 0xf6, 0xe7, 0x50, 0xd5, 0xaf, 0xd8, 0x38, 0xc6, 0x43, 0x0b, 0xcc, 0x1e, 0x30, 0xdd, 0xe4,
 | 
			
		||||
	0xe6, 0x4d, 0xe2, 0x1a, 0x80, 0xc8, 0x29, 0xce, 0x67, 0x36, 0x97, 0x90, 0xf3, 0x06, 0x70, 0x0d,
 | 
			
		||||
	0xd8, 0xdc, 0x80, 0x9a, 0x79, 0x30, 0x65, 0x0d, 0xa8, 0x3c, 0x3e, 0x1c, 0xf6, 0x1e, 0xb5, 0x97,
 | 
			
		||||
	0x58, 0x1d, 0xca, 0x07, 0x83, 0xe1, 0xa3, 0x76, 0x01, 0xa9, 0xc3, 0xc1, 0x61, 0xaf, 0x5d, 0xdc,
 | 
			
		||||
	0xbc, 0x09, 0xcb, 0xf9, 0x27, 0x53, 0xd6, 0x84, 0xda, 0x70, 0xf7, 0xb0, 0xbb, 0x37, 0xf8, 0x59,
 | 
			
		||||
	0x7b, 0x89, 0x2d, 0x43, 0xbd, 0x7f, 0x38, 0xec, 0xed, 0x3f, 0xe6, 0xbd, 0x76, 0x61, 0xf3, 0xa7,
 | 
			
		||||
	0xd0, 0x48, 0x5f, 0x91, 0x50, 0xc3, 0x5e, 0xff, 0xb0, 0xdb, 0x5e, 0x62, 0x00, 0xd5, 0x61, 0x6f,
 | 
			
		||||
	0x9f, 0xf7, 0x50, 0x6f, 0x0d, 0x4a, 0xc3, 0xe1, 0x41, 0xbb, 0x88, 0xb3, 0xee, 0xef, 0xee, 0x1f,
 | 
			
		||||
	0xf4, 0xda, 0x25, 0x24, 0x1f, 0x3d, 0x3c, 0xba, 0x3f, 0x6c, 0x97, 0x37, 0x3f, 0x82, 0x2b, 0x0b,
 | 
			
		||||
	0xef, 0x2b, 0x34, 0xfa, 0x60, 0x97, 0xf7, 0x50, 0x53, 0x13, 0x6a, 0x47, 0xbc, 0xff, 0x64, 0xf7,
 | 
			
		||||
	0x51, 0xaf, 0x5d, 0x40, 0xc1, 0xe7, 0x83, 0xfd, 0x07, 0xbd, 0x6e, 0xbb, 0xb8, 0x77, 0xfd, 0xab,
 | 
			
		||||
	0xe7, 0x6b, 0x85, 0x6f, 0x9e, 0xaf, 0x15, 0xbe, 0x7d, 0xbe, 0x56, 0xf8, 0xfb, 0xf3, 0xb5, 0xc2,
 | 
			
		||||
	0x97, 0xdf, 0xaf, 0x2d, 0x7d, 0xf3, 0xfd, 0xda, 0xd2, 0xb7, 0xdf, 0xaf, 0x2d, 0x1d, 0x57, 0xe9,
 | 
			
		||||
	0x7f, 0x90, 0x0f, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x3c, 0x38, 0x7a, 0x47, 0x19, 0x00,
 | 
			
		||||
	0x00,
 | 
			
		||||
	// 2627 bytes of a gzipped FileDescriptorProto
 | 
			
		||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x59, 0xcf, 0x6f, 0x5b, 0xc7,
 | 
			
		||||
	0xf1, 0x17, 0x7f, 0x93, 0x43, 0x8a, 0x66, 0xd6, 0x4e, 0xc2, 0xe8, 0xeb, 0xaf, 0xac, 0xbc, 0xe4,
 | 
			
		||||
	0x1b, 0xc8, 0xb2, 0x2d, 0x21, 0x0a, 0x10, 0xe7, 0x6b, 0x04, 0x45, 0x25, 0x91, 0x8a, 0x18, 0xdb,
 | 
			
		||||
	0xa2, 0xb0, 0xb4, 0x9c, 0x1e, 0x0a, 0x18, 0x4f, 0x8f, 0x4b, 0xea, 0x41, 0x8f, 0xef, 0x3d, 0xec,
 | 
			
		||||
	0x5b, 0x5a, 0x62, 0x0f, 0x3d, 0xf4, 0xd4, 0x63, 0x80, 0x02, 0xbd, 0x15, 0xfd, 0x27, 0x7a, 0x6c,
 | 
			
		||||
	0xef, 0x01, 0x72, 0x09, 0xd0, 0x1e, 0x82, 0x1e, 0xd2, 0xc2, 0xb9, 0xf4, 0x8f, 0x68, 0x81, 0x62,
 | 
			
		||||
	0x66, 0xf7, 0xfd, 0x20, 0x25, 0xc3, 0x71, 0x5b, 0xf4, 0xc4, 0xd9, 0x99, 0xcf, 0xce, 0xce, 0xcc,
 | 
			
		||||
	0xce, 0xec, 0xce, 0x5b, 0x42, 0x2d, 0x08, 0xa3, 0xcd, 0x50, 0x06, 0x2a, 0x60, 0xf9, 0xf0, 0x64,
 | 
			
		||||
	0xe5, 0xde, 0xd8, 0x55, 0xa7, 0xd3, 0x93, 0x4d, 0x27, 0x98, 0x6c, 0x8d, 0x83, 0x71, 0xb0, 0x45,
 | 
			
		||||
	0xa2, 0x93, 0xe9, 0x88, 0x46, 0x34, 0x20, 0x4a, 0x4f, 0xb1, 0xfe, 0x96, 0x87, 0x7c, 0x3f, 0x64,
 | 
			
		||||
	0xef, 0x42, 0xd9, 0xf5, 0xc3, 0xa9, 0x8a, 0xda, 0xb9, 0xb5, 0xc2, 0x7a, 0x7d, 0xbb, 0xb6, 0x19,
 | 
			
		||||
	0x9e, 0x6c, 0xf6, 0x90, 0xc3, 0x8d, 0x80, 0xad, 0x41, 0x51, 0x5c, 0x08, 0xa7, 0x9d, 0x5f, 0xcb,
 | 
			
		||||
	0xad, 0xd7, 0xb7, 0x01, 0x01, 0xdd, 0x0b, 0xe1, 0xf4, 0xc3, 0x83, 0x25, 0x4e, 0x12, 0xf6, 0x01,
 | 
			
		||||
	0x94, 0xa3, 0x60, 0x2a, 0x1d, 0xd1, 0x2e, 0x10, 0xa6, 0x81, 0x98, 0x01, 0x71, 0x08, 0x65, 0xa4,
 | 
			
		||||
	0xa8, 0x69, 0xe4, 0x7a, 0xa2, 0x5d, 0x4c, 0x35, 0xed, 0xbb, 0x9e, 0xc6, 0x90, 0x84, 0xbd, 0x07,
 | 
			
		||||
	0xa5, 0x93, 0xa9, 0xeb, 0x0d, 0xdb, 0x25, 0x82, 0xd4, 0x11, 0xb2, 0x8b, 0x0c, 0xc2, 0x68, 0x19,
 | 
			
		||||
	0x82, 0x26, 0x42, 0x8e, 0x45, 0xbb, 0x9c, 0x82, 0x1e, 0x23, 0x43, 0x83, 0x48, 0x86, 0x6b, 0x0d,
 | 
			
		||||
	0xdd, 0xd1, 0xa8, 0x5d, 0x49, 0xd7, 0xea, 0xb8, 0xa3, 0x91, 0x5e, 0x0b, 0x25, 0x6c, 0x1d, 0xaa,
 | 
			
		||||
	0xa1, 0x67, 0xab, 0x51, 0x20, 0x27, 0x6d, 0x48, 0xed, 0x3e, 0x32, 0x3c, 0x9e, 0x48, 0xd9, 0x7d,
 | 
			
		||||
	0xa8, 0x3b, 0x81, 0x1f, 0x29, 0x69, 0xbb, 0xbe, 0x8a, 0xda, 0x75, 0x02, 0xbf, 0x89, 0xe0, 0x2f,
 | 
			
		||||
	0x02, 0x79, 0x26, 0xe4, 0x5e, 0x2a, 0xe4, 0x59, 0xe4, 0x6e, 0x11, 0xf2, 0x41, 0x68, 0xfd, 0x3a,
 | 
			
		||||
	0x07, 0xd5, 0x58, 0x2b, 0xb3, 0xa0, 0xb1, 0x23, 0x9d, 0x53, 0x57, 0x09, 0x47, 0x4d, 0xa5, 0x68,
 | 
			
		||||
	0xe7, 0xd6, 0x72, 0xeb, 0x35, 0x3e, 0xc7, 0x63, 0x4d, 0xc8, 0xf7, 0x07, 0x14, 0xef, 0x1a, 0xcf,
 | 
			
		||||
	0xf7, 0x07, 0xac, 0x0d, 0x95, 0xa7, 0xb6, 0x74, 0x6d, 0x5f, 0x51, 0x80, 0x6b, 0x3c, 0x1e, 0xb2,
 | 
			
		||||
	0x9b, 0x50, 0xeb, 0x0f, 0x9e, 0x0a, 0x19, 0xb9, 0x81, 0x4f, 0x61, 0xad, 0xf1, 0x94, 0xc1, 0x56,
 | 
			
		||||
	0x01, 0xfa, 0x83, 0x7d, 0x61, 0xa3, 0xd2, 0xa8, 0x5d, 0x5a, 0x2b, 0xac, 0xd7, 0x78, 0x86, 0x63,
 | 
			
		||||
	0xfd, 0x1c, 0x4a, 0xb4, 0xd5, 0xec, 0x73, 0x28, 0x0f, 0xdd, 0xb1, 0x88, 0x94, 0x36, 0x67, 0x77,
 | 
			
		||||
	0xfb, 0xab, 0xef, 0x6e, 0x2d, 0xfd, 0xf9, 0xbb, 0x5b, 0x1b, 0x99, 0x9c, 0x0a, 0x42, 0xe1, 0x3b,
 | 
			
		||||
	0x81, 0xaf, 0x6c, 0xd7, 0x17, 0x32, 0xda, 0x1a, 0x07, 0xf7, 0xf4, 0x94, 0xcd, 0x0e, 0xfd, 0x70,
 | 
			
		||||
	0xa3, 0x81, 0xdd, 0x86, 0x92, 0xeb, 0x0f, 0xc5, 0x05, 0xd9, 0x5f, 0xd8, 0xbd, 0x6e, 0x54, 0xd5,
 | 
			
		||||
	0xfb, 0x53, 0x15, 0x4e, 0x55, 0x0f, 0x45, 0x5c, 0x23, 0xac, 0xaf, 0x73, 0x50, 0xd6, 0xa9, 0xc4,
 | 
			
		||||
	0x6e, 0x42, 0x71, 0x22, 0x94, 0x4d, 0xeb, 0xd7, 0xb7, 0xab, 0x7a, 0x4b, 0x95, 0xcd, 0x89, 0x8b,
 | 
			
		||||
	0x59, 0x3a, 0x09, 0xa6, 0x18, 0xfb, 0x7c, 0x9a, 0xa5, 0x8f, 0x91, 0xc3, 0x8d, 0x80, 0xfd, 0x1f,
 | 
			
		||||
	0x54, 0x7c, 0xa1, 0xce, 0x03, 0x79, 0x46, 0x31, 0x6a, 0xea, 0xb4, 0x38, 0x14, 0xea, 0x71, 0x30,
 | 
			
		||||
	0x14, 0x3c, 0x96, 0xb1, 0xbb, 0x50, 0x8d, 0x84, 0x33, 0x95, 0xae, 0x9a, 0x51, 0xbc, 0x9a, 0xdb,
 | 
			
		||||
	0x2d, 0x4a, 0x56, 0xc3, 0x23, 0x70, 0x82, 0x60, 0x77, 0xa0, 0x16, 0x09, 0x47, 0x0a, 0x25, 0xfc,
 | 
			
		||||
	0xe7, 0x14, 0xbf, 0xfa, 0xf6, 0xb2, 0x81, 0x4b, 0xa1, 0xba, 0xfe, 0x73, 0x9e, 0xca, 0xad, 0xaf,
 | 
			
		||||
	0xf3, 0x50, 0x44, 0x9b, 0x19, 0x83, 0xa2, 0x2d, 0xc7, 0xba, 0xa2, 0x6a, 0x9c, 0x68, 0xd6, 0x82,
 | 
			
		||||
	0x02, 0xea, 0xc8, 0x13, 0x0b, 0x49, 0xe4, 0x38, 0xe7, 0x43, 0xb3, 0xa1, 0x48, 0xe2, 0xbc, 0x69,
 | 
			
		||||
	0x24, 0xa4, 0xd9, 0x47, 0xa2, 0xd9, 0x6d, 0xa8, 0x85, 0x32, 0xb8, 0x98, 0x3d, 0xd3, 0x16, 0xa4,
 | 
			
		||||
	0x59, 0x8a, 0x4c, 0x34, 0xa0, 0x1a, 0x1a, 0x8a, 0x6d, 0x00, 0x88, 0x0b, 0x25, 0xed, 0x83, 0x20,
 | 
			
		||||
	0x52, 0x51, 0xbb, 0x4c, 0xd6, 0x52, 0xde, 0x23, 0xa3, 0x77, 0xc4, 0x33, 0x52, 0xb6, 0x02, 0xd5,
 | 
			
		||||
	0xd3, 0x20, 0x52, 0xbe, 0x3d, 0x11, 0x54, 0x21, 0x35, 0x9e, 0x8c, 0x99, 0x05, 0xe5, 0xa9, 0xe7,
 | 
			
		||||
	0x4e, 0x5c, 0xd5, 0xae, 0xa5, 0x3a, 0x8e, 0x89, 0xc3, 0x8d, 0x04, 0xb3, 0xd8, 0x19, 0xcb, 0x60,
 | 
			
		||||
	0x1a, 0x1e, 0xd9, 0x52, 0xf8, 0x8a, 0xea, 0xa7, 0xc6, 0xe7, 0x78, 0xec, 0x53, 0x78, 0x47, 0x8a,
 | 
			
		||||
	0x49, 0xf0, 0x5c, 0xd0, 0x46, 0x0d, 0xd4, 0xf4, 0x24, 0xe2, 0x18, 0xd8, 0xc8, 0x7d, 0x2e, 0xa8,
 | 
			
		||||
	0x86, 0xaa, 0xfc, 0xe5, 0x00, 0xeb, 0x2e, 0x94, 0xb5, 0xdd, 0x18, 0x16, 0xa4, 0x4c, 0xa5, 0x10,
 | 
			
		||||
	0x8d, 0x15, 0xd2, 0x3b, 0x8a, 0x2b, 0xa4, 0x77, 0x64, 0x75, 0xa0, 0xac, 0x2d, 0x44, 0xf4, 0x21,
 | 
			
		||||
	0x7a, 0x65, 0xd0, 0x48, 0x23, 0x6f, 0x10, 0x8c, 0x94, 0xce, 0x48, 0x4e, 0x34, 0x69, 0xb5, 0xa5,
 | 
			
		||||
	0x8e, 0x7f, 0x81, 0x13, 0x6d, 0x3d, 0x84, 0x5a, 0xb2, 0xb3, 0xb4, 0x44, 0xc7, 0xa8, 0xc9, 0xf7,
 | 
			
		||||
	0x3a, 0x38, 0x81, 0xc2, 0xa5, 0x17, 0x25, 0x1a, 0xc3, 0x18, 0x84, 0xca, 0x0d, 0x7c, 0xdb, 0x23,
 | 
			
		||||
	0x45, 0x55, 0x9e, 0x8c, 0xad, 0x3f, 0x16, 0xa0, 0x44, 0x8e, 0xb1, 0x75, 0xac, 0x88, 0x70, 0xaa,
 | 
			
		||||
	0x3d, 0x28, 0xec, 0x32, 0x53, 0x11, 0x40, 0xb5, 0x97, 0x14, 0x04, 0xd6, 0xe1, 0x0a, 0x66, 0xa7,
 | 
			
		||||
	0x27, 0x1c, 0x15, 0x48, 0xb3, 0x4e, 0x32, 0xc6, 0xf5, 0x87, 0x58, 0xa1, 0x3a, 0x61, 0x88, 0x66,
 | 
			
		||||
	0x77, 0xa0, 0x1c, 0x50, 0x59, 0x51, 0xce, 0xbc, 0xa4, 0xd8, 0x0c, 0x04, 0x95, 0x4b, 0x61, 0x0f,
 | 
			
		||||
	0x03, 0xdf, 0x9b, 0x51, 0x26, 0x55, 0x79, 0x32, 0xc6, 0x44, 0xa7, 0x3a, 0x7a, 0x32, 0x0b, 0xf5,
 | 
			
		||||
	0xb1, 0xda, 0xd4, 0x89, 0xfe, 0x38, 0x66, 0xf2, 0x54, 0x8e, 0x07, 0xe7, 0x93, 0x49, 0x38, 0x8a,
 | 
			
		||||
	0xfa, 0xa1, 0x6a, 0x5f, 0x4f, 0x53, 0x32, 0xe6, 0xf1, 0x44, 0x8a, 0x48, 0xc7, 0x76, 0x4e, 0x05,
 | 
			
		||||
	0x22, 0x6f, 0xa4, 0xc8, 0x3d, 0xc3, 0xe3, 0x89, 0x34, 0xad, 0x34, 0x84, 0xbe, 0x49, 0xd0, 0x4c,
 | 
			
		||||
	0xa5, 0x21, 0x36, 0x95, 0x63, 0x86, 0x0e, 0x06, 0x07, 0x88, 0x7c, 0x2b, 0x3d, 0xdd, 0x35, 0x87,
 | 
			
		||||
	0x1b, 0x89, 0xf6, 0x36, 0x9a, 0x7a, 0xaa, 0xd7, 0x69, 0xbf, 0xad, 0x43, 0x19, 0x8f, 0xd9, 0xff,
 | 
			
		||||
	0x43, 0x03, 0x4f, 0x32, 0xe1, 0x2b, 0xb2, 0xa4, 0xdd, 0x26, 0x87, 0xdf, 0x4c, 0x1c, 0xde, 0xcb,
 | 
			
		||||
	0x08, 0xf9, 0x1c, 0xd4, 0x5a, 0x4d, 0x7d, 0xc7, 0x1d, 0x89, 0xdc, 0x9f, 0xe9, 0x54, 0x2b, 0x70,
 | 
			
		||||
	0xa2, 0xad, 0x1e, 0x54, 0x63, 0xef, 0x2e, 0x65, 0xd0, 0x3d, 0xa8, 0x44, 0xa7, 0xb6, 0x74, 0xfd,
 | 
			
		||||
	0x31, 0x6d, 0x6e, 0x73, 0xfb, 0x7a, 0x12, 0x8c, 0x81, 0xe6, 0xa3, 0x03, 0x31, 0xc6, 0x0a, 0xe2,
 | 
			
		||||
	0x6c, 0xbc, 0x4a, 0x57, 0x0b, 0x0a, 0x53, 0x77, 0x48, 0x7a, 0x96, 0x39, 0x92, 0xc8, 0x19, 0xbb,
 | 
			
		||||
	0x3a, 0x9f, 0x97, 0x39, 0x92, 0x68, 0xdf, 0x24, 0x18, 0xea, 0xeb, 0x76, 0x99, 0x13, 0x3d, 0x97,
 | 
			
		||||
	0xb1, 0xa5, 0x85, 0x8c, 0xf5, 0xe2, 0xb0, 0xfe, 0x57, 0x56, 0xfb, 0x55, 0x0e, 0xaa, 0x71, 0x8f,
 | 
			
		||||
	0x80, 0x37, 0x95, 0x3b, 0x14, 0xbe, 0x72, 0x47, 0xae, 0x90, 0x66, 0xe1, 0x0c, 0x87, 0xdd, 0x83,
 | 
			
		||||
	0x92, 0xad, 0x94, 0x8c, 0xcf, 0xff, 0xb7, 0xb3, 0x0d, 0xc6, 0xe6, 0x0e, 0x4a, 0xba, 0xbe, 0x92,
 | 
			
		||||
	0x33, 0xae, 0x51, 0x2b, 0x9f, 0x00, 0xa4, 0x4c, 0xb4, 0xf5, 0x4c, 0xcc, 0x8c, 0x56, 0x24, 0xd9,
 | 
			
		||||
	0x0d, 0x28, 0x3d, 0xb7, 0xbd, 0x69, 0x5c, 0xcc, 0x7a, 0xf0, 0x20, 0xff, 0x49, 0xce, 0xfa, 0x43,
 | 
			
		||||
	0x1e, 0x2a, 0xa6, 0xe1, 0x60, 0x77, 0xa1, 0x42, 0x0d, 0x87, 0xb1, 0xe8, 0xea, 0xca, 0x8d, 0x21,
 | 
			
		||||
	0x6c, 0x2b, 0xe9, 0xa4, 0x32, 0x36, 0x1a, 0x55, 0xba, 0xa3, 0x32, 0x36, 0xa6, 0x7d, 0x55, 0x61,
 | 
			
		||||
	0x28, 0x46, 0xa6, 0x65, 0x6a, 0x52, 0x83, 0x22, 0x46, 0xae, 0xef, 0x62, 0x7c, 0x38, 0x8a, 0xd8,
 | 
			
		||||
	0xdd, 0xd8, 0xeb, 0x22, 0x69, 0x7c, 0x2b, 0xab, 0xf1, 0xb2, 0xd3, 0x3d, 0xa8, 0x67, 0x96, 0xb9,
 | 
			
		||||
	0xc2, 0xeb, 0xf7, 0xb3, 0x5e, 0x9b, 0x25, 0x49, 0x9d, 0xee, 0xf7, 0xd2, 0x28, 0xfc, 0x1b, 0xf1,
 | 
			
		||||
	0xfb, 0x18, 0x20, 0x55, 0xf9, 0xc3, 0x4f, 0x3e, 0xeb, 0xf7, 0x05, 0x80, 0x7e, 0x88, 0xd7, 0xe7,
 | 
			
		||||
	0xd0, 0xa6, 0x0b, 0xbf, 0xe1, 0x8e, 0xfd, 0x40, 0x8a, 0x67, 0x74, 0x42, 0xd0, 0xfc, 0x2a, 0xaf,
 | 
			
		||||
	0x6b, 0x1e, 0x55, 0x0c, 0xdb, 0x81, 0xfa, 0x50, 0x44, 0x8e, 0x74, 0x29, 0xa1, 0x4c, 0xd0, 0x6f,
 | 
			
		||||
	0xa1, 0x4f, 0xa9, 0x9e, 0xcd, 0x4e, 0x8a, 0xd0, 0xb1, 0xca, 0xce, 0x61, 0xdb, 0xd0, 0x10, 0x17,
 | 
			
		||||
	0x61, 0x20, 0x95, 0x59, 0x45, 0xf7, 0xa5, 0xd7, 0x74, 0x87, 0x8b, 0x7c, 0x7d, 0x02, 0xd4, 0x45,
 | 
			
		||||
	0x3a, 0x60, 0x36, 0x14, 0x1d, 0x3b, 0x8c, 0x4c, 0x37, 0xd0, 0x5e, 0x58, 0x6f, 0xcf, 0x0e, 0x75,
 | 
			
		||||
	0xd0, 0x76, 0x3f, 0x42, 0x5f, 0x7f, 0xf1, 0x97, 0x5b, 0x77, 0x32, 0x2d, 0xd4, 0x24, 0x38, 0x99,
 | 
			
		||||
	0x6d, 0x51, 0xbe, 0x9c, 0xb9, 0x6a, 0x6b, 0xaa, 0x5c, 0x6f, 0xcb, 0x0e, 0x5d, 0x54, 0x87, 0x13,
 | 
			
		||||
	0x7b, 0x1d, 0x4e, 0xaa, 0xd9, 0x27, 0xd0, 0x0c, 0x65, 0x30, 0x96, 0x22, 0x8a, 0x9e, 0xd1, 0x85,
 | 
			
		||||
	0x6a, 0x1a, 0xdd, 0x37, 0xcc, 0xc5, 0x4f, 0x92, 0xcf, 0x50, 0xc0, 0x97, 0xc3, 0xec, 0x70, 0xe5,
 | 
			
		||||
	0x47, 0xd0, 0x5a, 0xf4, 0xf8, 0x75, 0x76, 0x6f, 0xe5, 0x3e, 0xd4, 0x12, 0x0f, 0x5e, 0x35, 0xb1,
 | 
			
		||||
	0x9a, 0xdd, 0xf6, 0xdf, 0xe5, 0xa0, 0xac, 0xeb, 0x91, 0xdd, 0x87, 0x9a, 0x17, 0x38, 0x36, 0x1a,
 | 
			
		||||
	0x10, 0x7f, 0x54, 0xbc, 0x93, 0x96, 0xeb, 0xe6, 0xa3, 0x58, 0xa6, 0xf7, 0x23, 0xc5, 0x62, 0x7a,
 | 
			
		||||
	0xba, 0xfe, 0x28, 0x88, 0xeb, 0xa7, 0x99, 0x4e, 0xea, 0xf9, 0xa3, 0x80, 0x6b, 0xe1, 0xca, 0x43,
 | 
			
		||||
	0x68, 0xce, 0xab, 0xb8, 0xc2, 0xce, 0xf7, 0xe6, 0x13, 0x9d, 0x2e, 0x92, 0x64, 0x52, 0xd6, 0xec,
 | 
			
		||||
	0xfb, 0x50, 0x4b, 0xf8, 0x6c, 0xe3, 0xb2, 0xe1, 0x8d, 0xec, 0xcc, 0x8c, 0xad, 0xd6, 0x2f, 0x73,
 | 
			
		||||
	0x00, 0xa9, 0x6d, 0x78, 0xce, 0xe1, 0xe7, 0x8b, 0x9f, 0x36, 0x1e, 0xc9, 0x98, 0xee, 0x6d, 0x5b,
 | 
			
		||||
	0xd9, 0x64, 0x4b, 0x83, 0x13, 0xcd, 0x36, 0x01, 0x86, 0x49, 0xad, 0xbf, 0xe4, 0x04, 0xc8, 0x20,
 | 
			
		||||
	0x50, 0xbf, 0x67, 0xfb, 0xe3, 0xa9, 0x3d, 0x16, 0xa6, 0x3b, 0x4c, 0xc6, 0x56, 0x1f, 0xaa, 0xb1,
 | 
			
		||||
	0x85, 0x6c, 0x0d, 0xea, 0x91, 0xb1, 0x0a, 0x3b, 0x70, 0x34, 0xa5, 0xc4, 0xb3, 0x2c, 0xec, 0xa4,
 | 
			
		||||
	0xa5, 0xed, 0x8f, 0xc5, 0x5c, 0x27, 0xcd, 0x91, 0xc3, 0x8d, 0xc0, 0xfa, 0x02, 0x4a, 0xc4, 0xc0,
 | 
			
		||||
	0xea, 0x8d, 0x94, 0x2d, 0x95, 0x69, 0xca, 0x75, 0xdf, 0x19, 0x44, 0x64, 0xd2, 0x6e, 0x11, 0xf3,
 | 
			
		||||
	0x9b, 0x6b, 0x00, 0x7b, 0x1f, 0xbb, 0xdb, 0xa1, 0x09, 0xf7, 0x55, 0x38, 0x14, 0x5b, 0x9f, 0x42,
 | 
			
		||||
	0x35, 0x66, 0x63, 0x54, 0x3c, 0xd7, 0x17, 0xc6, 0x44, 0xa2, 0xf1, 0x63, 0xc6, 0x39, 0xb5, 0xa5,
 | 
			
		||||
	0xed, 0x28, 0xa1, 0xdb, 0x9f, 0x12, 0x4f, 0x19, 0xd6, 0x7b, 0x50, 0xcf, 0x14, 0x25, 0xe6, 0xe2,
 | 
			
		||||
	0x53, 0xda, 0x63, 0x7d, 0x34, 0xe8, 0x81, 0xf5, 0x19, 0x2c, 0xcf, 0x15, 0x08, 0xde, 0x64, 0xee,
 | 
			
		||||
	0x30, 0xbe, 0xc9, 0xf4, 0x2d, 0x75, 0xa9, 0x8b, 0x63, 0x50, 0x3c, 0x17, 0xf6, 0x99, 0xe9, 0xe0,
 | 
			
		||||
	0x88, 0xb6, 0x7e, 0x8b, 0xdf, 0x6c, 0x71, 0x67, 0xfd, 0xbf, 0x00, 0xa7, 0x4a, 0x85, 0xcf, 0xa8,
 | 
			
		||||
	0xd5, 0x36, 0xca, 0x6a, 0xc8, 0x21, 0x04, 0xbb, 0x05, 0x75, 0x1c, 0x44, 0x46, 0xae, 0x55, 0xd3,
 | 
			
		||||
	0x8c, 0x48, 0x03, 0xfe, 0x07, 0x6a, 0xa3, 0x64, 0x7a, 0xc1, 0xe4, 0x47, 0x3c, 0xfb, 0x1d, 0xa8,
 | 
			
		||||
	0xfa, 0x81, 0x91, 0xe9, 0xbd, 0xad, 0xf8, 0x41, 0x32, 0xcf, 0xf6, 0x3c, 0x23, 0x2b, 0xe9, 0x79,
 | 
			
		||||
	0xb6, 0xe7, 0x91, 0xd0, 0xba, 0x03, 0x6f, 0x5c, 0xfa, 0xfa, 0x64, 0x6f, 0x41, 0x79, 0xe4, 0x7a,
 | 
			
		||||
	0x8a, 0x6e, 0x2c, 0xfc, 0xd2, 0x30, 0x23, 0xeb, 0x1f, 0x39, 0x80, 0x34, 0xb7, 0xb0, 0x64, 0xf0,
 | 
			
		||||
	0xea, 0x41, 0x4c, 0x43, 0x5f, 0x35, 0x1e, 0x54, 0x27, 0xe6, 0x10, 0x33, 0x99, 0x71, 0x73, 0x3e,
 | 
			
		||||
	0x1f, 0x37, 0xe3, 0x33, 0x4e, 0x1f, 0x6f, 0xdb, 0xe6, 0x78, 0x7b, 0x9d, 0x2f, 0xc4, 0x64, 0x05,
 | 
			
		||||
	0x6a, 0xe0, 0xb2, 0x0f, 0x06, 0x90, 0xd6, 0x3a, 0x37, 0x92, 0x95, 0x87, 0xb0, 0x3c, 0xb7, 0xe4,
 | 
			
		||||
	0x0f, 0xbc, 0xd0, 0xd2, 0xc3, 0x38, 0x5b, 0xe8, 0xdb, 0x50, 0xd6, 0x2f, 0x0d, 0x6c, 0x1d, 0x2a,
 | 
			
		||||
	0xb6, 0xa3, 0x6b, 0x3c, 0x73, 0xce, 0xa0, 0x70, 0x87, 0xd8, 0x3c, 0x16, 0x5b, 0x7f, 0xca, 0x03,
 | 
			
		||||
	0xa4, 0xfc, 0xd7, 0xe8, 0xe2, 0x1f, 0x40, 0x33, 0x12, 0x4e, 0xe0, 0x0f, 0x6d, 0x39, 0x23, 0xa9,
 | 
			
		||||
	0xf9, 0x14, 0xbe, 0x6a, 0xca, 0x02, 0x32, 0xd3, 0xd1, 0x17, 0x5e, 0xdd, 0xd1, 0xaf, 0x43, 0xd1,
 | 
			
		||||
	0x09, 0xc2, 0x99, 0xb9, 0xb7, 0xd8, 0xbc, 0x23, 0x7b, 0x41, 0x38, 0x3b, 0x58, 0xe2, 0x84, 0x60,
 | 
			
		||||
	0x9b, 0x50, 0x9e, 0x9c, 0xd1, 0xdb, 0x8b, 0xfe, 0x86, 0xbc, 0x31, 0x8f, 0x7d, 0x7c, 0x86, 0xf4,
 | 
			
		||||
	0xc1, 0x12, 0x37, 0x28, 0x76, 0x07, 0x4a, 0x93, 0xb3, 0xa1, 0x2b, 0xcd, 0xcd, 0x73, 0x7d, 0x11,
 | 
			
		||||
	0xde, 0x71, 0x25, 0x3d, 0xb5, 0x20, 0x86, 0x59, 0x90, 0x97, 0x13, 0xf3, 0xd0, 0xd2, 0x5a, 0x88,
 | 
			
		||||
	0xe6, 0xe4, 0x60, 0x89, 0xe7, 0xe5, 0x64, 0xb7, 0x0a, 0x65, 0x1d, 0x57, 0xeb, 0xef, 0x05, 0x68,
 | 
			
		||||
	0xce, 0x5b, 0x89, 0x3b, 0x1b, 0x49, 0x27, 0xde, 0xd9, 0x48, 0x3a, 0xc9, 0xc7, 0x4e, 0x3e, 0xf3,
 | 
			
		||||
	0xb1, 0x63, 0x41, 0x29, 0x38, 0xf7, 0x85, 0xcc, 0x3e, 0x32, 0xed, 0x9d, 0x06, 0xe7, 0x3e, 0x76,
 | 
			
		||||
	0xcd, 0x5a, 0x34, 0xd7, 0x84, 0x96, 0x4c, 0x13, 0xfa, 0x3e, 0x2c, 0x8f, 0x02, 0xcf, 0x0b, 0xce,
 | 
			
		||||
	0x07, 0xb3, 0x89, 0xe7, 0xfa, 0x67, 0xa6, 0x13, 0x9d, 0x67, 0xb2, 0x75, 0xb8, 0x36, 0x74, 0x25,
 | 
			
		||||
	0x9a, 0x63, 0xba, 0xff, 0x88, 0x7c, 0xaf, 0xf2, 0x45, 0x36, 0xfb, 0x1c, 0xd6, 0x6c, 0xa5, 0xc4,
 | 
			
		||||
	0x24, 0x54, 0xc7, 0x7e, 0x68, 0x3b, 0x67, 0x9d, 0xc0, 0xa1, 0x2a, 0x9c, 0x84, 0xb6, 0x72, 0x4f,
 | 
			
		||||
	0x5c, 0xcf, 0x55, 0x33, 0x0a, 0x46, 0x95, 0xbf, 0x12, 0xc7, 0x3e, 0x80, 0xa6, 0x23, 0x85, 0xad,
 | 
			
		||||
	0x44, 0x47, 0x44, 0xea, 0xc8, 0x56, 0xa7, 0xed, 0x2a, 0xcd, 0x5c, 0xe0, 0xa2, 0x0f, 0x36, 0x5a,
 | 
			
		||||
	0xfb, 0x85, 0xeb, 0x0d, 0x1d, 0xfc, 0x6c, 0xad, 0x69, 0x1f, 0xe6, 0x98, 0x6c, 0x13, 0x18, 0x31,
 | 
			
		||||
	0xba, 0x93, 0x50, 0xcd, 0x12, 0x28, 0x10, 0xf4, 0x0a, 0x09, 0x1e, 0xb8, 0xca, 0x9d, 0x88, 0x48,
 | 
			
		||||
	0xd9, 0x93, 0x90, 0xbe, 0xc8, 0x0b, 0x3c, 0x65, 0xb0, 0xdb, 0xd0, 0x72, 0x7d, 0xc7, 0x9b, 0x0e,
 | 
			
		||||
	0xc5, 0xb3, 0x10, 0x1d, 0x91, 0x7e, 0xd4, 0x6e, 0xd0, 0xa9, 0x72, 0xcd, 0xf0, 0x8f, 0x0c, 0x1b,
 | 
			
		||||
	0xa1, 0xe2, 0x62, 0x01, 0xba, 0xac, 0xa1, 0x86, 0x1f, 0x43, 0xad, 0x2f, 0x73, 0xd0, 0x5a, 0x4c,
 | 
			
		||||
	0x3c, 0xdc, 0xb6, 0x10, 0x9d, 0x37, 0x1f, 0xed, 0x48, 0x27, 0x5b, 0x99, 0xcf, 0x6c, 0x65, 0x7c,
 | 
			
		||||
	0x97, 0x16, 0x32, 0x77, 0x69, 0x92, 0x16, 0xc5, 0x97, 0xa7, 0xc5, 0x9c, 0xa3, 0xa5, 0x05, 0x47,
 | 
			
		||||
	0xad, 0xdf, 0xe4, 0xe0, 0xda, 0x42, 0x72, 0xff, 0x60, 0x8b, 0xd6, 0xa0, 0x3e, 0xb1, 0xcf, 0x84,
 | 
			
		||||
	0x7e, 0xf2, 0x88, 0xcc, 0x15, 0x92, 0x65, 0xfd, 0x07, 0xec, 0xf3, 0xa1, 0x91, 0xad, 0xa8, 0x2b,
 | 
			
		||||
	0x6d, 0x8b, 0x13, 0xe4, 0x30, 0x50, 0xfb, 0xc1, 0xd4, 0xdc, 0xc5, 0x71, 0x82, 0xc4, 0xcc, 0xcb,
 | 
			
		||||
	0x69, 0x54, 0xb8, 0x22, 0x8d, 0xac, 0x43, 0xa8, 0xc6, 0x06, 0xb2, 0x5b, 0xe6, 0x4d, 0x2a, 0x97,
 | 
			
		||||
	0x3e, 0xb5, 0x1e, 0x47, 0x42, 0xa2, 0xed, 0xfa, 0x81, 0xea, 0x5d, 0x28, 0xe9, 0x1e, 0x35, 0x7f,
 | 
			
		||||
	0x19, 0xa1, 0x25, 0xd6, 0x00, 0x2a, 0x86, 0xc3, 0x36, 0xa0, 0x7c, 0x32, 0x4b, 0xde, 0x67, 0xcc,
 | 
			
		||||
	0x71, 0x81, 0xe3, 0xa1, 0x41, 0xe0, 0x19, 0xa4, 0x11, 0xec, 0x06, 0x14, 0x4f, 0x66, 0xbd, 0x8e,
 | 
			
		||||
	0xfe, 0xea, 0xc4, 0x93, 0x0c, 0x47, 0xbb, 0x65, 0x6d, 0x90, 0xf5, 0x08, 0x1a, 0xd9, 0x79, 0xc9,
 | 
			
		||||
	0xc5, 0x9e, 0xcb, 0x5c, 0xec, 0xc9, 0x91, 0x9d, 0x7f, 0xd5, 0xe7, 0xc7, 0xc7, 0x00, 0xf4, 0x82,
 | 
			
		||||
	0xfc, 0xba, 0x9f, 0x2d, 0x1f, 0x42, 0xc5, 0xbc, 0x3c, 0xb3, 0x0f, 0x16, 0x5e, 0xd2, 0x9b, 0xc9,
 | 
			
		||||
	0xb3, 0xf4, 0xdc, 0x73, 0xba, 0xf5, 0x00, 0x1b, 0xd8, 0x73, 0x21, 0x3b, 0xee, 0x68, 0xf4, 0xba,
 | 
			
		||||
	0xcb, 0x3d, 0x80, 0xe6, 0x71, 0x18, 0xfe, 0x6b, 0x73, 0x7f, 0x0a, 0x65, 0xfd, 0x00, 0x8e, 0x73,
 | 
			
		||||
	0x3c, 0xb4, 0xc0, 0xec, 0x01, 0xd3, 0x4d, 0x6e, 0xd6, 0x24, 0xae, 0x01, 0x88, 0x9c, 0xe2, 0x7a,
 | 
			
		||||
	0x66, 0x73, 0x09, 0x39, 0x6f, 0x00, 0xd7, 0x80, 0x8d, 0x75, 0xa8, 0x98, 0xb7, 0x56, 0x56, 0x83,
 | 
			
		||||
	0xd2, 0xf1, 0xe1, 0xa0, 0xfb, 0xa4, 0xb5, 0xc4, 0xaa, 0x50, 0x3c, 0xe8, 0x0f, 0x9e, 0xb4, 0x72,
 | 
			
		||||
	0x48, 0x1d, 0xf6, 0x0f, 0xbb, 0xad, 0xfc, 0xc6, 0x6d, 0x68, 0x64, 0x5f, 0x5b, 0x59, 0x1d, 0x2a,
 | 
			
		||||
	0x83, 0x9d, 0xc3, 0xce, 0x6e, 0xff, 0x27, 0xad, 0x25, 0xd6, 0x80, 0x6a, 0xef, 0x70, 0xd0, 0xdd,
 | 
			
		||||
	0x3b, 0xe6, 0xdd, 0x56, 0x6e, 0xe3, 0xc7, 0x50, 0x4b, 0x1e, 0xa0, 0x50, 0xc3, 0x6e, 0xef, 0xb0,
 | 
			
		||||
	0xd3, 0x5a, 0x62, 0x00, 0xe5, 0x41, 0x77, 0x8f, 0x77, 0x51, 0x6f, 0x05, 0x0a, 0x83, 0xc1, 0x41,
 | 
			
		||||
	0x2b, 0x8f, 0xab, 0xee, 0xed, 0xec, 0x1d, 0x74, 0x5b, 0x05, 0x24, 0x9f, 0x3c, 0x3e, 0xda, 0x1f,
 | 
			
		||||
	0xb4, 0x8a, 0x1b, 0x1f, 0xc2, 0x1b, 0x97, 0x5e, 0x74, 0x70, 0xc5, 0x4e, 0x77, 0x7f, 0xe7, 0xf8,
 | 
			
		||||
	0x11, 0x9a, 0x58, 0x86, 0x7c, 0xff, 0x50, 0x2b, 0xea, 0xef, 0xef, 0xb7, 0xf2, 0x1b, 0x1f, 0xc3,
 | 
			
		||||
	0xb5, 0x85, 0x27, 0x19, 0x5a, 0xf0, 0x60, 0x87, 0x77, 0x71, 0xf1, 0x3a, 0x54, 0x8e, 0x78, 0xef,
 | 
			
		||||
	0xe9, 0xce, 0x93, 0x6e, 0x2b, 0x87, 0x82, 0x47, 0xfd, 0xbd, 0x87, 0xdd, 0x4e, 0x2b, 0xbf, 0x7b,
 | 
			
		||||
	0xf3, 0xab, 0x17, 0xab, 0xb9, 0x6f, 0x5e, 0xac, 0xe6, 0xbe, 0x7d, 0xb1, 0x9a, 0xfb, 0xeb, 0x8b,
 | 
			
		||||
	0xd5, 0xdc, 0x97, 0xdf, 0xaf, 0x2e, 0x7d, 0xf3, 0xfd, 0xea, 0xd2, 0xb7, 0xdf, 0xaf, 0x2e, 0x9d,
 | 
			
		||||
	0x94, 0xe9, 0x5f, 0x97, 0x8f, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0xe8, 0xd7, 0x00, 0x96, 0xb5,
 | 
			
		||||
	0x19, 0x00, 0x00,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *Op) Marshal() (dAtA []byte, err error) {
 | 
			
		||||
@@ -3646,6 +3687,13 @@ func (m *Mount) MarshalToSizedBuffer(dAtA []byte) (int, error) {
 | 
			
		||||
	_ = i
 | 
			
		||||
	var l int
 | 
			
		||||
	_ = l
 | 
			
		||||
	if m.ContentCache != 0 {
 | 
			
		||||
		i = encodeVarintOps(dAtA, i, uint64(m.ContentCache))
 | 
			
		||||
		i--
 | 
			
		||||
		dAtA[i] = 0x1
 | 
			
		||||
		i--
 | 
			
		||||
		dAtA[i] = 0xc0
 | 
			
		||||
	}
 | 
			
		||||
	if len(m.ResultID) > 0 {
 | 
			
		||||
		i -= len(m.ResultID)
 | 
			
		||||
		copy(dAtA[i:], m.ResultID)
 | 
			
		||||
@@ -5869,6 +5917,9 @@ func (m *Mount) Size() (n int) {
 | 
			
		||||
	if l > 0 {
 | 
			
		||||
		n += 2 + l + sovOps(uint64(l))
 | 
			
		||||
	}
 | 
			
		||||
	if m.ContentCache != 0 {
 | 
			
		||||
		n += 2 + sovOps(uint64(m.ContentCache))
 | 
			
		||||
	}
 | 
			
		||||
	return n
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -8576,6 +8627,25 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
 | 
			
		||||
			}
 | 
			
		||||
			m.ResultID = string(dAtA[iNdEx:postIndex])
 | 
			
		||||
			iNdEx = postIndex
 | 
			
		||||
		case 24:
 | 
			
		||||
			if wireType != 0 {
 | 
			
		||||
				return fmt.Errorf("proto: wrong wireType = %d for field ContentCache", wireType)
 | 
			
		||||
			}
 | 
			
		||||
			m.ContentCache = 0
 | 
			
		||||
			for shift := uint(0); ; shift += 7 {
 | 
			
		||||
				if shift >= 64 {
 | 
			
		||||
					return ErrIntOverflowOps
 | 
			
		||||
				}
 | 
			
		||||
				if iNdEx >= l {
 | 
			
		||||
					return io.ErrUnexpectedEOF
 | 
			
		||||
				}
 | 
			
		||||
				b := dAtA[iNdEx]
 | 
			
		||||
				iNdEx++
 | 
			
		||||
				m.ContentCache |= MountContentCache(b&0x7F) << shift
 | 
			
		||||
				if b < 0x80 {
 | 
			
		||||
					break
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		default:
 | 
			
		||||
			iNdEx = preIndex
 | 
			
		||||
			skippy, err := skipOps(dAtA[iNdEx:])
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										8
									
								
								vendor/github.com/moby/buildkit/solver/pb/ops.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/moby/buildkit/solver/pb/ops.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -109,6 +109,7 @@ message Mount {
 | 
			
		||||
	SecretOpt secretOpt = 21;
 | 
			
		||||
	SSHOpt SSHOpt = 22;
 | 
			
		||||
	string resultID = 23;
 | 
			
		||||
	MountContentCache contentCache = 24;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MountType defines a type of a mount from a supported set
 | 
			
		||||
@@ -120,6 +121,13 @@ enum MountType {
 | 
			
		||||
	TMPFS = 4;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// MountContentCache ...
 | 
			
		||||
enum MountContentCache {
 | 
			
		||||
	DEFAULT = 0;
 | 
			
		||||
	ON = 1;
 | 
			
		||||
	OFF = 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TmpfsOpt defines options describing tpmfs mounts
 | 
			
		||||
message TmpfsOpt {
 | 
			
		||||
	// Specify an upper limit on the size of the filesystem.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										161
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/engine.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										161
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/engine.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,161 +0,0 @@
 | 
			
		||||
package sourcepolicy
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/bklog"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
	"github.com/sirupsen/logrus"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
	// ErrSourceDenied is returned by the policy engine when a source is denied by the policy.
 | 
			
		||||
	ErrSourceDenied = errors.New("source denied by policy")
 | 
			
		||||
 | 
			
		||||
	// ErrTooManyOps is returned by the policy engine when there are too many converts for a single source op.
 | 
			
		||||
	ErrTooManyOps = errors.New("too many operations")
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Engine is the source policy engine.
 | 
			
		||||
// It is responsible for evaluating a source policy against a source operation.
 | 
			
		||||
// Create one with `NewEngine`
 | 
			
		||||
//
 | 
			
		||||
// Rule matching is delegated to the `Matcher` interface.
 | 
			
		||||
// Mutations are delegated to the `Mutater` interface.
 | 
			
		||||
type Engine struct {
 | 
			
		||||
	pol     []*spb.Policy
 | 
			
		||||
	sources map[string]*selectorCache
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NewEngine creates a new source policy engine.
 | 
			
		||||
func NewEngine(pol []*spb.Policy) *Engine {
 | 
			
		||||
	return &Engine{
 | 
			
		||||
		pol: pol,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// TODO: The key here can't be used to cache attr constraint regexes.
 | 
			
		||||
func (e *Engine) selectorCache(src *spb.Selector) *selectorCache {
 | 
			
		||||
	if e.sources == nil {
 | 
			
		||||
		e.sources = map[string]*selectorCache{}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	key := src.MatchType.String() + " " + src.Identifier
 | 
			
		||||
 | 
			
		||||
	if s, ok := e.sources[key]; ok {
 | 
			
		||||
		return s
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	s := &selectorCache{Selector: src}
 | 
			
		||||
 | 
			
		||||
	e.sources[key] = s
 | 
			
		||||
	return s
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Evaluate evaluates a source operation against the policy.
 | 
			
		||||
//
 | 
			
		||||
// Policies are re-evaluated for each convert rule.
 | 
			
		||||
// Evaluate will error if the there are too many converts for a single source op to prevent infinite loops.
 | 
			
		||||
// This function may error out even if the op was mutated, in which case `true` will be returned along with the error.
 | 
			
		||||
//
 | 
			
		||||
// An error is returned when the source is denied by the policy.
 | 
			
		||||
func (e *Engine) Evaluate(ctx context.Context, op *pb.Op) (bool, error) {
 | 
			
		||||
	if len(e.pol) == 0 {
 | 
			
		||||
		return false, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var mutated bool
 | 
			
		||||
	const maxIterr = 20
 | 
			
		||||
 | 
			
		||||
	for i := 0; ; i++ {
 | 
			
		||||
		if i > maxIterr {
 | 
			
		||||
			return mutated, errors.Wrapf(ErrTooManyOps, "too many mutations on a single source")
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		srcOp := op.GetSource()
 | 
			
		||||
		if srcOp == nil {
 | 
			
		||||
			return false, nil
 | 
			
		||||
		}
 | 
			
		||||
		if i == 0 {
 | 
			
		||||
			ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("orig", *srcOp).WithField("updated", op.GetSource()))
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		mut, err := e.evaluatePolicies(ctx, srcOp)
 | 
			
		||||
		if mut {
 | 
			
		||||
			mutated = true
 | 
			
		||||
		}
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return mutated, err
 | 
			
		||||
		}
 | 
			
		||||
		if !mut {
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return mutated, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (e *Engine) evaluatePolicies(ctx context.Context, srcOp *pb.SourceOp) (bool, error) {
 | 
			
		||||
	for _, pol := range e.pol {
 | 
			
		||||
		mut, err := e.evaluatePolicy(ctx, pol, srcOp)
 | 
			
		||||
		if mut || err != nil {
 | 
			
		||||
			return mut, err
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	return false, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// evaluatePolicy evaluates a single policy against a source operation.
 | 
			
		||||
// If the source is mutated the policy is short-circuited and `true` is returned.
 | 
			
		||||
// If the source is denied, an error will be returned.
 | 
			
		||||
//
 | 
			
		||||
// For Allow/Deny rules, the last matching rule wins.
 | 
			
		||||
// E.g. `ALLOW foo; DENY foo` will deny `foo`, `DENY foo; ALLOW foo` will allow `foo`.
 | 
			
		||||
func (e *Engine) evaluatePolicy(ctx context.Context, pol *spb.Policy, srcOp *pb.SourceOp) (retMut bool, retErr error) {
 | 
			
		||||
	ident := srcOp.GetIdentifier()
 | 
			
		||||
 | 
			
		||||
	ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("ref", ident))
 | 
			
		||||
	defer func() {
 | 
			
		||||
		if retMut || retErr != nil {
 | 
			
		||||
			bklog.G(ctx).WithFields(
 | 
			
		||||
				logrus.Fields{
 | 
			
		||||
					"mutated":       retMut,
 | 
			
		||||
					"updated":       srcOp.GetIdentifier(),
 | 
			
		||||
					logrus.ErrorKey: retErr,
 | 
			
		||||
				}).Debug("Evaluated source policy")
 | 
			
		||||
		}
 | 
			
		||||
	}()
 | 
			
		||||
 | 
			
		||||
	var deny bool
 | 
			
		||||
	for _, rule := range pol.Rules {
 | 
			
		||||
		selector := e.selectorCache(rule.Selector)
 | 
			
		||||
		matched, err := match(ctx, selector, ident, srcOp.Attrs)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return false, errors.Wrap(err, "error matching source policy")
 | 
			
		||||
		}
 | 
			
		||||
		if !matched {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		switch rule.Action {
 | 
			
		||||
		case spb.PolicyAction_ALLOW:
 | 
			
		||||
			deny = false
 | 
			
		||||
		case spb.PolicyAction_DENY:
 | 
			
		||||
			deny = true
 | 
			
		||||
		case spb.PolicyAction_CONVERT:
 | 
			
		||||
			mut, err := mutate(ctx, srcOp, rule, selector, ident)
 | 
			
		||||
			if err != nil || mut {
 | 
			
		||||
				return mut, errors.Wrap(err, "error mutating source policy")
 | 
			
		||||
			}
 | 
			
		||||
		default:
 | 
			
		||||
			return false, errors.Errorf("source policy: rule %s %s: unknown type %q", rule.Action, rule.Selector.Identifier, ident)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if deny {
 | 
			
		||||
		return false, errors.Wrapf(ErrSourceDenied, "source %q denied by policy", ident)
 | 
			
		||||
	}
 | 
			
		||||
	return false, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										92
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/formatter.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										92
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/formatter.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,92 +0,0 @@
 | 
			
		||||
package sourcepolicy
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"regexp"
 | 
			
		||||
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/wildcard"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Source wraps a a protobuf source in order to store cached state such as the compiled regexes.
 | 
			
		||||
type selectorCache struct {
 | 
			
		||||
	*spb.Selector
 | 
			
		||||
 | 
			
		||||
	re *regexp.Regexp
 | 
			
		||||
	w  *wildcardCache
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Format formats the provided ref according to the match/type of the source.
 | 
			
		||||
//
 | 
			
		||||
// For example, if the source is a wildcard, the ref will be formatted with the wildcard in the source replacing the parameters in the destination.
 | 
			
		||||
//
 | 
			
		||||
//	matcher: wildcard source: "docker.io/library/golang:*"  match: "docker.io/library/golang:1.19" format: "docker.io/library/golang:${1}-alpine" result: "docker.io/library/golang:1.19-alpine"
 | 
			
		||||
func (s *selectorCache) Format(match, format string) (string, error) {
 | 
			
		||||
	switch s.MatchType {
 | 
			
		||||
	case spb.MatchType_EXACT:
 | 
			
		||||
		return s.Identifier, nil
 | 
			
		||||
	case spb.MatchType_REGEX:
 | 
			
		||||
		re, err := s.regex()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", err
 | 
			
		||||
		}
 | 
			
		||||
		return re.ReplaceAllString(match, format), nil
 | 
			
		||||
	case spb.MatchType_WILDCARD:
 | 
			
		||||
		w, err := s.wildcard()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", err
 | 
			
		||||
		}
 | 
			
		||||
		m := w.Match(match)
 | 
			
		||||
		if m == nil {
 | 
			
		||||
			return match, nil
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		return m.Format(format)
 | 
			
		||||
	}
 | 
			
		||||
	return "", errors.Errorf("unknown match type: %s", s.MatchType)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// wildcardCache wraps a wildcard.Wildcard to cache returned matches by ref.
 | 
			
		||||
// This way a match only needs to be computed once per ref.
 | 
			
		||||
type wildcardCache struct {
 | 
			
		||||
	w *wildcard.Wildcard
 | 
			
		||||
	m map[string]*wildcard.Match
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (w *wildcardCache) Match(ref string) *wildcard.Match {
 | 
			
		||||
	if w.m == nil {
 | 
			
		||||
		w.m = make(map[string]*wildcard.Match)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if m, ok := w.m[ref]; ok {
 | 
			
		||||
		return m
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m := w.w.Match(ref)
 | 
			
		||||
	w.m[ref] = m
 | 
			
		||||
	return m
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *selectorCache) wildcard() (*wildcardCache, error) {
 | 
			
		||||
	if s.w != nil {
 | 
			
		||||
		return s.w, nil
 | 
			
		||||
	}
 | 
			
		||||
	w, err := wildcard.New(s.Identifier)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	s.w = &wildcardCache{w: w}
 | 
			
		||||
	return s.w, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *selectorCache) regex() (*regexp.Regexp, error) {
 | 
			
		||||
	if s.re != nil {
 | 
			
		||||
		return s.re, nil
 | 
			
		||||
	}
 | 
			
		||||
	re, err := regexp.Compile(s.Identifier)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	s.re = re
 | 
			
		||||
	return re, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										61
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/matcher.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										61
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/matcher.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,61 +0,0 @@
 | 
			
		||||
package sourcepolicy
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"regexp"
 | 
			
		||||
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func match(ctx context.Context, src *selectorCache, ref string, attrs map[string]string) (bool, error) {
 | 
			
		||||
	for _, c := range src.Constraints {
 | 
			
		||||
		if c == nil {
 | 
			
		||||
			return false, errors.Errorf("invalid nil constraint for %v", src)
 | 
			
		||||
		}
 | 
			
		||||
		switch c.Condition {
 | 
			
		||||
		case spb.AttrMatch_EQUAL:
 | 
			
		||||
			if attrs[c.Key] != c.Value {
 | 
			
		||||
				return false, nil
 | 
			
		||||
			}
 | 
			
		||||
		case spb.AttrMatch_NOTEQUAL:
 | 
			
		||||
			if attrs[c.Key] == c.Value {
 | 
			
		||||
				return false, nil
 | 
			
		||||
			}
 | 
			
		||||
		case spb.AttrMatch_MATCHES:
 | 
			
		||||
			// TODO: Cache the compiled regex
 | 
			
		||||
			matches, err := regexp.MatchString(c.Value, attrs[c.Key])
 | 
			
		||||
			if err != nil {
 | 
			
		||||
				return false, errors.Errorf("invalid regex %q: %v", c.Value, err)
 | 
			
		||||
			}
 | 
			
		||||
			if !matches {
 | 
			
		||||
				return false, nil
 | 
			
		||||
			}
 | 
			
		||||
		default:
 | 
			
		||||
			return false, errors.Errorf("unknown attr condition: %s", c.Condition)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if src.Identifier == ref {
 | 
			
		||||
		return true, nil
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	switch src.MatchType {
 | 
			
		||||
	case spb.MatchType_EXACT:
 | 
			
		||||
		return false, nil
 | 
			
		||||
	case spb.MatchType_REGEX:
 | 
			
		||||
		re, err := src.regex()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return false, err
 | 
			
		||||
		}
 | 
			
		||||
		return re.MatchString(ref), nil
 | 
			
		||||
	case spb.MatchType_WILDCARD:
 | 
			
		||||
		w, err := src.wildcard()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return false, err
 | 
			
		||||
		}
 | 
			
		||||
		return w.Match(ref) != nil, nil
 | 
			
		||||
	default:
 | 
			
		||||
		return false, errors.Errorf("unknown match type: %s", src.MatchType)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										50
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/mutate.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/github.com/moby/buildkit/sourcepolicy/mutate.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,50 +0,0 @@
 | 
			
		||||
package sourcepolicy
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"context"
 | 
			
		||||
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/bklog"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// mutate is a MutateFn which converts the source operation to the identifier and attributes provided by the policy.
 | 
			
		||||
// If there is no change, then the return value should be false and is not considered an error.
 | 
			
		||||
func mutate(ctx context.Context, op *pb.SourceOp, rule *spb.Rule, selector *selectorCache, ref string) (bool, error) {
 | 
			
		||||
	if rule.Updates == nil {
 | 
			
		||||
		return false, errors.Errorf("missing destination for convert rule")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dest := rule.Updates.Identifier
 | 
			
		||||
	if dest == "" {
 | 
			
		||||
		dest = rule.Selector.Identifier
 | 
			
		||||
	}
 | 
			
		||||
	dest, err := selector.Format(ref, dest)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return false, errors.Wrap(err, "error formatting destination")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	bklog.G(ctx).Debugf("sourcepolicy: converting %s to %s, pattern: %s", ref, dest, rule.Updates.Identifier)
 | 
			
		||||
 | 
			
		||||
	var mutated bool
 | 
			
		||||
	if op.Identifier != dest && dest != "" {
 | 
			
		||||
		mutated = true
 | 
			
		||||
		op.Identifier = dest
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if rule.Updates.Attrs != nil {
 | 
			
		||||
		if op.Attrs == nil {
 | 
			
		||||
			op.Attrs = make(map[string]string, len(rule.Updates.Attrs))
 | 
			
		||||
		}
 | 
			
		||||
		for k, v := range rule.Updates.Attrs {
 | 
			
		||||
			if op.Attrs[k] != v {
 | 
			
		||||
				bklog.G(ctx).Debugf("setting attr %s=%s", k, v)
 | 
			
		||||
				op.Attrs[k] = v
 | 
			
		||||
				mutated = true
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return mutated, nil
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										58
									
								
								vendor/github.com/moby/buildkit/util/imageutil/config.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										58
									
								
								vendor/github.com/moby/buildkit/util/imageutil/config.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -4,7 +4,6 @@ import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
@@ -16,10 +15,7 @@ import (
 | 
			
		||||
	"github.com/containerd/containerd/remotes"
 | 
			
		||||
	"github.com/containerd/containerd/remotes/docker"
 | 
			
		||||
	intoto "github.com/in-toto/in-toto-golang/in_toto"
 | 
			
		||||
	"github.com/moby/buildkit/solver/pb"
 | 
			
		||||
	srctypes "github.com/moby/buildkit/source/types"
 | 
			
		||||
	"github.com/moby/buildkit/sourcepolicy"
 | 
			
		||||
	spb "github.com/moby/buildkit/sourcepolicy/pb"
 | 
			
		||||
	"github.com/moby/buildkit/util/contentutil"
 | 
			
		||||
	"github.com/moby/buildkit/util/leaseutil"
 | 
			
		||||
	"github.com/moby/buildkit/util/resolver/limited"
 | 
			
		||||
@@ -63,8 +59,7 @@ func (e ResolveToNonImageError) Error() string {
 | 
			
		||||
	return fmt.Sprintf("ref mutated by policy to non-image: %s://%s -> %s", srctypes.DockerImageScheme, e.Ref, e.Updated)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform, spls []*spb.Policy) (string, digest.Digest, []byte, error) {
 | 
			
		||||
	// TODO: fix buildkit to take interface instead of struct
 | 
			
		||||
func Config(ctx context.Context, str string, resolver remotes.Resolver, cache ContentCache, leaseManager leases.Manager, p *ocispecs.Platform) (digest.Digest, []byte, error) {
 | 
			
		||||
	var platform platforms.MatchComparer
 | 
			
		||||
	if p != nil {
 | 
			
		||||
		platform = platforms.Only(*p)
 | 
			
		||||
@@ -73,44 +68,13 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co
 | 
			
		||||
	}
 | 
			
		||||
	ref, err := reference.Parse(str)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, errors.WithStack(err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	op := &pb.Op{
 | 
			
		||||
		Op: &pb.Op_Source{
 | 
			
		||||
			Source: &pb.SourceOp{
 | 
			
		||||
				Identifier: srctypes.DockerImageScheme + "://" + ref.String(),
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	mut, err := sourcepolicy.NewEngine(spls).Evaluate(ctx, op)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, errors.Wrap(err, "could not resolve image due to policy")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if mut {
 | 
			
		||||
		var (
 | 
			
		||||
			t  string
 | 
			
		||||
			ok bool
 | 
			
		||||
		)
 | 
			
		||||
		t, newRef, ok := strings.Cut(op.GetSource().GetIdentifier(), "://")
 | 
			
		||||
		if !ok {
 | 
			
		||||
			return "", "", nil, errors.Errorf("could not parse ref: %s", op.GetSource().GetIdentifier())
 | 
			
		||||
		}
 | 
			
		||||
		if ok && t != srctypes.DockerImageScheme {
 | 
			
		||||
			return "", "", nil, &ResolveToNonImageError{Ref: str, Updated: newRef}
 | 
			
		||||
		}
 | 
			
		||||
		ref, err = reference.Parse(newRef)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", "", nil, errors.WithStack(err)
 | 
			
		||||
		}
 | 
			
		||||
		return "", nil, errors.WithStack(err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if leaseManager != nil {
 | 
			
		||||
		ctx2, done, err := leaseutil.WithLease(ctx, leaseManager, leases.WithExpiration(5*time.Minute), leaseutil.MakeTemporary)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", "", nil, errors.WithStack(err)
 | 
			
		||||
			return "", nil, errors.WithStack(err)
 | 
			
		||||
		}
 | 
			
		||||
		ctx = ctx2
 | 
			
		||||
		defer func() {
 | 
			
		||||
@@ -141,18 +105,18 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co
 | 
			
		||||
	if desc.MediaType == "" {
 | 
			
		||||
		_, desc, err = resolver.Resolve(ctx, ref.String())
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return "", "", nil, err
 | 
			
		||||
			return "", nil, err
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fetcher, err := resolver.Fetcher(ctx, ref.String())
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
		return "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if desc.MediaType == images.MediaTypeDockerSchema1Manifest {
 | 
			
		||||
		dgst, dt, err := readSchema1Config(ctx, ref.String(), desc, fetcher, cache)
 | 
			
		||||
		return ref.String(), dgst, dt, err
 | 
			
		||||
		return dgst, dt, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	children := childrenConfigHandler(cache, platform)
 | 
			
		||||
@@ -160,7 +124,7 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co
 | 
			
		||||
 | 
			
		||||
	dslHandler, err := docker.AppendDistributionSourceLabel(cache, ref.String())
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
		return "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	handlers := []images.Handler{
 | 
			
		||||
@@ -169,19 +133,19 @@ func Config(ctx context.Context, str string, resolver remotes.Resolver, cache Co
 | 
			
		||||
		children,
 | 
			
		||||
	}
 | 
			
		||||
	if err := images.Dispatch(ctx, images.Handlers(handlers...), nil, desc); err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
		return "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
	config, err := images.Config(ctx, cache, desc, platform)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
		return "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	dt, err := content.ReadBlob(ctx, cache, config)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", "", nil, err
 | 
			
		||||
		return "", nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return ref.String(), desc.Digest, dt, nil
 | 
			
		||||
	return desc.Digest, dt, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func childrenConfigHandler(provider content.Provider, platform platforms.MatchComparer) images.HandlerFunc {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								vendor/github.com/moby/buildkit/util/imageutil/schema1.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/moby/buildkit/util/imageutil/schema1.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,7 +8,7 @@ import (
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"github.com/containerd/containerd/remotes"
 | 
			
		||||
	"github.com/moby/buildkit/exporter/containerimage/image"
 | 
			
		||||
	dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
 | 
			
		||||
	digest "github.com/opencontainers/go-digest"
 | 
			
		||||
	ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
@@ -45,7 +45,7 @@ func convertSchema1ConfigMeta(in []byte) ([]byte, error) {
 | 
			
		||||
		return nil, errors.Errorf("invalid schema1 manifest")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var img image.Image
 | 
			
		||||
	var img dockerspec.DockerOCIImage
 | 
			
		||||
	if err := json.Unmarshal([]byte(m.History[0].V1Compatibility), &img); err != nil {
 | 
			
		||||
		return nil, errors.Wrap(err, "failed to unmarshal image from schema 1 history")
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										18
									
								
								vendor/github.com/moby/buildkit/util/testutil/integration/util.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								vendor/github.com/moby/buildkit/util/testutil/integration/util.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -16,12 +16,23 @@ import (
 | 
			
		||||
	"github.com/containerd/continuity/fs/fstest"
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
	"github.com/stretchr/testify/require"
 | 
			
		||||
	"github.com/tonistiigi/fsutil"
 | 
			
		||||
	"golang.org/x/sync/errgroup"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var ErrRequirements = errors.Errorf("missing requirements")
 | 
			
		||||
 | 
			
		||||
func Tmpdir(t *testing.T, appliers ...fstest.Applier) string {
 | 
			
		||||
type TmpDirWithName struct {
 | 
			
		||||
	fsutil.FS
 | 
			
		||||
	Name string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// This allows TmpDirWithName to continue being used with the `%s` 'verb' on Printf.
 | 
			
		||||
func (d *TmpDirWithName) String() string {
 | 
			
		||||
	return d.Name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func Tmpdir(t *testing.T, appliers ...fstest.Applier) *TmpDirWithName {
 | 
			
		||||
	t.Helper()
 | 
			
		||||
 | 
			
		||||
	// We cannot use t.TempDir() to create a temporary directory here because
 | 
			
		||||
@@ -38,7 +49,10 @@ func Tmpdir(t *testing.T, appliers ...fstest.Applier) string {
 | 
			
		||||
	err = fstest.Apply(appliers...).Apply(tmpdir)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
 | 
			
		||||
	return tmpdir
 | 
			
		||||
	mount, err := fsutil.NewFS(tmpdir)
 | 
			
		||||
	require.NoError(t, err)
 | 
			
		||||
 | 
			
		||||
	return &TmpDirWithName{FS: mount, Name: tmpdir}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RunCmd(cmd *exec.Cmd, logs map[string]*bytes.Buffer) error {
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										87
									
								
								vendor/github.com/moby/buildkit/util/wildcard/wildcard.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										87
									
								
								vendor/github.com/moby/buildkit/util/wildcard/wildcard.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,87 +0,0 @@
 | 
			
		||||
package wildcard
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"regexp"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"github.com/pkg/errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// New returns a wildcard object for a string that contains "*" symbols.
 | 
			
		||||
func New(s string) (*Wildcard, error) {
 | 
			
		||||
	reStr, err := Wildcard2Regexp(s)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, errors.Wrapf(err, "failed to translate wildcard %q to regexp", s)
 | 
			
		||||
	}
 | 
			
		||||
	re, err := regexp.Compile(reStr)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, errors.Wrapf(err, "failed to compile regexp %q (translated from wildcard %q)", reStr, s)
 | 
			
		||||
	}
 | 
			
		||||
	w := &Wildcard{
 | 
			
		||||
		orig: s,
 | 
			
		||||
		re:   re,
 | 
			
		||||
	}
 | 
			
		||||
	return w, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Wildcard2Regexp translates a wildcard string to a regexp string.
 | 
			
		||||
func Wildcard2Regexp(wildcard string) (string, error) {
 | 
			
		||||
	s := regexp.QuoteMeta(wildcard)
 | 
			
		||||
	if strings.Contains(s, "\\*\\*") {
 | 
			
		||||
		return "", errors.New("invalid wildcard: \"**\"")
 | 
			
		||||
	}
 | 
			
		||||
	s = strings.ReplaceAll(s, "\\*", "(.*)")
 | 
			
		||||
	s = "^" + s + "$"
 | 
			
		||||
	return s, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Wildcard is a wildcard matcher object.
 | 
			
		||||
type Wildcard struct {
 | 
			
		||||
	orig string
 | 
			
		||||
	re   *regexp.Regexp
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// String implements fmt.Stringer.
 | 
			
		||||
func (w *Wildcard) String() string {
 | 
			
		||||
	return w.orig
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Match returns a non-nil Match on match.
 | 
			
		||||
func (w *Wildcard) Match(q string) *Match {
 | 
			
		||||
	submatches := w.re.FindStringSubmatch(q)
 | 
			
		||||
	if len(submatches) == 0 {
 | 
			
		||||
		return nil
 | 
			
		||||
	}
 | 
			
		||||
	m := &Match{
 | 
			
		||||
		w:          w,
 | 
			
		||||
		Submatches: submatches,
 | 
			
		||||
		// FIXME: avoid executing regexp twice
 | 
			
		||||
		idx: w.re.FindStringSubmatchIndex(q),
 | 
			
		||||
	}
 | 
			
		||||
	return m
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Match is a matched result.
 | 
			
		||||
type Match struct {
 | 
			
		||||
	w          *Wildcard
 | 
			
		||||
	Submatches []string // 0: the entire query, 1: the first submatch, 2: the second submatch, ...
 | 
			
		||||
	idx        []int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// String implements fmt.Stringer.
 | 
			
		||||
func (m *Match) String() string {
 | 
			
		||||
	if len(m.Submatches) == 0 {
 | 
			
		||||
		return ""
 | 
			
		||||
	}
 | 
			
		||||
	return m.Submatches[0]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Format formats submatch strings like "$1", "$2".
 | 
			
		||||
func (m *Match) Format(f string) (string, error) {
 | 
			
		||||
	if m.w == nil || len(m.Submatches) == 0 || len(m.idx) == 0 {
 | 
			
		||||
		return "", errors.New("invalid state")
 | 
			
		||||
	}
 | 
			
		||||
	var b []byte
 | 
			
		||||
	b = m.w.re.ExpandString(b, f, m.Submatches[0], m.idx)
 | 
			
		||||
	return string(b), nil
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user