Add support for multiple exporters (#235)

Buildkit 0.13 introduced support for [multiple
exporters](https://docs.docker.com/build/exporters/#multiple-exporters).
We currently return an error in these situations.

Instead, inspect the builder's version when loading the node and relax
this error if we see it's running at least 0.13.

Fixes https://github.com/pulumi/pulumi-docker-build/issues/21.
This commit is contained in:
Bryce Lampe
2024-12-10 09:05:36 -08:00
committed by GitHub
parent 2907567484
commit 195fbfc784
15 changed files with 466 additions and 267 deletions

View File

@@ -1,10 +1,16 @@
## Unreleased
### Added
- Multiple exports are now allowed if the build daemon is detected to have
version 0.13 of Buildkit or newer. (https://github.com/pulumi/pulumi-docker-build/issues/21)
### Changed
- Upgraded buildx from 0.16.0 to 0.18.0.
### Fixed
- Custom `# syntax=` directives no longer cause validation errors. (https://github.com/pulumi/pulumi-docker-build/issues/300)
## 0.0.7 (2024-10-16)

6
go.mod
View File

@@ -32,6 +32,9 @@ require (
github.com/stretchr/testify v1.9.0
github.com/theupdateframework/notary v0.7.0
github.com/tonistiigi/fsutil v0.0.0-20241121093142-31cf1f437184
go.opentelemetry.io/otel/metric v1.29.0
go.opentelemetry.io/otel/sdk v1.29.0
go.opentelemetry.io/otel/trace v1.29.0
go.uber.org/mock v0.5.0
golang.org/x/crypto v0.27.0
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0
@@ -444,10 +447,7 @@ require (
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.29.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.29.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.pennock.tech/tabular v1.1.3 // indirect
go.uber.org/atomic v1.11.0 // indirect

File diff suppressed because one or more lines are too long

View File

@@ -141,6 +141,10 @@ func (c *cli) Err() *streams.Out {
return streams.NewOut(&c.err)
}
func (c *cli) SupportsMultipleExports() bool {
return c.host.supportsMultipleExports
}
// rc returns a registry client with matching auth.
func (c *cli) rc() *regclient.RegClient {
hosts := []config.Host{}

View File

@@ -15,6 +15,7 @@
package internal
import (
"context"
"io"
"testing"
@@ -27,7 +28,7 @@ import (
func TestExec(t *testing.T) {
t.Parallel()
h, err := newHost(nil)
h, err := newHost(context.Background(), nil)
require.NoError(t, err)
cli, err := wrap(h)
require.NoError(t, err)
@@ -44,7 +45,7 @@ func TestWrappedAuth(t *testing.T) {
t.Parallel()
ecr := "https://1234.dkr.ecr.us-west-2.amazonaws.com"
realhost, err := newHost(nil)
realhost, err := newHost(context.Background(), nil)
require.NoError(t, err)
h := &host{
@@ -102,7 +103,7 @@ func TestWrappedAuth(t *testing.T) {
assert.Len(t, h.auths, 2) // In-memory host auth is unchanged.
// Assert that our on-disk host's auth is untouched.
realhostRefreshed, err := newHost(nil)
realhostRefreshed, err := newHost(context.Background(), nil)
require.NoError(t, err)
assert.Equal(t, realhost.auths, realhostRefreshed.auths)
}

View File

@@ -58,6 +58,8 @@ type Client interface {
ManifestCreate(ctx context.Context, push bool, target string, refs ...string) error
ManifestInspect(ctx context.Context, target string) (string, error)
ManifestDelete(ctx context.Context, target string) error
SupportsMultipleExports() bool
}
// Build encapsulates all of the user-provider build parameters and options.
@@ -88,8 +90,6 @@ func newDockerCLI(config *Config) (*command.DockerCli, error) {
return nil, err
}
// TODO: Log some version information for debugging.
return cli, nil
}

View File

@@ -55,7 +55,7 @@ func TestCustomHost(t *testing.T) {
t.Run("env", func(t *testing.T) {
t.Setenv("DOCKER_HOST", socket)
h, err := newHost(nil)
h, err := newHost(context.Background(), nil)
require.NoError(t, err)
cli, err := wrap(h)
require.NoError(t, err)
@@ -66,7 +66,7 @@ func TestCustomHost(t *testing.T) {
t.Run("config", func(t *testing.T) {
t.Parallel()
h, err := newHost(&Config{Host: socket})
h, err := newHost(context.Background(), &Config{Host: socket})
require.NoError(t, err)
cli, err := wrap(h)
require.NoError(t, err)
@@ -290,7 +290,7 @@ func TestBuild(t *testing.T) {
ctx := context.Background()
cli := testcli(t, true, tt.auths...)
build, err := tt.args.toBuild(ctx, false)
build, err := tt.args.toBuild(ctx, true, false)
require.NoError(t, err)
_, err = cli.Build(ctx, build)
@@ -383,7 +383,7 @@ func TestBuildError(t *testing.T) {
ctx := context.Background()
cli := testcli(t, true)
build, err := args.toBuild(ctx, false)
build, err := args.toBuild(ctx, true, false)
require.NoError(t, err)
_, err = cli.Build(ctx, build)
@@ -418,7 +418,7 @@ func TestBuildExecError(t *testing.T) {
ctx := context.Background()
cli := testcli(t, true)
build, err := args.toBuild(ctx, false)
build, err := args.toBuild(ctx, true, false)
require.NoError(t, err)
_, err = cli.Build(ctx, build)
@@ -438,7 +438,7 @@ func TestBuildExecError(t *testing.T) {
// testcli returns a new standalone CLI instance. Set ping to true if a live
// daemon is required -- the test will be skipped if the daemon is not available.
func testcli(t *testing.T, ping bool, auths ...Registry) *cli {
h, err := newHost(nil)
h, err := newHost(context.Background(), nil)
require.NoError(t, err)
cli, err := wrap(h, auths...)

View File

@@ -1214,7 +1214,7 @@ image = docker_build.Image("image",
context={
"location": "app",
"named": {
"golang_latest": {
"golang:latest": {
"location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
},
},

View File

@@ -21,6 +21,7 @@ import (
"sync"
"time"
"github.com/blang/semver"
"github.com/docker/buildx/builder"
"github.com/docker/buildx/store/storeutil"
"github.com/docker/cli/cli/command"
@@ -35,9 +36,12 @@ type host struct {
config *Config
builders map[string]*cachedBuilder
auths map[string]cfgtypes.AuthConfig
// True if the buildkit daemon is at least v0.13.
supportsMultipleExports bool
}
func newHost(config *Config) (*host, error) {
func newHost(ctx context.Context, config *Config) (*host, error) {
docker, err := newDockerCLI(config)
if err != nil {
return nil, err
@@ -47,11 +51,13 @@ func newHost(config *Config) (*host, error) {
if err != nil {
return nil, err
}
h := &host{
cli: docker,
config: config,
builders: map[string]*cachedBuilder{},
auths: auths,
cli: docker,
config: config,
builders: map[string]*cachedBuilder{},
auths: auths,
supportsMultipleExports: false, // Determined when we boot the builder.
}
return h, err
}
@@ -151,10 +157,22 @@ func (h *host) builderFor(build Build) (*cachedBuilder, error) {
// Attempt to load nodes in order to determine the builder's driver. Ignore
// errors for "exec" builds because it's possible to request builders with
// drivers that are unknown to us.
nodes, err := b.LoadNodes(context.Background())
nodes, err := b.LoadNodes(context.Background(), builder.WithData())
if err != nil && !build.ShouldExec() {
return nil, fmt.Errorf("loading nodes: %w", err)
}
// Attempt to determine our builder's buildkit version.
for idx := range nodes {
if nodes[idx].Version == "" {
continue
}
v, err := semver.ParseTolerant(nodes[idx].Version)
if err != nil {
return nil, fmt.Errorf("parsing buildkit version %q: %w", nodes[idx].Version, err)
}
h.supportsMultipleExports = v.GE(semver.MustParse("0.13.0"))
break
}
cached := &cachedBuilder{name: b.Name, driver: b.Driver, nodes: nodes}
h.builders[opts.Builder] = cached

View File

@@ -362,7 +362,12 @@ func (i *Image) Check(
// :(
preview := news.ContainsUnknowns()
if _, berr := args.validate(preview); berr != nil {
cfg := infer.GetConfig[Config](ctx)
supportsMultipleExports := true
if cfg.host != nil {
supportsMultipleExports = cfg.host.supportsMultipleExports
}
if _, berr := args.validate(supportsMultipleExports, preview); berr != nil {
errs := berr.(interface{ Unwrap() []error }).Unwrap()
for _, e := range errs {
if cf, ok := e.(checkFailure); ok {
@@ -488,9 +493,10 @@ func (b *build) ShouldExec() bool {
func (ia ImageArgs) toBuild(
ctx context.Context,
supportsMultipleExports bool,
preview bool,
) (Build, error) {
opts, err := ia.validate(preview)
opts, err := ia.validate(supportsMultipleExports, preview)
if err != nil {
return nil, err
}
@@ -517,27 +523,29 @@ func (ia ImageArgs) toBuild(
// validate confirms the ImageArgs are valid and returns BuildOptions
// appropriate for passing to builders.
func (ia *ImageArgs) validate(preview bool) (controllerapi.BuildOptions, error) {
func (ia *ImageArgs) validate(supportsMultipleExports, preview bool) (controllerapi.BuildOptions, error) {
var multierr error
if len(ia.Exports) > 1 {
multierr = errors.Join(multierr,
newCheckFailure(errors.New("multiple exports are currently unsupported"), "exports"),
)
}
if ia.Push && ia.Load {
multierr = errors.Join(
multierr,
newCheckFailure(
errors.New("push and load may not be set together at the moment"),
"push",
),
)
}
if len(ia.Exports) > 0 && (ia.Push || ia.Load) {
multierr = errors.Join(multierr,
newCheckFailure(errors.New("exports can't be provided with push or load"), "exports"),
)
if !supportsMultipleExports {
if len(ia.Exports) > 1 {
multierr = errors.Join(multierr,
newCheckFailure(errors.New("multiple exports require a v0.13 buildkit daemon or newer"), "exports"),
)
}
if ia.Push && ia.Load {
multierr = errors.Join(
multierr,
newCheckFailure(
errors.New("simultaneous push and load requires a v0.13 buildkit daemon or newer"),
"push",
),
)
}
if len(ia.Exports) > 0 && (ia.Push || ia.Load) {
multierr = errors.Join(multierr,
newCheckFailure(errors.New("multiple exports require a v0.13 buildkit daemon or newer"), "exports"),
)
}
}
dockerfile, context, err := ia.Context.validate(preview, ia.Dockerfile)
@@ -694,7 +702,7 @@ func (i *Image) Create(
return id, state, errors.New("buildkit is not supported on this host")
}
build, err := input.toBuild(ctx, preview)
build, err := input.toBuild(ctx, cli.SupportsMultipleExports(), preview)
if err != nil {
return id, state, fmt.Errorf("preparing: %w", err)
}

View File

@@ -64,6 +64,7 @@ func TestImageLifecycle(t *testing.T) {
ctrl := gomock.NewController(t)
c := NewMockClient(ctrl)
c.EXPECT().BuildKitEnabled().Return(true, nil).AnyTimes()
c.EXPECT().SupportsMultipleExports().Return(true).AnyTimes()
c.EXPECT().Build(gomock.Any(), gomock.AssignableToTypeOf(&build{})).DoAndReturn(
func(_ context.Context, b Build) (*client.SolveResponse, error) {
assert.Equal(t, "testdata/noop/Dockerfile", b.BuildOptions().DockerfileName)
@@ -238,6 +239,7 @@ func TestImageLifecycle(t *testing.T) {
ctrl := gomock.NewController(t)
c := NewMockClient(ctrl)
c.EXPECT().BuildKitEnabled().Return(true, nil).AnyTimes()
c.EXPECT().SupportsMultipleExports().Return(true).AnyTimes()
c.EXPECT().Build(gomock.Any(), gomock.AssignableToTypeOf(&build{})).DoAndReturn(
func(_ context.Context, b Build) (*client.SolveResponse, error) {
assert.Equal(t, "testdata/noop/Dockerfile", b.BuildOptions().DockerfileName)
@@ -279,6 +281,7 @@ func TestImageLifecycle(t *testing.T) {
ctrl := gomock.NewController(t)
c := NewMockClient(ctrl)
c.EXPECT().BuildKitEnabled().Return(true, nil).AnyTimes()
c.EXPECT().SupportsMultipleExports().Return(true).AnyTimes()
c.EXPECT().Build(gomock.Any(), gomock.AssignableToTypeOf(&build{})).DoAndReturn(
func(_ context.Context, b Build) (*client.SolveResponse, error) {
assert.Equal(t, "FROM alpine:latest", b.Inline())
@@ -829,7 +832,7 @@ func TestValidateImageArgs(t *testing.T) {
CacheTo: []CacheTo{{Raw: "=badcacheto"}},
}
_, err := args.validate(false)
_, err := args.validate(true, false)
assert.ErrorContains(t, err, "invalid value badexport")
assert.ErrorContains(t, err, "OSAndVersion specifier component must matc")
assert.ErrorContains(t, err, "badcachefrom")
@@ -845,12 +848,12 @@ func TestValidateImageArgs(t *testing.T) {
Tags: []string{"my-tag"},
Exports: []Export{{Registry: &ExportRegistry{ExportImage{Push: pulumi.BoolRef(true)}}}},
}
actual, err := args.validate(true)
actual, err := args.validate(true, true)
assert.NoError(t, err)
assert.Equal(t, "image", actual.Exports[0].Type)
assert.Equal(t, "false", actual.Exports[0].Attrs["push"])
actual, err = args.validate(false)
actual, err = args.validate(true, false)
assert.NoError(t, err)
assert.Equal(t, "image", actual.Exports[0].Type)
assert.Equal(t, "true", actual.Exports[0].Attrs["push"])
@@ -886,11 +889,11 @@ func TestValidateImageArgs(t *testing.T) {
Tags: []string{"known", ""},
}
_, err := unknowns.validate(true)
_, err := unknowns.validate(true, true)
assert.NoError(t, err)
assert.False(t, unknowns.buildable())
_, err = unknowns.validate(false)
_, err = unknowns.validate(true, false)
assert.Error(t, err)
})
@@ -903,26 +906,26 @@ func TestValidateImageArgs(t *testing.T) {
Exports: []Export{{Raw: "type=registry", Disabled: true}},
}
opts, err := args.validate(true)
opts, err := args.validate(true, true)
assert.NoError(t, err)
assert.Len(t, opts.CacheTo, 0)
assert.Len(t, opts.CacheFrom, 0)
assert.Len(t, opts.Exports, 0)
opts, err = args.validate(false)
opts, err = args.validate(true, false)
assert.NoError(t, err)
assert.Len(t, opts.CacheTo, 0)
assert.Len(t, opts.CacheFrom, 0)
assert.Len(t, opts.Exports, 0)
})
t.Run("multiple exports aren't allowed yet", func(t *testing.T) {
t.Run("multiple exports pre-0.13", func(t *testing.T) {
t.Parallel()
args := ImageArgs{
Exports: []Export{{Raw: "type=local"}, {Raw: "type=tar"}},
}
_, err := args.validate(false)
assert.ErrorContains(t, err, "multiple exports are currently unsupported")
_, err := args.validate(false, false)
assert.ErrorContains(t, err, "multiple exports require a v0.13 buildkit daemon or newer")
})
t.Run("cache and export entries are union-ish", func(t *testing.T) {
@@ -932,7 +935,7 @@ func TestValidateImageArgs(t *testing.T) {
CacheTo: []CacheTo{{Raw: "type=tar", Local: &CacheToLocal{Dest: "/foo"}}},
CacheFrom: []CacheFrom{{Raw: "type=tar", Registry: &CacheFromRegistry{}}},
}
_, err := args.validate(false)
_, err := args.validate(true, false)
assert.ErrorContains(t, err, "exports should only specify one export type")
assert.ErrorContains(t, err, "cacheFrom should only specify one cache type")
assert.ErrorContains(t, err, "cacheTo should only specify one cache type")
@@ -949,7 +952,7 @@ func TestValidateImageArgs(t *testing.T) {
} {
d := d
args := ImageArgs{Dockerfile: &d}
_, err := args.validate(false)
_, err := args.validate(true, false)
assert.ErrorContains(t, err, "unknown instruction: RUNN (did you mean RUN?)")
}
})
@@ -1061,6 +1064,6 @@ func TestToBuild(t *testing.T) {
},
}
_, err := ia.toBuild(context.Background(), false)
_, err := ia.toBuild(context.Background(), true, false)
assert.NoError(t, err)
}

View File

@@ -5,11 +5,11 @@
//
// mockgen -typed -package internal -source cli.go -destination mockcli_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal
//
// Package internal is a generated GoMock package.
package internal
import (
io "io"
reflect "reflect"
command "github.com/docker/cli/cli/command"
@@ -22,6 +22,9 @@ import (
trust "github.com/docker/cli/cli/trust"
client0 "github.com/docker/docker/client"
client1 "github.com/theupdateframework/notary/client"
metric "go.opentelemetry.io/otel/metric"
resource "go.opentelemetry.io/otel/sdk/resource"
trace "go.opentelemetry.io/otel/trace"
gomock "go.uber.org/mock/gomock"
)
@@ -29,6 +32,7 @@ import (
type MockCli struct {
ctrl *gomock.Controller
recorder *MockCliMockRecorder
isgomock struct{}
}
// MockCliMockRecorder is the mock recorder for MockCli.
@@ -61,31 +65,31 @@ func (m *MockCli) Apply(ops ...command.CLIOption) error {
}
// Apply indicates an expected call of Apply.
func (mr *MockCliMockRecorder) Apply(ops ...any) *CliApplyCall {
func (mr *MockCliMockRecorder) Apply(ops ...any) *MockCliApplyCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockCli)(nil).Apply), ops...)
return &CliApplyCall{Call: call}
return &MockCliApplyCall{Call: call}
}
// CliApplyCall wrap *gomock.Call
type CliApplyCall struct {
// MockCliApplyCall wrap *gomock.Call
type MockCliApplyCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliApplyCall) Return(arg0 error) *CliApplyCall {
func (c *MockCliApplyCall) Return(arg0 error) *MockCliApplyCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliApplyCall) Do(f func(...command.CLIOption) error) *CliApplyCall {
func (c *MockCliApplyCall) Do(f func(...command.CLIOption) error) *MockCliApplyCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliApplyCall) DoAndReturn(f func(...command.CLIOption) error) *CliApplyCall {
func (c *MockCliApplyCall) DoAndReturn(f func(...command.CLIOption) error) *MockCliApplyCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -100,31 +104,31 @@ func (m *MockCli) BuildKitEnabled() (bool, error) {
}
// BuildKitEnabled indicates an expected call of BuildKitEnabled.
func (mr *MockCliMockRecorder) BuildKitEnabled() *CliBuildKitEnabledCall {
func (mr *MockCliMockRecorder) BuildKitEnabled() *MockCliBuildKitEnabledCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildKitEnabled", reflect.TypeOf((*MockCli)(nil).BuildKitEnabled))
return &CliBuildKitEnabledCall{Call: call}
return &MockCliBuildKitEnabledCall{Call: call}
}
// CliBuildKitEnabledCall wrap *gomock.Call
type CliBuildKitEnabledCall struct {
// MockCliBuildKitEnabledCall wrap *gomock.Call
type MockCliBuildKitEnabledCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliBuildKitEnabledCall) Return(arg0 bool, arg1 error) *CliBuildKitEnabledCall {
func (c *MockCliBuildKitEnabledCall) Return(arg0 bool, arg1 error) *MockCliBuildKitEnabledCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliBuildKitEnabledCall) Do(f func() (bool, error)) *CliBuildKitEnabledCall {
func (c *MockCliBuildKitEnabledCall) Do(f func() (bool, error)) *MockCliBuildKitEnabledCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *CliBuildKitEnabledCall {
func (c *MockCliBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *MockCliBuildKitEnabledCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -138,31 +142,31 @@ func (m *MockCli) Client() client0.APIClient {
}
// Client indicates an expected call of Client.
func (mr *MockCliMockRecorder) Client() *CliClientCall {
func (mr *MockCliMockRecorder) Client() *MockCliClientCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockCli)(nil).Client))
return &CliClientCall{Call: call}
return &MockCliClientCall{Call: call}
}
// CliClientCall wrap *gomock.Call
type CliClientCall struct {
// MockCliClientCall wrap *gomock.Call
type MockCliClientCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliClientCall) Return(arg0 client0.APIClient) *CliClientCall {
func (c *MockCliClientCall) Return(arg0 client0.APIClient) *MockCliClientCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliClientCall) Do(f func() client0.APIClient) *CliClientCall {
func (c *MockCliClientCall) Do(f func() client0.APIClient) *MockCliClientCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliClientCall) DoAndReturn(f func() client0.APIClient) *CliClientCall {
func (c *MockCliClientCall) DoAndReturn(f func() client0.APIClient) *MockCliClientCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -176,31 +180,31 @@ func (m *MockCli) ConfigFile() *configfile.ConfigFile {
}
// ConfigFile indicates an expected call of ConfigFile.
func (mr *MockCliMockRecorder) ConfigFile() *CliConfigFileCall {
func (mr *MockCliMockRecorder) ConfigFile() *MockCliConfigFileCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ConfigFile", reflect.TypeOf((*MockCli)(nil).ConfigFile))
return &CliConfigFileCall{Call: call}
return &MockCliConfigFileCall{Call: call}
}
// CliConfigFileCall wrap *gomock.Call
type CliConfigFileCall struct {
// MockCliConfigFileCall wrap *gomock.Call
type MockCliConfigFileCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliConfigFileCall) Return(arg0 *configfile.ConfigFile) *CliConfigFileCall {
func (c *MockCliConfigFileCall) Return(arg0 *configfile.ConfigFile) *MockCliConfigFileCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliConfigFileCall) Do(f func() *configfile.ConfigFile) *CliConfigFileCall {
func (c *MockCliConfigFileCall) Do(f func() *configfile.ConfigFile) *MockCliConfigFileCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliConfigFileCall) DoAndReturn(f func() *configfile.ConfigFile) *CliConfigFileCall {
func (c *MockCliConfigFileCall) DoAndReturn(f func() *configfile.ConfigFile) *MockCliConfigFileCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -214,31 +218,31 @@ func (m *MockCli) ContentTrustEnabled() bool {
}
// ContentTrustEnabled indicates an expected call of ContentTrustEnabled.
func (mr *MockCliMockRecorder) ContentTrustEnabled() *CliContentTrustEnabledCall {
func (mr *MockCliMockRecorder) ContentTrustEnabled() *MockCliContentTrustEnabledCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContentTrustEnabled", reflect.TypeOf((*MockCli)(nil).ContentTrustEnabled))
return &CliContentTrustEnabledCall{Call: call}
return &MockCliContentTrustEnabledCall{Call: call}
}
// CliContentTrustEnabledCall wrap *gomock.Call
type CliContentTrustEnabledCall struct {
// MockCliContentTrustEnabledCall wrap *gomock.Call
type MockCliContentTrustEnabledCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliContentTrustEnabledCall) Return(arg0 bool) *CliContentTrustEnabledCall {
func (c *MockCliContentTrustEnabledCall) Return(arg0 bool) *MockCliContentTrustEnabledCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliContentTrustEnabledCall) Do(f func() bool) *CliContentTrustEnabledCall {
func (c *MockCliContentTrustEnabledCall) Do(f func() bool) *MockCliContentTrustEnabledCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliContentTrustEnabledCall) DoAndReturn(f func() bool) *CliContentTrustEnabledCall {
func (c *MockCliContentTrustEnabledCall) DoAndReturn(f func() bool) *MockCliContentTrustEnabledCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -252,31 +256,31 @@ func (m *MockCli) ContextStore() store.Store {
}
// ContextStore indicates an expected call of ContextStore.
func (mr *MockCliMockRecorder) ContextStore() *CliContextStoreCall {
func (mr *MockCliMockRecorder) ContextStore() *MockCliContextStoreCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContextStore", reflect.TypeOf((*MockCli)(nil).ContextStore))
return &CliContextStoreCall{Call: call}
return &MockCliContextStoreCall{Call: call}
}
// CliContextStoreCall wrap *gomock.Call
type CliContextStoreCall struct {
// MockCliContextStoreCall wrap *gomock.Call
type MockCliContextStoreCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliContextStoreCall) Return(arg0 store.Store) *CliContextStoreCall {
func (c *MockCliContextStoreCall) Return(arg0 store.Store) *MockCliContextStoreCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliContextStoreCall) Do(f func() store.Store) *CliContextStoreCall {
func (c *MockCliContextStoreCall) Do(f func() store.Store) *MockCliContextStoreCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliContextStoreCall) DoAndReturn(f func() store.Store) *CliContextStoreCall {
func (c *MockCliContextStoreCall) DoAndReturn(f func() store.Store) *MockCliContextStoreCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -290,31 +294,31 @@ func (m *MockCli) CurrentContext() string {
}
// CurrentContext indicates an expected call of CurrentContext.
func (mr *MockCliMockRecorder) CurrentContext() *CliCurrentContextCall {
func (mr *MockCliMockRecorder) CurrentContext() *MockCliCurrentContextCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentContext", reflect.TypeOf((*MockCli)(nil).CurrentContext))
return &CliCurrentContextCall{Call: call}
return &MockCliCurrentContextCall{Call: call}
}
// CliCurrentContextCall wrap *gomock.Call
type CliCurrentContextCall struct {
// MockCliCurrentContextCall wrap *gomock.Call
type MockCliCurrentContextCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliCurrentContextCall) Return(arg0 string) *CliCurrentContextCall {
func (c *MockCliCurrentContextCall) Return(arg0 string) *MockCliCurrentContextCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliCurrentContextCall) Do(f func() string) *CliCurrentContextCall {
func (c *MockCliCurrentContextCall) Do(f func() string) *MockCliCurrentContextCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliCurrentContextCall) DoAndReturn(f func() string) *CliCurrentContextCall {
func (c *MockCliCurrentContextCall) DoAndReturn(f func() string) *MockCliCurrentContextCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -328,31 +332,31 @@ func (m *MockCli) CurrentVersion() string {
}
// CurrentVersion indicates an expected call of CurrentVersion.
func (mr *MockCliMockRecorder) CurrentVersion() *CliCurrentVersionCall {
func (mr *MockCliMockRecorder) CurrentVersion() *MockCliCurrentVersionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CurrentVersion", reflect.TypeOf((*MockCli)(nil).CurrentVersion))
return &CliCurrentVersionCall{Call: call}
return &MockCliCurrentVersionCall{Call: call}
}
// CliCurrentVersionCall wrap *gomock.Call
type CliCurrentVersionCall struct {
// MockCliCurrentVersionCall wrap *gomock.Call
type MockCliCurrentVersionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliCurrentVersionCall) Return(arg0 string) *CliCurrentVersionCall {
func (c *MockCliCurrentVersionCall) Return(arg0 string) *MockCliCurrentVersionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliCurrentVersionCall) Do(f func() string) *CliCurrentVersionCall {
func (c *MockCliCurrentVersionCall) Do(f func() string) *MockCliCurrentVersionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliCurrentVersionCall) DoAndReturn(f func() string) *CliCurrentVersionCall {
func (c *MockCliCurrentVersionCall) DoAndReturn(f func() string) *MockCliCurrentVersionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -366,31 +370,31 @@ func (m *MockCli) DefaultVersion() string {
}
// DefaultVersion indicates an expected call of DefaultVersion.
func (mr *MockCliMockRecorder) DefaultVersion() *CliDefaultVersionCall {
func (mr *MockCliMockRecorder) DefaultVersion() *MockCliDefaultVersionCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DefaultVersion", reflect.TypeOf((*MockCli)(nil).DefaultVersion))
return &CliDefaultVersionCall{Call: call}
return &MockCliDefaultVersionCall{Call: call}
}
// CliDefaultVersionCall wrap *gomock.Call
type CliDefaultVersionCall struct {
// MockCliDefaultVersionCall wrap *gomock.Call
type MockCliDefaultVersionCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliDefaultVersionCall) Return(arg0 string) *CliDefaultVersionCall {
func (c *MockCliDefaultVersionCall) Return(arg0 string) *MockCliDefaultVersionCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliDefaultVersionCall) Do(f func() string) *CliDefaultVersionCall {
func (c *MockCliDefaultVersionCall) Do(f func() string) *MockCliDefaultVersionCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliDefaultVersionCall) DoAndReturn(f func() string) *CliDefaultVersionCall {
func (c *MockCliDefaultVersionCall) DoAndReturn(f func() string) *MockCliDefaultVersionCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -404,69 +408,69 @@ func (m *MockCli) DockerEndpoint() docker.Endpoint {
}
// DockerEndpoint indicates an expected call of DockerEndpoint.
func (mr *MockCliMockRecorder) DockerEndpoint() *CliDockerEndpointCall {
func (mr *MockCliMockRecorder) DockerEndpoint() *MockCliDockerEndpointCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DockerEndpoint", reflect.TypeOf((*MockCli)(nil).DockerEndpoint))
return &CliDockerEndpointCall{Call: call}
return &MockCliDockerEndpointCall{Call: call}
}
// CliDockerEndpointCall wrap *gomock.Call
type CliDockerEndpointCall struct {
// MockCliDockerEndpointCall wrap *gomock.Call
type MockCliDockerEndpointCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliDockerEndpointCall) Return(arg0 docker.Endpoint) *CliDockerEndpointCall {
func (c *MockCliDockerEndpointCall) Return(arg0 docker.Endpoint) *MockCliDockerEndpointCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliDockerEndpointCall) Do(f func() docker.Endpoint) *CliDockerEndpointCall {
func (c *MockCliDockerEndpointCall) Do(f func() docker.Endpoint) *MockCliDockerEndpointCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliDockerEndpointCall) DoAndReturn(f func() docker.Endpoint) *CliDockerEndpointCall {
func (c *MockCliDockerEndpointCall) DoAndReturn(f func() docker.Endpoint) *MockCliDockerEndpointCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Err mocks base method.
func (m *MockCli) Err() io.Writer {
func (m *MockCli) Err() *streams.Out {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Err")
ret0, _ := ret[0].(io.Writer)
ret0, _ := ret[0].(*streams.Out)
return ret0
}
// Err indicates an expected call of Err.
func (mr *MockCliMockRecorder) Err() *CliErrCall {
func (mr *MockCliMockRecorder) Err() *MockCliErrCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Err", reflect.TypeOf((*MockCli)(nil).Err))
return &CliErrCall{Call: call}
return &MockCliErrCall{Call: call}
}
// CliErrCall wrap *gomock.Call
type CliErrCall struct {
// MockCliErrCall wrap *gomock.Call
type MockCliErrCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliErrCall) Return(arg0 io.Writer) *CliErrCall {
func (c *MockCliErrCall) Return(arg0 *streams.Out) *MockCliErrCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliErrCall) Do(f func() io.Writer) *CliErrCall {
func (c *MockCliErrCall) Do(f func() *streams.Out) *MockCliErrCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliErrCall) DoAndReturn(f func() io.Writer) *CliErrCall {
func (c *MockCliErrCall) DoAndReturn(f func() *streams.Out) *MockCliErrCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -480,31 +484,31 @@ func (m *MockCli) In() *streams.In {
}
// In indicates an expected call of In.
func (mr *MockCliMockRecorder) In() *CliInCall {
func (mr *MockCliMockRecorder) In() *MockCliInCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "In", reflect.TypeOf((*MockCli)(nil).In))
return &CliInCall{Call: call}
return &MockCliInCall{Call: call}
}
// CliInCall wrap *gomock.Call
type CliInCall struct {
// MockCliInCall wrap *gomock.Call
type MockCliInCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliInCall) Return(arg0 *streams.In) *CliInCall {
func (c *MockCliInCall) Return(arg0 *streams.In) *MockCliInCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliInCall) Do(f func() *streams.In) *CliInCall {
func (c *MockCliInCall) Do(f func() *streams.In) *MockCliInCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliInCall) DoAndReturn(f func() *streams.In) *CliInCall {
func (c *MockCliInCall) DoAndReturn(f func() *streams.In) *MockCliInCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -518,31 +522,69 @@ func (m *MockCli) ManifestStore() store0.Store {
}
// ManifestStore indicates an expected call of ManifestStore.
func (mr *MockCliMockRecorder) ManifestStore() *CliManifestStoreCall {
func (mr *MockCliMockRecorder) ManifestStore() *MockCliManifestStoreCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestStore", reflect.TypeOf((*MockCli)(nil).ManifestStore))
return &CliManifestStoreCall{Call: call}
return &MockCliManifestStoreCall{Call: call}
}
// CliManifestStoreCall wrap *gomock.Call
type CliManifestStoreCall struct {
// MockCliManifestStoreCall wrap *gomock.Call
type MockCliManifestStoreCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliManifestStoreCall) Return(arg0 store0.Store) *CliManifestStoreCall {
func (c *MockCliManifestStoreCall) Return(arg0 store0.Store) *MockCliManifestStoreCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliManifestStoreCall) Do(f func() store0.Store) *CliManifestStoreCall {
func (c *MockCliManifestStoreCall) Do(f func() store0.Store) *MockCliManifestStoreCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliManifestStoreCall) DoAndReturn(f func() store0.Store) *CliManifestStoreCall {
func (c *MockCliManifestStoreCall) DoAndReturn(f func() store0.Store) *MockCliManifestStoreCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// MeterProvider mocks base method.
func (m *MockCli) MeterProvider() metric.MeterProvider {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "MeterProvider")
ret0, _ := ret[0].(metric.MeterProvider)
return ret0
}
// MeterProvider indicates an expected call of MeterProvider.
func (mr *MockCliMockRecorder) MeterProvider() *MockCliMeterProviderCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "MeterProvider", reflect.TypeOf((*MockCli)(nil).MeterProvider))
return &MockCliMeterProviderCall{Call: call}
}
// MockCliMeterProviderCall wrap *gomock.Call
type MockCliMeterProviderCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockCliMeterProviderCall) Return(arg0 metric.MeterProvider) *MockCliMeterProviderCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockCliMeterProviderCall) Do(f func() metric.MeterProvider) *MockCliMeterProviderCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockCliMeterProviderCall) DoAndReturn(f func() metric.MeterProvider) *MockCliMeterProviderCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -557,31 +599,31 @@ func (m *MockCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []st
}
// NotaryClient indicates an expected call of NotaryClient.
func (mr *MockCliMockRecorder) NotaryClient(imgRefAndAuth, actions any) *CliNotaryClientCall {
func (mr *MockCliMockRecorder) NotaryClient(imgRefAndAuth, actions any) *MockCliNotaryClientCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotaryClient", reflect.TypeOf((*MockCli)(nil).NotaryClient), imgRefAndAuth, actions)
return &CliNotaryClientCall{Call: call}
return &MockCliNotaryClientCall{Call: call}
}
// CliNotaryClientCall wrap *gomock.Call
type CliNotaryClientCall struct {
// MockCliNotaryClientCall wrap *gomock.Call
type MockCliNotaryClientCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliNotaryClientCall) Return(arg0 client1.Repository, arg1 error) *CliNotaryClientCall {
func (c *MockCliNotaryClientCall) Return(arg0 client1.Repository, arg1 error) *MockCliNotaryClientCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliNotaryClientCall) Do(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *CliNotaryClientCall {
func (c *MockCliNotaryClientCall) Do(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *MockCliNotaryClientCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliNotaryClientCall) DoAndReturn(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *CliNotaryClientCall {
func (c *MockCliNotaryClientCall) DoAndReturn(f func(trust.ImageRefAndAuth, []string) (client1.Repository, error)) *MockCliNotaryClientCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -595,31 +637,31 @@ func (m *MockCli) Out() *streams.Out {
}
// Out indicates an expected call of Out.
func (mr *MockCliMockRecorder) Out() *CliOutCall {
func (mr *MockCliMockRecorder) Out() *MockCliOutCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Out", reflect.TypeOf((*MockCli)(nil).Out))
return &CliOutCall{Call: call}
return &MockCliOutCall{Call: call}
}
// CliOutCall wrap *gomock.Call
type CliOutCall struct {
// MockCliOutCall wrap *gomock.Call
type MockCliOutCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliOutCall) Return(arg0 *streams.Out) *CliOutCall {
func (c *MockCliOutCall) Return(arg0 *streams.Out) *MockCliOutCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliOutCall) Do(f func() *streams.Out) *CliOutCall {
func (c *MockCliOutCall) Do(f func() *streams.Out) *MockCliOutCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliOutCall) DoAndReturn(f func() *streams.Out) *CliOutCall {
func (c *MockCliOutCall) DoAndReturn(f func() *streams.Out) *MockCliOutCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -633,31 +675,69 @@ func (m *MockCli) RegistryClient(arg0 bool) client.RegistryClient {
}
// RegistryClient indicates an expected call of RegistryClient.
func (mr *MockCliMockRecorder) RegistryClient(arg0 any) *CliRegistryClientCall {
func (mr *MockCliMockRecorder) RegistryClient(arg0 any) *MockCliRegistryClientCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RegistryClient", reflect.TypeOf((*MockCli)(nil).RegistryClient), arg0)
return &CliRegistryClientCall{Call: call}
return &MockCliRegistryClientCall{Call: call}
}
// CliRegistryClientCall wrap *gomock.Call
type CliRegistryClientCall struct {
// MockCliRegistryClientCall wrap *gomock.Call
type MockCliRegistryClientCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliRegistryClientCall) Return(arg0 client.RegistryClient) *CliRegistryClientCall {
func (c *MockCliRegistryClientCall) Return(arg0 client.RegistryClient) *MockCliRegistryClientCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliRegistryClientCall) Do(f func(bool) client.RegistryClient) *CliRegistryClientCall {
func (c *MockCliRegistryClientCall) Do(f func(bool) client.RegistryClient) *MockCliRegistryClientCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliRegistryClientCall) DoAndReturn(f func(bool) client.RegistryClient) *CliRegistryClientCall {
func (c *MockCliRegistryClientCall) DoAndReturn(f func(bool) client.RegistryClient) *MockCliRegistryClientCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// Resource mocks base method.
func (m *MockCli) Resource() *resource.Resource {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Resource")
ret0, _ := ret[0].(*resource.Resource)
return ret0
}
// Resource indicates an expected call of Resource.
func (mr *MockCliMockRecorder) Resource() *MockCliResourceCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Resource", reflect.TypeOf((*MockCli)(nil).Resource))
return &MockCliResourceCall{Call: call}
}
// MockCliResourceCall wrap *gomock.Call
type MockCliResourceCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockCliResourceCall) Return(arg0 *resource.Resource) *MockCliResourceCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockCliResourceCall) Do(f func() *resource.Resource) *MockCliResourceCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockCliResourceCall) DoAndReturn(f func() *resource.Resource) *MockCliResourceCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -671,31 +751,31 @@ func (m *MockCli) ServerInfo() command.ServerInfo {
}
// ServerInfo indicates an expected call of ServerInfo.
func (mr *MockCliMockRecorder) ServerInfo() *CliServerInfoCall {
func (mr *MockCliMockRecorder) ServerInfo() *MockCliServerInfoCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ServerInfo", reflect.TypeOf((*MockCli)(nil).ServerInfo))
return &CliServerInfoCall{Call: call}
return &MockCliServerInfoCall{Call: call}
}
// CliServerInfoCall wrap *gomock.Call
type CliServerInfoCall struct {
// MockCliServerInfoCall wrap *gomock.Call
type MockCliServerInfoCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliServerInfoCall) Return(arg0 command.ServerInfo) *CliServerInfoCall {
func (c *MockCliServerInfoCall) Return(arg0 command.ServerInfo) *MockCliServerInfoCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliServerInfoCall) Do(f func() command.ServerInfo) *CliServerInfoCall {
func (c *MockCliServerInfoCall) Do(f func() command.ServerInfo) *MockCliServerInfoCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliServerInfoCall) DoAndReturn(f func() command.ServerInfo) *CliServerInfoCall {
func (c *MockCliServerInfoCall) DoAndReturn(f func() command.ServerInfo) *MockCliServerInfoCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -707,31 +787,69 @@ func (m *MockCli) SetIn(in *streams.In) {
}
// SetIn indicates an expected call of SetIn.
func (mr *MockCliMockRecorder) SetIn(in any) *CliSetInCall {
func (mr *MockCliMockRecorder) SetIn(in any) *MockCliSetInCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetIn", reflect.TypeOf((*MockCli)(nil).SetIn), in)
return &CliSetInCall{Call: call}
return &MockCliSetInCall{Call: call}
}
// CliSetInCall wrap *gomock.Call
type CliSetInCall struct {
// MockCliSetInCall wrap *gomock.Call
type MockCliSetInCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *CliSetInCall) Return() *CliSetInCall {
func (c *MockCliSetInCall) Return() *MockCliSetInCall {
c.Call = c.Call.Return()
return c
}
// Do rewrite *gomock.Call.Do
func (c *CliSetInCall) Do(f func(*streams.In)) *CliSetInCall {
func (c *MockCliSetInCall) Do(f func(*streams.In)) *MockCliSetInCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *CliSetInCall) DoAndReturn(f func(*streams.In)) *CliSetInCall {
func (c *MockCliSetInCall) DoAndReturn(f func(*streams.In)) *MockCliSetInCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// TracerProvider mocks base method.
func (m *MockCli) TracerProvider() trace.TracerProvider {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TracerProvider")
ret0, _ := ret[0].(trace.TracerProvider)
return ret0
}
// TracerProvider indicates an expected call of TracerProvider.
func (mr *MockCliMockRecorder) TracerProvider() *MockCliTracerProviderCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TracerProvider", reflect.TypeOf((*MockCli)(nil).TracerProvider))
return &MockCliTracerProviderCall{Call: call}
}
// MockCliTracerProviderCall wrap *gomock.Call
type MockCliTracerProviderCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockCliTracerProviderCall) Return(arg0 trace.TracerProvider) *MockCliTracerProviderCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockCliTracerProviderCall) Do(f func() trace.TracerProvider) *MockCliTracerProviderCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockCliTracerProviderCall) DoAndReturn(f func() trace.TracerProvider) *MockCliTracerProviderCall {
c.Call = c.Call.DoAndReturn(f)
return c
}

View File

@@ -5,6 +5,7 @@
//
// mockgen -typed -package internal -source client.go -destination mockclient_test.go --self_package github.com/pulumi/pulumi-docker-build/provider/internal
//
// Package internal is a generated GoMock package.
package internal
@@ -23,6 +24,7 @@ import (
type MockClient struct {
ctrl *gomock.Controller
recorder *MockClientMockRecorder
isgomock struct{}
}
// MockClientMockRecorder is the mock recorder for MockClient.
@@ -52,31 +54,31 @@ func (m *MockClient) Build(ctx context.Context, b Build) (*client.SolveResponse,
}
// Build indicates an expected call of Build.
func (mr *MockClientMockRecorder) Build(ctx, b any) *ClientBuildCall {
func (mr *MockClientMockRecorder) Build(ctx, b any) *MockClientBuildCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Build", reflect.TypeOf((*MockClient)(nil).Build), ctx, b)
return &ClientBuildCall{Call: call}
return &MockClientBuildCall{Call: call}
}
// ClientBuildCall wrap *gomock.Call
type ClientBuildCall struct {
// MockClientBuildCall wrap *gomock.Call
type MockClientBuildCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientBuildCall) Return(arg0 *client.SolveResponse, arg1 error) *ClientBuildCall {
func (c *MockClientBuildCall) Return(arg0 *client.SolveResponse, arg1 error) *MockClientBuildCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientBuildCall) Do(f func(context.Context, Build) (*client.SolveResponse, error)) *ClientBuildCall {
func (c *MockClientBuildCall) Do(f func(context.Context, Build) (*client.SolveResponse, error)) *MockClientBuildCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientBuildCall) DoAndReturn(f func(context.Context, Build) (*client.SolveResponse, error)) *ClientBuildCall {
func (c *MockClientBuildCall) DoAndReturn(f func(context.Context, Build) (*client.SolveResponse, error)) *MockClientBuildCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -91,31 +93,31 @@ func (m *MockClient) BuildKitEnabled() (bool, error) {
}
// BuildKitEnabled indicates an expected call of BuildKitEnabled.
func (mr *MockClientMockRecorder) BuildKitEnabled() *ClientBuildKitEnabledCall {
func (mr *MockClientMockRecorder) BuildKitEnabled() *MockClientBuildKitEnabledCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildKitEnabled", reflect.TypeOf((*MockClient)(nil).BuildKitEnabled))
return &ClientBuildKitEnabledCall{Call: call}
return &MockClientBuildKitEnabledCall{Call: call}
}
// ClientBuildKitEnabledCall wrap *gomock.Call
type ClientBuildKitEnabledCall struct {
// MockClientBuildKitEnabledCall wrap *gomock.Call
type MockClientBuildKitEnabledCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientBuildKitEnabledCall) Return(arg0 bool, arg1 error) *ClientBuildKitEnabledCall {
func (c *MockClientBuildKitEnabledCall) Return(arg0 bool, arg1 error) *MockClientBuildKitEnabledCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientBuildKitEnabledCall) Do(f func() (bool, error)) *ClientBuildKitEnabledCall {
func (c *MockClientBuildKitEnabledCall) Do(f func() (bool, error)) *MockClientBuildKitEnabledCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *ClientBuildKitEnabledCall {
func (c *MockClientBuildKitEnabledCall) DoAndReturn(f func() (bool, error)) *MockClientBuildKitEnabledCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -129,31 +131,31 @@ func (m *MockClient) Delete(ctx context.Context, id string) error {
}
// Delete indicates an expected call of Delete.
func (mr *MockClientMockRecorder) Delete(ctx, id any) *ClientDeleteCall {
func (mr *MockClientMockRecorder) Delete(ctx, id any) *MockClientDeleteCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockClient)(nil).Delete), ctx, id)
return &ClientDeleteCall{Call: call}
return &MockClientDeleteCall{Call: call}
}
// ClientDeleteCall wrap *gomock.Call
type ClientDeleteCall struct {
// MockClientDeleteCall wrap *gomock.Call
type MockClientDeleteCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientDeleteCall) Return(arg0 error) *ClientDeleteCall {
func (c *MockClientDeleteCall) Return(arg0 error) *MockClientDeleteCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientDeleteCall) Do(f func(context.Context, string) error) *ClientDeleteCall {
func (c *MockClientDeleteCall) Do(f func(context.Context, string) error) *MockClientDeleteCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientDeleteCall) DoAndReturn(f func(context.Context, string) error) *ClientDeleteCall {
func (c *MockClientDeleteCall) DoAndReturn(f func(context.Context, string) error) *MockClientDeleteCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -168,31 +170,31 @@ func (m *MockClient) Inspect(ctx context.Context, id string) ([]descriptor.Descr
}
// Inspect indicates an expected call of Inspect.
func (mr *MockClientMockRecorder) Inspect(ctx, id any) *ClientInspectCall {
func (mr *MockClientMockRecorder) Inspect(ctx, id any) *MockClientInspectCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inspect", reflect.TypeOf((*MockClient)(nil).Inspect), ctx, id)
return &ClientInspectCall{Call: call}
return &MockClientInspectCall{Call: call}
}
// ClientInspectCall wrap *gomock.Call
type ClientInspectCall struct {
// MockClientInspectCall wrap *gomock.Call
type MockClientInspectCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientInspectCall) Return(arg0 []descriptor.Descriptor, arg1 error) *ClientInspectCall {
func (c *MockClientInspectCall) Return(arg0 []descriptor.Descriptor, arg1 error) *MockClientInspectCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientInspectCall) Do(f func(context.Context, string) ([]descriptor.Descriptor, error)) *ClientInspectCall {
func (c *MockClientInspectCall) Do(f func(context.Context, string) ([]descriptor.Descriptor, error)) *MockClientInspectCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientInspectCall) DoAndReturn(f func(context.Context, string) ([]descriptor.Descriptor, error)) *ClientInspectCall {
func (c *MockClientInspectCall) DoAndReturn(f func(context.Context, string) ([]descriptor.Descriptor, error)) *MockClientInspectCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -210,32 +212,32 @@ func (m *MockClient) ManifestCreate(ctx context.Context, push bool, target strin
}
// ManifestCreate indicates an expected call of ManifestCreate.
func (mr *MockClientMockRecorder) ManifestCreate(ctx, push, target any, refs ...any) *ClientManifestCreateCall {
func (mr *MockClientMockRecorder) ManifestCreate(ctx, push, target any, refs ...any) *MockClientManifestCreateCall {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx, push, target}, refs...)
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestCreate", reflect.TypeOf((*MockClient)(nil).ManifestCreate), varargs...)
return &ClientManifestCreateCall{Call: call}
return &MockClientManifestCreateCall{Call: call}
}
// ClientManifestCreateCall wrap *gomock.Call
type ClientManifestCreateCall struct {
// MockClientManifestCreateCall wrap *gomock.Call
type MockClientManifestCreateCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientManifestCreateCall) Return(arg0 error) *ClientManifestCreateCall {
func (c *MockClientManifestCreateCall) Return(arg0 error) *MockClientManifestCreateCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientManifestCreateCall) Do(f func(context.Context, bool, string, ...string) error) *ClientManifestCreateCall {
func (c *MockClientManifestCreateCall) Do(f func(context.Context, bool, string, ...string) error) *MockClientManifestCreateCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientManifestCreateCall) DoAndReturn(f func(context.Context, bool, string, ...string) error) *ClientManifestCreateCall {
func (c *MockClientManifestCreateCall) DoAndReturn(f func(context.Context, bool, string, ...string) error) *MockClientManifestCreateCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -249,31 +251,31 @@ func (m *MockClient) ManifestDelete(ctx context.Context, target string) error {
}
// ManifestDelete indicates an expected call of ManifestDelete.
func (mr *MockClientMockRecorder) ManifestDelete(ctx, target any) *ClientManifestDeleteCall {
func (mr *MockClientMockRecorder) ManifestDelete(ctx, target any) *MockClientManifestDeleteCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestDelete", reflect.TypeOf((*MockClient)(nil).ManifestDelete), ctx, target)
return &ClientManifestDeleteCall{Call: call}
return &MockClientManifestDeleteCall{Call: call}
}
// ClientManifestDeleteCall wrap *gomock.Call
type ClientManifestDeleteCall struct {
// MockClientManifestDeleteCall wrap *gomock.Call
type MockClientManifestDeleteCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientManifestDeleteCall) Return(arg0 error) *ClientManifestDeleteCall {
func (c *MockClientManifestDeleteCall) Return(arg0 error) *MockClientManifestDeleteCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientManifestDeleteCall) Do(f func(context.Context, string) error) *ClientManifestDeleteCall {
func (c *MockClientManifestDeleteCall) Do(f func(context.Context, string) error) *MockClientManifestDeleteCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientManifestDeleteCall) DoAndReturn(f func(context.Context, string) error) *ClientManifestDeleteCall {
func (c *MockClientManifestDeleteCall) DoAndReturn(f func(context.Context, string) error) *MockClientManifestDeleteCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -288,31 +290,69 @@ func (m *MockClient) ManifestInspect(ctx context.Context, target string) (string
}
// ManifestInspect indicates an expected call of ManifestInspect.
func (mr *MockClientMockRecorder) ManifestInspect(ctx, target any) *ClientManifestInspectCall {
func (mr *MockClientMockRecorder) ManifestInspect(ctx, target any) *MockClientManifestInspectCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ManifestInspect", reflect.TypeOf((*MockClient)(nil).ManifestInspect), ctx, target)
return &ClientManifestInspectCall{Call: call}
return &MockClientManifestInspectCall{Call: call}
}
// ClientManifestInspectCall wrap *gomock.Call
type ClientManifestInspectCall struct {
// MockClientManifestInspectCall wrap *gomock.Call
type MockClientManifestInspectCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *ClientManifestInspectCall) Return(arg0 string, arg1 error) *ClientManifestInspectCall {
func (c *MockClientManifestInspectCall) Return(arg0 string, arg1 error) *MockClientManifestInspectCall {
c.Call = c.Call.Return(arg0, arg1)
return c
}
// Do rewrite *gomock.Call.Do
func (c *ClientManifestInspectCall) Do(f func(context.Context, string) (string, error)) *ClientManifestInspectCall {
func (c *MockClientManifestInspectCall) Do(f func(context.Context, string) (string, error)) *MockClientManifestInspectCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *ClientManifestInspectCall) DoAndReturn(f func(context.Context, string) (string, error)) *ClientManifestInspectCall {
func (c *MockClientManifestInspectCall) DoAndReturn(f func(context.Context, string) (string, error)) *MockClientManifestInspectCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
// SupportsMultipleExports mocks base method.
func (m *MockClient) SupportsMultipleExports() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SupportsMultipleExports")
ret0, _ := ret[0].(bool)
return ret0
}
// SupportsMultipleExports indicates an expected call of SupportsMultipleExports.
func (mr *MockClientMockRecorder) SupportsMultipleExports() *MockClientSupportsMultipleExportsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SupportsMultipleExports", reflect.TypeOf((*MockClient)(nil).SupportsMultipleExports))
return &MockClientSupportsMultipleExportsCall{Call: call}
}
// MockClientSupportsMultipleExportsCall wrap *gomock.Call
type MockClientSupportsMultipleExportsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *MockClientSupportsMultipleExportsCall) Return(arg0 bool) *MockClientSupportsMultipleExportsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *MockClientSupportsMultipleExportsCall) Do(f func() bool) *MockClientSupportsMultipleExportsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *MockClientSupportsMultipleExportsCall) DoAndReturn(f func() bool) *MockClientSupportsMultipleExportsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -321,6 +361,7 @@ func (c *ClientManifestInspectCall) DoAndReturn(f func(context.Context, string)
type MockBuild struct {
ctrl *gomock.Controller
recorder *MockBuildMockRecorder
isgomock struct{}
}
// MockBuildMockRecorder is the mock recorder for MockBuild.
@@ -349,31 +390,31 @@ func (m *MockBuild) BuildOptions() pb.BuildOptions {
}
// BuildOptions indicates an expected call of BuildOptions.
func (mr *MockBuildMockRecorder) BuildOptions() *BuildBuildOptionsCall {
func (mr *MockBuildMockRecorder) BuildOptions() *MockBuildBuildOptionsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "BuildOptions", reflect.TypeOf((*MockBuild)(nil).BuildOptions))
return &BuildBuildOptionsCall{Call: call}
return &MockBuildBuildOptionsCall{Call: call}
}
// BuildBuildOptionsCall wrap *gomock.Call
type BuildBuildOptionsCall struct {
// MockBuildBuildOptionsCall wrap *gomock.Call
type MockBuildBuildOptionsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BuildBuildOptionsCall) Return(arg0 pb.BuildOptions) *BuildBuildOptionsCall {
func (c *MockBuildBuildOptionsCall) Return(arg0 pb.BuildOptions) *MockBuildBuildOptionsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BuildBuildOptionsCall) Do(f func() pb.BuildOptions) *BuildBuildOptionsCall {
func (c *MockBuildBuildOptionsCall) Do(f func() pb.BuildOptions) *MockBuildBuildOptionsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BuildBuildOptionsCall) DoAndReturn(f func() pb.BuildOptions) *BuildBuildOptionsCall {
func (c *MockBuildBuildOptionsCall) DoAndReturn(f func() pb.BuildOptions) *MockBuildBuildOptionsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -387,31 +428,31 @@ func (m *MockBuild) Inline() string {
}
// Inline indicates an expected call of Inline.
func (mr *MockBuildMockRecorder) Inline() *BuildInlineCall {
func (mr *MockBuildMockRecorder) Inline() *MockBuildInlineCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Inline", reflect.TypeOf((*MockBuild)(nil).Inline))
return &BuildInlineCall{Call: call}
return &MockBuildInlineCall{Call: call}
}
// BuildInlineCall wrap *gomock.Call
type BuildInlineCall struct {
// MockBuildInlineCall wrap *gomock.Call
type MockBuildInlineCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BuildInlineCall) Return(arg0 string) *BuildInlineCall {
func (c *MockBuildInlineCall) Return(arg0 string) *MockBuildInlineCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BuildInlineCall) Do(f func() string) *BuildInlineCall {
func (c *MockBuildInlineCall) Do(f func() string) *MockBuildInlineCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BuildInlineCall) DoAndReturn(f func() string) *BuildInlineCall {
func (c *MockBuildInlineCall) DoAndReturn(f func() string) *MockBuildInlineCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -425,31 +466,31 @@ func (m *MockBuild) Secrets() session.Attachable {
}
// Secrets indicates an expected call of Secrets.
func (mr *MockBuildMockRecorder) Secrets() *BuildSecretsCall {
func (mr *MockBuildMockRecorder) Secrets() *MockBuildSecretsCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Secrets", reflect.TypeOf((*MockBuild)(nil).Secrets))
return &BuildSecretsCall{Call: call}
return &MockBuildSecretsCall{Call: call}
}
// BuildSecretsCall wrap *gomock.Call
type BuildSecretsCall struct {
// MockBuildSecretsCall wrap *gomock.Call
type MockBuildSecretsCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BuildSecretsCall) Return(arg0 session.Attachable) *BuildSecretsCall {
func (c *MockBuildSecretsCall) Return(arg0 session.Attachable) *MockBuildSecretsCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BuildSecretsCall) Do(f func() session.Attachable) *BuildSecretsCall {
func (c *MockBuildSecretsCall) Do(f func() session.Attachable) *MockBuildSecretsCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BuildSecretsCall) DoAndReturn(f func() session.Attachable) *BuildSecretsCall {
func (c *MockBuildSecretsCall) DoAndReturn(f func() session.Attachable) *MockBuildSecretsCall {
c.Call = c.Call.DoAndReturn(f)
return c
}
@@ -463,31 +504,31 @@ func (m *MockBuild) ShouldExec() bool {
}
// ShouldExec indicates an expected call of ShouldExec.
func (mr *MockBuildMockRecorder) ShouldExec() *BuildShouldExecCall {
func (mr *MockBuildMockRecorder) ShouldExec() *MockBuildShouldExecCall {
mr.mock.ctrl.T.Helper()
call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ShouldExec", reflect.TypeOf((*MockBuild)(nil).ShouldExec))
return &BuildShouldExecCall{Call: call}
return &MockBuildShouldExecCall{Call: call}
}
// BuildShouldExecCall wrap *gomock.Call
type BuildShouldExecCall struct {
// MockBuildShouldExecCall wrap *gomock.Call
type MockBuildShouldExecCall struct {
*gomock.Call
}
// Return rewrite *gomock.Call.Return
func (c *BuildShouldExecCall) Return(arg0 bool) *BuildShouldExecCall {
func (c *MockBuildShouldExecCall) Return(arg0 bool) *MockBuildShouldExecCall {
c.Call = c.Call.Return(arg0)
return c
}
// Do rewrite *gomock.Call.Do
func (c *BuildShouldExecCall) Do(f func() bool) *BuildShouldExecCall {
func (c *MockBuildShouldExecCall) Do(f func() bool) *MockBuildShouldExecCall {
c.Call = c.Call.Do(f)
return c
}
// DoAndReturn rewrite *gomock.Call.DoAndReturn
func (c *BuildShouldExecCall) DoAndReturn(f func() bool) *BuildShouldExecCall {
func (c *MockBuildShouldExecCall) DoAndReturn(f func() bool) *MockBuildShouldExecCall {
c.Call = c.Call.DoAndReturn(f)
return c
}

View File

@@ -55,8 +55,8 @@ func (c *Config) Annotate(a infer.Annotator) {
}
// Configure validates and processes user-provided configuration values.
func (c *Config) Configure(_ context.Context) error {
h, err := newHost(c)
func (c *Config) Configure(ctx context.Context) error {
h, err := newHost(ctx, c)
if err != nil {
return fmt.Errorf("getting host: %w", err)
}

View File

@@ -852,7 +852,7 @@ class Image(pulumi.CustomResource):
context={
"location": "app",
"named": {
"golang_latest": {
"golang:latest": {
"location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
},
},
@@ -1290,7 +1290,7 @@ class Image(pulumi.CustomResource):
context={
"location": "app",
"named": {
"golang_latest": {
"golang:latest": {
"location": "docker-image://golang@sha256:b8e62cf593cdaff36efd90aa3a37de268e6781a2e68c6610940c48f7cdf36984",
},
},