status
stringclasses 1
value | repo_name
stringclasses 31
values | repo_url
stringclasses 31
values | issue_id
int64 1
104k
| title
stringlengths 4
233
| body
stringlengths 0
186k
⌀ | issue_url
stringlengths 38
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[us, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 7
188
| chunk_content
stringlengths 1
1.03M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | c, ctx := connect(t)
t.Run("simple directory", func(t *testing.T) {
tmp := t.TempDir()
err := os.WriteFile(filepath.Join(tmp, "message.txt"), []byte("hello world"), 0o600)
require.NoError(t, err)
dir := c.Host().Directory(tmp)
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithDirectory(name, dir, dagger.ContainerWithDirectoryOpts{
Owner: owner,
})
})
})
t.Run("subdirectory", func(t *testing.T) {
tmp := t.TempDir()
err := os.Mkdir(filepath.Join(tmp, "subdir"), 0o755)
require.NoError(t, err)
err = os.WriteFile(filepath.Join(tmp, "subdir", "message.txt"), []byte("hello world"), 0o600)
require.NoError(t, err)
dir := c.Host().Directory(tmp).Directory("subdir")
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithDirectory(name, dir, dagger.ContainerWithDirectoryOpts{
Owner: owner,
})
})
})
}
func TestContainerWithNewFileOwner(t *testing.T) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | c, ctx := connect(t)
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithNewFile(name, dagger.ContainerWithNewFileOpts{
Owner: owner,
})
})
}
func TestContainerWithMountedCacheOwner(t *testing.T) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | c, ctx := connect(t)
cache := c.CacheVolume("test")
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithMountedCache(name, cache, dagger.ContainerWithMountedCacheOpts{
Owner: owner,
})
})
t.Run("permissions (empty)", func(t *testing.T) {
ctr := c.Container().From(alpineImage).
WithExec([]string{"adduser", "-D", "inherituser"}).
WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}).
WithExec([]string{"addgroup", "-g", "4321", "agroup"}).
WithUser("inherituser").
WithMountedCache("/data", cache, dagger.ContainerWithMountedCacheOpts{
Owner: "auser:agroup",
})
out, err := ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data"}).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "755:auser:agroup\n", out)
})
t.Run("permissions (source)", func(t *testing.T) {
dir := c.Directory().
WithNewDirectory("perms", dagger.DirectoryWithNewDirectoryOpts{
Permissions: 0o745,
}).
WithNewFile("perms/foo", "whee", dagger.DirectoryWithNewFileOpts{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | Permissions: 0o645,
}).
Directory("perms")
ctr := c.Container().From(alpineImage).
WithExec([]string{"adduser", "-D", "inherituser"}).
WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}).
WithExec([]string{"addgroup", "-g", "4321", "agroup"}).
WithUser("inherituser").
WithMountedCache("/data", cache, dagger.ContainerWithMountedCacheOpts{
Source: dir,
Owner: "auser:agroup",
})
out, err := ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data"}).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "745:auser:agroup\n", out)
out, err = ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data/foo"}).Stdout(ctx)
require.NoError(t, err)
require.Equal(t, "645:auser:agroup\n", out)
})
}
func TestContainerWithMountedSecretOwner(t *testing.T) {
c, ctx := connect(t)
secret := c.SetSecret("test", "hunter2")
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithMountedSecret(name, secret, dagger.ContainerWithMountedSecretOpts{
Owner: owner,
})
})
}
func TestContainerWithUnixSocketOwner(t *testing.T) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | c, ctx := connect(t)
tmp := t.TempDir()
sock := filepath.Join(tmp, "test.sock")
l, err := net.Listen("unix", sock)
require.NoError(t, err)
defer l.Close()
socket := c.Host().UnixSocket(sock)
testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container {
return ctr.WithUnixSocket(name, socket, dagger.ContainerWithUnixSocketOpts{
Owner: owner,
})
})
}
func testOwnership(
ctx context.Context,
t *testing.T,
c *dagger.Client,
addContent func(ctr *dagger.Container, name, owner string) *dagger.Container,
) {
t.Parallel()
ctr := c.Container().From(alpineImage).
WithExec([]string{"adduser", "-D", "inherituser"}).
WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}).
WithExec([]string{"addgroup", "-g", "4321", "agroup"}).
WithUser("inherituser").
WithWorkdir("/data")
type example struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | name string
owner string
output string
}
for _, example := range []example{
{name: "userid", owner: "1234", output: "auser auser"},
{name: "userid-twice", owner: "1234:1234", output: "auser auser"},
{name: "username", owner: "auser", output: "auser auser"},
{name: "username-twice", owner: "auser:auser", output: "auser auser"},
{name: "ids", owner: "1234:4321", output: "auser agroup"},
{name: "username-gid", owner: "auser:4321", output: "auser agroup"},
{name: "uid-groupname", owner: "1234:agroup", output: "auser agroup"},
{name: "names", owner: "auser:agroup", output: "auser agroup"}, |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | {name: "no-inherit", owner: "", output: "root root"},
} {
example := example
t.Run(example.name, func(t *testing.T) {
withOwner := addContent(ctr, example.name, example.owner)
output, err := withOwner.
WithUser("root").
WithExec([]string{
"sh", "-exc",
"find * | xargs stat -c '%U %G'",
}).
Stdout(ctx)
require.NoError(t, err)
for _, line := range strings.Split(output, "\n") {
if line == "" {
continue
}
require.Equal(t, example.output, line)
}
})
}
}
func TestContainerParallelMutation(t *testing.T) {
t.Parallel()
res := struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | Container struct {
A struct {
EnvVariable string
}
B string
}
}{}
err := testutil.Query(
`{
container {
a: withEnvVariable(name: "FOO", value: "BAR") {
envVariable(name: "FOO")
}
b: envVariable(name: "FOO")
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.A.EnvVariable, "BAR")
require.Empty(t, res.Container.B, "BAR")
}
func TestContainerForceCompression(t *testing.T) {
t.Parallel()
for _, tc := range []struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | compression dagger.ImageLayerCompression
expectedOCIMediaType string
}{
{
dagger.Gzip,
"application/vnd.oci.image.layer.v1.tar+gzip",
},
{
dagger.Zstd,
"application/vnd.oci.image.layer.v1.tar+zstd", |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | },
{
dagger.Uncompressed,
"application/vnd.oci.image.layer.v1.tar",
},
{
dagger.Estargz,
"application/vnd.oci.image.layer.v1.tar+gzip",
},
} {
tc := tc
t.Run(string(tc.compression), func(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
ref := registryRef("testcontainerpublishforcecompression" + strings.ToLower(string(tc.compression)))
_, err := c.Container().
From(alpineImage).
Publish(ctx, ref, dagger.ContainerPublishOpts{
ForcedCompression: tc.compression,
})
require.NoError(t, err)
parsedRef, err := name.ParseReference(ref, name.Insecure)
require.NoError(t, err)
imgDesc, err := remote.Get(parsedRef, remote.WithTransport(http.DefaultTransport))
require.NoError(t, err)
img, err := imgDesc.Image()
require.NoError(t, err)
layers, err := img.Layers()
require.NoError(t, err)
for _, layer := range layers { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | mediaType, err := layer.MediaType()
require.NoError(t, err)
require.EqualValues(t, tc.expectedOCIMediaType, mediaType)
}
tarPath := filepath.Join(t.TempDir(), "export.tar")
_, err = c.Container().
From(alpineImage).
Export(ctx, tarPath, dagger.ContainerExportOpts{
ForcedCompression: tc.compression,
})
require.NoError(t, err)
dockerManifestBytes := readTarFile(t, tarPath, "manifest.json")
require.NotNil(t, dockerManifestBytes)
indexBytes := readTarFile(t, tarPath, "index.json")
var index ocispecs.Index
require.NoError(t, json.Unmarshal(indexBytes, &index))
manifestDigest := index.Manifests[0].Digest
manifestBytes := readTarFile(t, tarPath, "blobs/sha256/"+manifestDigest.Encoded())
var manifest ocispecs.Manifest
require.NoError(t, json.Unmarshal(manifestBytes, &manifest))
for _, layer := range manifest.Layers {
require.EqualValues(t, tc.expectedOCIMediaType, layer.MediaType)
}
})
}
}
func TestContainerMediaTypes(t *testing.T) {
t.Parallel()
for _, tc := range []struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | mediaTypes dagger.ImageMediaTypes
expectedOCIMediaType string
}{
{
"",
"application/vnd.oci.image.layer.v1.tar+gzip",
},
{
dagger.Ocimediatypes,
"application/vnd.oci.image.layer.v1.tar+gzip",
},
{
dagger.Dockermediatypes,
"application/vnd.docker.image.rootfs.diff.tar.gzip",
},
} {
tc := tc
t.Run(string(tc.mediaTypes), func(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
ref := registryRef("testcontainerpublishmediatypes" + strings.ToLower(string(tc.mediaTypes)))
_, err := c.Container().
From("alpine:3.16.2").
Publish(ctx, ref, dagger.ContainerPublishOpts{
MediaTypes: tc.mediaTypes,
})
require.NoError(t, err)
parsedRef, err := name.ParseReference(ref, name.Insecure)
require.NoError(t, err) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | imgDesc, err := remote.Get(parsedRef, remote.WithTransport(http.DefaultTransport))
require.NoError(t, err)
img, err := imgDesc.Image()
require.NoError(t, err)
layers, err := img.Layers()
require.NoError(t, err)
for _, layer := range layers {
mediaType, err := layer.MediaType()
require.NoError(t, err)
require.EqualValues(t, tc.expectedOCIMediaType, mediaType)
}
tarPath := filepath.Join(t.TempDir(), "export.tar")
_, err = c.Container().
From("alpine:3.16.2").
Export(ctx, tarPath, dagger.ContainerExportOpts{
MediaTypes: tc.mediaTypes,
})
require.NoError(t, err)
dockerManifestBytes := readTarFile(t, tarPath, "manifest.json")
require.NotNil(t, dockerManifestBytes)
indexBytes := readTarFile(t, tarPath, "index.json")
var index ocispecs.Index
require.NoError(t, json.Unmarshal(indexBytes, &index))
manifestDigest := index.Manifests[0].Digest
manifestBytes := readTarFile(t, tarPath, "blobs/sha256/"+manifestDigest.Encoded())
var manifest ocispecs.Manifest
require.NoError(t, json.Unmarshal(manifestBytes, &manifest))
for _, layer := range manifest.Layers {
require.EqualValues(t, tc.expectedOCIMediaType, layer.MediaType) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | }
})
}
}
func TestContainerBuildMergesWithParent(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
builderCtr := c.Directory().WithNewFile("Dockerfile",
`FROM `+alpineImage+`
ENV FOO=BAR
LABEL "com.example.test-should-replace"="foo"
EXPOSE 8080
`,
)
testCtr := c.Container().
WithEnvVariable("BOOL", "DOG").
WithEnvVariable("FOO", "BAZ").
WithLabel("com.example.test-should-exist", "test").
WithLabel("com.example.test-should-replace", "bar").
WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{
Description: "five thousand",
}).
Build(builderCtr)
envShouldExist, err := testCtr.EnvVariable(ctx, "BOOL")
require.NoError(t, err)
require.Equal(t, "DOG", envShouldExist)
envShouldBeReplaced, err := testCtr.EnvVariable(ctx, "FOO")
require.NoError(t, err) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | require.Equal(t, "BAR", envShouldBeReplaced)
labelShouldExist, err := testCtr.Label(ctx, "com.example.test-should-exist")
require.NoError(t, err)
require.Equal(t, "test", labelShouldExist)
labelShouldBeReplaced, err := testCtr.Label(ctx, "com.example.test-should-replace")
require.NoError(t, err)
require.Equal(t, "foo", labelShouldBeReplaced)
cid, err := testCtr.ID(ctx)
require.NoError(t, err)
res := struct {
Container struct {
ExposedPorts []core.ContainerPort
}
}{}
err = testutil.Query(`
query Test($id: ContainerID!) {
container(id: $id) {
exposedPorts {
port
protocol
description
}
}
}`,
&res,
&testutil.QueryOptions{
Variables: map[string]interface{}{
"id": cid, |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | },
},
)
require.NoError(t, err)
require.Len(t, res.Container.ExposedPorts, 2)
for _, p := range res.Container.ExposedPorts {
require.Equal(t, core.NetworkProtocolTCP, p.Protocol)
switch p.Port {
case 8080:
require.Nil(t, p.Description)
case 5000:
require.NotNil(t, p.Description)
require.Equal(t, "five thousand", *p.Description)
default:
t.Fatalf("unexpected port %d", p.Port)
}
}
}
func TestContainerFromMergesWithParent(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
testCtr := c.Container().
WithEnvVariable("FOO", "BAR").
WithEnvVariable("PATH", "/replace/me").
WithLabel("moby.buildkit.frontend.caps", "replace-me").
WithLabel("com.example.test-should-exist", "exist").
WithExposedPort(5000).
From("docker/dockerfile:1.5") |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | envShouldExist, err := testCtr.EnvVariable(ctx, "FOO")
require.NoError(t, err)
require.Equal(t, "BAR", envShouldExist)
envShouldBeReplaced, err := testCtr.EnvVariable(ctx, "PATH")
require.NoError(t, err)
require.Equal(t, "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", envShouldBeReplaced)
labelShouldExist, err := testCtr.Label(ctx, "com.example.test-should-exist")
require.NoError(t, err)
require.Equal(t, "exist", labelShouldExist)
existingLabelFromImageShouldExist, err := testCtr.Label(ctx, "moby.buildkit.frontend.network.none")
require.NoError(t, err)
require.Equal(t, "true", existingLabelFromImageShouldExist)
labelShouldBeReplaced, err := testCtr.Label(ctx, "moby.buildkit.frontend.caps")
require.NoError(t, err)
require.Equal(t, "moby.buildkit.frontend.inputs,moby.buildkit.frontend.subrequests,moby.buildkit.frontend.contexts", labelShouldBeReplaced)
ports, err := testCtr.ExposedPorts(ctx)
require.NoError(t, err)
port, err := ports[0].Port(ctx)
require.NoError(t, err)
require.Equal(t, 5000, port)
}
func TestContainerImageLoadCompatibility(t *testing.T) {
t.Parallel()
c, ctx := connect(t)
for i, dockerVersion := range []string{"20.10", "23.0", "24.0"} {
dockerVersion := dockerVersion
port := 2375 + i
dockerd := c.Container().From(fmt.Sprintf("docker:%s-dind", dockerVersion)).
WithMountedCache("/var/lib/docker", c.CacheVolume(t.Name()+"-"+dockerVersion+"-docker-lib"), dagger.ContainerWithMountedCacheOpts{
Sharing: dagger.Private, |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | }).
WithExposedPort(port).
WithExec([]string{
"dockerd",
"--host=tcp:0.0.0.0:" + strconv.Itoa(port),
"--tls=false",
}, dagger.ContainerWithExecOpts{
InsecureRootCapabilities: true,
})
dockerHost, err := dockerd.Endpoint(ctx, dagger.ContainerEndpointOpts{
Scheme: "tcp",
})
require.NoError(t, err)
for _, mediaType := range []dagger.ImageMediaTypes{dagger.Ocimediatypes, dagger.Dockermediatypes} {
mediaType := mediaType
for _, compression := range []dagger.ImageLayerCompression{dagger.Gzip, dagger.Zstd, dagger.Uncompressed} {
compression := compression
t.Run(fmt.Sprintf("%s-%s-%s-%s", t.Name(), dockerVersion, mediaType, compression), func(t *testing.T) {
t.Parallel()
tmpdir := t.TempDir()
tmpfile := filepath.Join(tmpdir, fmt.Sprintf("test-%s-%s-%s.tar", dockerVersion, mediaType, compression))
_, err := c.Container().From(alpineImage).
WithExec([]string{"sh", "-c", "echo '" + string(compression) + string(mediaType) + "' > /foo"}).
Export(ctx, tmpfile, dagger.ContainerExportOpts{
MediaTypes: mediaType,
ForcedCompression: compression,
})
require.NoError(t, err)
randID := identity.NewID() |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/integration/container_test.go | ctr := c.Container().From(fmt.Sprintf("docker:%s-cli", dockerVersion)).
WithEnvVariable("CACHEBUST", randID).
WithServiceBinding("docker", dockerd).
WithEnvVariable("DOCKER_HOST", dockerHost).
WithMountedFile(path.Join("/", path.Base(tmpfile)), c.Host().File(tmpfile)).
WithExec([]string{"docker", "load", "-i", "/" + path.Base(tmpfile)})
output, err := ctr.Stdout(ctx)
if dockerVersion == "20.10" && compression == dagger.Zstd {
require.Error(t, err)
} else {
require.NoError(t, err)
_, imageID, ok := strings.Cut(output, "sha256:")
require.True(t, ok)
imageID = strings.TrimSpace(imageID)
_, err = ctr.WithExec([]string{"docker", "run", "--rm", imageID, "echo", "hello"}).Sync(ctx)
require.NoError(t, err)
}
_, err = c.Container().
Import(c.Host().File(tmpfile)).
WithExec([]string{"echo", "hello"}).
Sync(ctx)
require.NoError(t, err)
})
}
}
}
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | package schema
import (
"fmt"
"os"
"path"
"strconv"
"strings"
"github.com/containerd/containerd/content"
specs "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/dagger/dagger/core"
"github.com/dagger/dagger/core/pipeline"
"github.com/dagger/dagger/core/socket"
"github.com/moby/buildkit/frontend/dockerfile/shell"
"github.com/moby/buildkit/util/leaseutil"
)
type containerSchema struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | *MergedSchemas
host *core.Host
ociStore content.Store
leaseManager *leaseutil.Manager
buildCache *core.CacheMap[uint64, *core.Container]
importCache *core.CacheMap[uint64, *specs.Descriptor]
}
var _ ExecutableSchema = &containerSchema{}
func (s *containerSchema) Name() string {
return "container"
}
func (s *containerSchema) Schema() string {
return Container
}
func (s *containerSchema) Resolvers() Resolvers {
return Resolvers{
"ContainerID": stringResolver(core.ContainerID("")),
"Query": ObjectResolver{
"container": ToResolver(s.container),
},
"Container": ObjectResolver{
"id": ToResolver(s.id),
"sync": ToResolver(s.sync),
"from": ToResolver(s.from), |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | "build": ToResolver(s.build),
"rootfs": ToResolver(s.rootfs),
"pipeline": ToResolver(s.pipeline),
"withRootfs": ToResolver(s.withRootfs),
"file": ToResolver(s.file),
"directory": ToResolver(s.directory),
"user": ToResolver(s.user),
"withUser": ToResolver(s.withUser),
"workdir": ToResolver(s.workdir),
"withWorkdir": ToResolver(s.withWorkdir),
"envVariables": ToResolver(s.envVariables),
"envVariable": ToResolver(s.envVariable),
"withEnvVariable": ToResolver(s.withEnvVariable),
"withSecretVariable": ToResolver(s.withSecretVariable),
"withoutEnvVariable": ToResolver(s.withoutEnvVariable),
"withLabel": ToResolver(s.withLabel),
"label": ToResolver(s.label),
"labels": ToResolver(s.labels),
"withoutLabel": ToResolver(s.withoutLabel),
"entrypoint": ToResolver(s.entrypoint),
"withEntrypoint": ToResolver(s.withEntrypoint),
"defaultArgs": ToResolver(s.defaultArgs),
"withDefaultArgs": ToResolver(s.withDefaultArgs),
"mounts": ToResolver(s.mounts),
"withMountedDirectory": ToResolver(s.withMountedDirectory),
"withMountedFile": ToResolver(s.withMountedFile),
"withMountedTemp": ToResolver(s.withMountedTemp),
"withMountedCache": ToResolver(s.withMountedCache),
"withMountedSecret": ToResolver(s.withMountedSecret),
"withUnixSocket": ToResolver(s.withUnixSocket), |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | "withoutUnixSocket": ToResolver(s.withoutUnixSocket),
"withoutMount": ToResolver(s.withoutMount),
"withFile": ToResolver(s.withFile),
"withNewFile": ToResolver(s.withNewFile),
"withDirectory": ToResolver(s.withDirectory),
"withExec": ToResolver(s.withExec),
"stdout": ToResolver(s.stdout),
"stderr": ToResolver(s.stderr),
"publish": ToResolver(s.publish),
"platform": ToResolver(s.platform),
"export": ToResolver(s.export),
"import": ToResolver(s.import_),
"withRegistryAuth": ToResolver(s.withRegistryAuth),
"withoutRegistryAuth": ToResolver(s.withoutRegistryAuth),
"imageRef": ToResolver(s.imageRef),
"withExposedPort": ToResolver(s.withExposedPort),
"withoutExposedPort": ToResolver(s.withoutExposedPort),
"exposedPorts": ToResolver(s.exposedPorts),
"hostname": ToResolver(s.hostname),
"endpoint": ToResolver(s.endpoint),
"withServiceBinding": ToResolver(s.withServiceBinding),
"withFocus": ToResolver(s.withFocus),
"withoutFocus": ToResolver(s.withoutFocus),
},
}
}
func (s *containerSchema) Dependencies() []ExecutableSchema {
return nil
}
type containerArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | ID core.ContainerID
Platform *specs.Platform
}
func (s *containerSchema) container(ctx *core.Context, parent *core.Query, args containerArgs) (*core.Container, error) {
platform := s.MergedSchemas.platform
if args.Platform != nil {
if args.ID != "" {
return nil, fmt.Errorf("cannot specify both existing container ID and platform")
}
platform = *args.Platform
}
ctr, err := core.NewContainer(args.ID, parent.PipelinePath(), platform)
if err != nil {
return nil, err
}
return ctr, err
}
func (s *containerSchema) sync(ctx *core.Context, parent *core.Container, _ any) (core.ContainerID, error) {
err := parent.Evaluate(ctx, s.bk)
if err != nil {
return "", err
}
return parent.ID()
}
func (s *containerSchema) id(ctx *core.Context, parent *core.Container, args any) (core.ContainerID, error) {
return parent.ID()
}
type containerFromArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Address string
}
func (s *containerSchema) from(ctx *core.Context, parent *core.Container, args containerFromArgs) (*core.Container, error) {
return parent.From(ctx, s.bk, args.Address)
}
type containerBuildArgs struct {
Context core.DirectoryID
Dockerfile string
BuildArgs []core.BuildArg
Target string
Secrets []core.SecretID
}
func (s *containerSchema) build(ctx *core.Context, parent *core.Container, args containerBuildArgs) (*core.Container, error) {
dir, err := args.Context.ToDirectory()
if err != nil {
return nil, err
}
return parent.Build(
ctx,
dir,
args.Dockerfile,
args.BuildArgs,
args.Target,
args.Secrets,
s.bk,
s.buildCache,
)
}
type containerWithRootFSArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Directory core.DirectoryID
}
func (s *containerSchema) withRootfs(ctx *core.Context, parent *core.Container, args containerWithRootFSArgs) (*core.Container, error) {
dir, err := args.Directory.ToDirectory()
if err != nil {
return nil, err
}
return parent.WithRootFS(ctx, dir)
}
type containerPipelineArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
Description string
Labels []pipeline.Label
}
func (s *containerSchema) pipeline(ctx *core.Context, parent *core.Container, args containerPipelineArgs) (*core.Container, error) {
return parent.WithPipeline(ctx, args.Name, args.Description, args.Labels)
}
func (s *containerSchema) rootfs(ctx *core.Context, parent *core.Container, args any) (*core.Directory, error) {
return parent.RootFS(ctx)
}
type containerExecArgs struct {
core.ContainerExecOpts
}
func (s *containerSchema) withExec(ctx *core.Context, parent *core.Container, args containerExecArgs) (*core.Container, error) {
return parent.WithExec(ctx, s.bk, s.progSockPath, s.MergedSchemas.platform, args.ContainerExecOpts)
}
func (s *containerSchema) withDefaultExec(ctx *core.Context, parent *core.Container) (*core.Container, error) {
if parent.Meta == nil {
return s.withExec(ctx, parent, containerExecArgs{})
}
return parent, nil
}
func (s *containerSchema) stdout(ctx *core.Context, parent *core.Container, args any) (string, error) {
return parent.MetaFileContents(ctx, s.bk, s.progSockPath, "stdout")
}
func (s *containerSchema) stderr(ctx *core.Context, parent *core.Container, args any) (string, error) {
return parent.MetaFileContents(ctx, s.bk, s.progSockPath, "stderr")
}
type containerWithEntrypointArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Args []string
}
func (s *containerSchema) withEntrypoint(ctx *core.Context, parent *core.Container, args containerWithEntrypointArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
cfg.Entrypoint = args.Args
return cfg
})
}
func (s *containerSchema) entrypoint(ctx *core.Context, parent *core.Container, args containerWithVariableArgs) ([]string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
return cfg.Entrypoint, nil
}
type containerWithDefaultArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Args *[]string
}
func (s *containerSchema) withDefaultArgs(ctx *core.Context, parent *core.Container, args containerWithDefaultArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
if args.Args == nil {
cfg.Cmd = []string{}
return cfg
}
cfg.Cmd = *args.Args
return cfg
})
}
func (s *containerSchema) defaultArgs(ctx *core.Context, parent *core.Container, args any) ([]string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
return cfg.Cmd, nil
}
type containerWithUserArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
}
func (s *containerSchema) withUser(ctx *core.Context, parent *core.Container, args containerWithUserArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
cfg.User = args.Name
return cfg
})
}
func (s *containerSchema) user(ctx *core.Context, parent *core.Container, args containerWithVariableArgs) (string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return "", err
}
return cfg.User, nil
}
type containerWithWorkdirArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Path string
}
func (s *containerSchema) withWorkdir(ctx *core.Context, parent *core.Container, args containerWithWorkdirArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
cfg.WorkingDir = absPath(cfg.WorkingDir, args.Path)
return cfg
})
}
func (s *containerSchema) workdir(ctx *core.Context, parent *core.Container, args containerWithVariableArgs) (string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return "", err
}
return cfg.WorkingDir, nil
}
type containerWithVariableArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
Value string
Expand bool
}
func (s *containerSchema) withEnvVariable(ctx *core.Context, parent *core.Container, args containerWithVariableArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
value := args.Value
if args.Expand {
value = os.Expand(value, func(k string) string {
v, _ := core.LookupEnv(cfg.Env, k)
return v
})
}
cfg.Env = core.AddEnv(cfg.Env, args.Name, value)
return cfg
})
}
type containerWithoutVariableArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
}
func (s *containerSchema) withoutEnvVariable(ctx *core.Context, parent *core.Container, args containerWithoutVariableArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
newEnv := []string{}
core.WalkEnv(cfg.Env, func(k, _, env string) {
if !shell.EqualEnvKeys(k, args.Name) {
newEnv = append(newEnv, env)
}
})
cfg.Env = newEnv
return cfg
})
}
type EnvVariable struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string `json:"name"`
Value string `json:"value"`
}
func (s *containerSchema) envVariables(ctx *core.Context, parent *core.Container, args any) ([]EnvVariable, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
vars := make([]EnvVariable, 0, len(cfg.Env))
core.WalkEnv(cfg.Env, func(k, v, _ string) {
vars = append(vars, EnvVariable{Name: k, Value: v})
})
return vars, nil
}
type containerVariableArgs struct {
Name string
}
func (s *containerSchema) envVariable(ctx *core.Context, parent *core.Container, args containerVariableArgs) (*string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
if val, ok := core.LookupEnv(cfg.Env, args.Name); ok {
return &val, nil
}
return nil, nil
}
type Label struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string `json:"name"`
Value string `json:"value"`
}
func (s *containerSchema) labels(ctx *core.Context, parent *core.Container, args any) ([]Label, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
labels := make([]Label, 0, len(cfg.Labels))
for name, value := range cfg.Labels {
label := Label{
Name: name,
Value: value,
}
labels = append(labels, label)
}
return labels, nil
}
type containerLabelArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
}
func (s *containerSchema) label(ctx *core.Context, parent *core.Container, args containerLabelArgs) (*string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
if val, ok := cfg.Labels[args.Name]; ok {
return &val, nil
}
return nil, nil
}
type containerWithMountedDirectoryArgs struct {
Path string
Source core.DirectoryID
Owner string
}
func (s *containerSchema) withMountedDirectory(ctx *core.Context, parent *core.Container, args containerWithMountedDirectoryArgs) (*core.Container, error) {
dir, err := args.Source.ToDirectory()
if err != nil {
return nil, err
}
return parent.WithMountedDirectory(ctx, s.bk, args.Path, dir, args.Owner)
}
type containerPublishArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Address string
PlatformVariants []core.ContainerID
ForcedCompression core.ImageLayerCompression
MediaTypes core.ImageMediaTypes
}
func (s *containerSchema) publish(ctx *core.Context, parent *core.Container, args containerPublishArgs) (string, error) {
return parent.Publish(ctx, s.bk, args.Address, args.PlatformVariants, args.ForcedCompression, args.MediaTypes)
}
type containerWithMountedFileArgs struct {
Path string
Source core.FileID
Owner string
}
func (s *containerSchema) withMountedFile(ctx *core.Context, parent *core.Container, args containerWithMountedFileArgs) (*core.Container, error) {
file, err := args.Source.ToFile()
if err != nil {
return nil, err
}
return parent.WithMountedFile(ctx, s.bk, args.Path, file, args.Owner)
}
type containerWithMountedCacheArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Path string
Cache core.CacheID
Source core.DirectoryID
Concurrency core.CacheSharingMode
Owner string
}
func (s *containerSchema) withMountedCache(ctx *core.Context, parent *core.Container, args containerWithMountedCacheArgs) (*core.Container, error) {
var dir *core.Directory
if args.Source != "" {
var err error
dir, err = args.Source.ToDirectory()
if err != nil {
return nil, err
}
}
cache, err := args.Cache.ToCacheVolume()
if err != nil {
return nil, err
}
return parent.WithMountedCache(ctx, s.bk, args.Path, cache, dir, args.Concurrency, args.Owner)
}
type containerWithMountedTempArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Path string
}
func (s *containerSchema) withMountedTemp(ctx *core.Context, parent *core.Container, args containerWithMountedTempArgs) (*core.Container, error) {
return parent.WithMountedTemp(ctx, args.Path)
}
type containerWithoutMountArgs struct {
Path string
}
func (s *containerSchema) withoutMount(ctx *core.Context, parent *core.Container, args containerWithoutMountArgs) (*core.Container, error) {
return parent.WithoutMount(ctx, args.Path)
}
func (s *containerSchema) mounts(ctx *core.Context, parent *core.Container, _ any) ([]string, error) {
return parent.MountTargets(ctx)
}
type containerWithLabelArgs struct {
Name string
Value string
}
func (s *containerSchema) withLabel(ctx *core.Context, parent *core.Container, args containerWithLabelArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
if cfg.Labels == nil {
cfg.Labels = make(map[string]string)
}
cfg.Labels[args.Name] = args.Value
return cfg
})
}
type containerWithoutLabelArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
}
func (s *containerSchema) withoutLabel(ctx *core.Context, parent *core.Container, args containerWithoutLabelArgs) (*core.Container, error) {
return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig {
delete(cfg.Labels, args.Name)
return cfg
})
}
type containerDirectoryArgs struct {
Path string
}
func (s *containerSchema) directory(ctx *core.Context, parent *core.Container, args containerDirectoryArgs) (*core.Directory, error) {
return parent.Directory(ctx, s.bk, args.Path)
}
type containerFileArgs struct {
Path string
}
func (s *containerSchema) file(ctx *core.Context, parent *core.Container, args containerFileArgs) (*core.File, error) {
return parent.File(ctx, s.bk, args.Path)
}
func absPath(workDir string, containerPath string) string {
if path.IsAbs(containerPath) {
return containerPath
}
if workDir == "" {
workDir = "/"
}
return path.Join(workDir, containerPath)
}
type containerWithSecretVariableArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Name string
Secret core.SecretID
}
func (s *containerSchema) withSecretVariable(ctx *core.Context, parent *core.Container, args containerWithSecretVariableArgs) (*core.Container, error) {
secret, err := args.Secret.ToSecret()
if err != nil {
return nil, err
}
return parent.WithSecretVariable(ctx, args.Name, secret)
}
type containerWithMountedSecretArgs struct {
Path string
Source core.SecretID
Owner string
}
func (s *containerSchema) withMountedSecret(ctx *core.Context, parent *core.Container, args containerWithMountedSecretArgs) (*core.Container, error) {
secret, err := args.Source.ToSecret()
if err != nil {
return nil, err
}
return parent.WithMountedSecret(ctx, s.bk, args.Path, secret, args.Owner)
}
type containerWithDirectoryArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | withDirectoryArgs
Owner string
}
func (s *containerSchema) withDirectory(ctx *core.Context, parent *core.Container, args containerWithDirectoryArgs) (*core.Container, error) {
dir, err := args.Directory.ToDirectory()
if err != nil {
return nil, err
}
return parent.WithDirectory(ctx, s.bk, args.Path, dir, args.CopyFilter, args.Owner)
}
type containerWithFileArgs struct {
withFileArgs
Owner string
}
func (s *containerSchema) withFile(ctx *core.Context, parent *core.Container, args containerWithFileArgs) (*core.Container, error) {
file, err := args.Source.ToFile()
if err != nil {
return nil, err
}
return parent.WithFile(ctx, s.bk, args.Path, file, args.Permissions, args.Owner)
}
type containerWithNewFileArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | withNewFileArgs
Owner string
}
func (s *containerSchema) withNewFile(ctx *core.Context, parent *core.Container, args containerWithNewFileArgs) (*core.Container, error) {
return parent.WithNewFile(ctx, s.bk, args.Path, []byte(args.Contents), args.Permissions, args.Owner)
}
type containerWithUnixSocketArgs struct {
Path string
Source socket.ID
Owner string
}
func (s *containerSchema) withUnixSocket(ctx *core.Context, parent *core.Container, args containerWithUnixSocketArgs) (*core.Container, error) {
socket, err := args.Source.ToSocket()
if err != nil {
return nil, err
}
return parent.WithUnixSocket(ctx, s.bk, args.Path, socket, args.Owner)
}
type containerWithoutUnixSocketArgs struct {
Path string
}
func (s *containerSchema) withoutUnixSocket(ctx *core.Context, parent *core.Container, args containerWithoutUnixSocketArgs) (*core.Container, error) {
return parent.WithoutUnixSocket(ctx, args.Path)
}
func (s *containerSchema) platform(ctx *core.Context, parent *core.Container, args any) (specs.Platform, error) {
return parent.Platform, nil
}
type containerExportArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Path string
PlatformVariants []core.ContainerID
ForcedCompression core.ImageLayerCompression
MediaTypes core.ImageMediaTypes
}
func (s *containerSchema) export(ctx *core.Context, parent *core.Container, args containerExportArgs) (bool, error) {
if err := parent.Export(ctx, s.bk, args.Path, args.PlatformVariants, args.ForcedCompression, args.MediaTypes); err != nil {
return false, err
}
return true, nil
}
type containerImportArgs struct {
Source core.FileID
Tag string
}
func (s *containerSchema) import_(ctx *core.Context, parent *core.Container, args containerImportArgs) (*core.Container, error) {
return parent.Import(
ctx,
args.Source,
args.Tag,
s.bk,
s.host,
s.importCache,
s.ociStore,
s.leaseManager,
)
}
type containerWithRegistryAuthArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Address string `json:"address"`
Username string `json:"username"`
Secret core.SecretID `json:"secret"`
}
func (s *containerSchema) withRegistryAuth(ctx *core.Context, parents *core.Container, args containerWithRegistryAuthArgs) (*core.Container, error) {
secretBytes, err := s.secrets.GetSecret(ctx, args.Secret.String())
if err != nil {
return nil, err
}
if err := s.auth.AddCredential(args.Address, args.Username, string(secretBytes)); err != nil {
return nil, err
}
return parents, nil
}
type containerWithoutRegistryAuthArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Address string
}
func (s *containerSchema) withoutRegistryAuth(_ *core.Context, parents *core.Container, args containerWithoutRegistryAuthArgs) (*core.Container, error) {
if err := s.auth.RemoveCredential(args.Address); err != nil {
return nil, err
}
return parents, nil
}
func (s *containerSchema) imageRef(ctx *core.Context, parent *core.Container, args containerWithVariableArgs) (string, error) {
return parent.ImageRefOrErr(ctx, s.bk)
}
func (s *containerSchema) hostname(ctx *core.Context, parent *core.Container, args any) (string, error) {
parent, err := s.withDefaultExec(ctx, parent)
if err != nil {
return "", err
}
return parent.HostnameOrErr()
}
type containerEndpointArgs struct {
Port int
Scheme string
}
func (s *containerSchema) endpoint(ctx *core.Context, parent *core.Container, args containerEndpointArgs) (string, error) {
parent, err := s.withDefaultExec(ctx, parent)
if err != nil {
return "", err
}
return parent.Endpoint(s.bk, args.Port, args.Scheme)
}
type containerWithServiceDependencyArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Service core.ContainerID
Alias string
}
func (s *containerSchema) withServiceBinding(ctx *core.Context, parent *core.Container, args containerWithServiceDependencyArgs) (*core.Container, error) {
svc, err := args.Service.ToContainer()
if err != nil {
return nil, err
}
svc, err = s.withDefaultExec(ctx, svc)
if err != nil {
return nil, err
}
return parent.WithServiceBinding(s.bk, svc, args.Alias)
}
type containerWithExposedPortArgs struct {
Protocol core.NetworkProtocol
Port int
Description *string
}
func (s *containerSchema) withExposedPort(ctx *core.Context, parent *core.Container, args containerWithExposedPortArgs) (*core.Container, error) {
return parent.WithExposedPort(core.ContainerPort{
Protocol: args.Protocol,
Port: args.Port,
Description: args.Description,
})
}
type containerWithoutExposedPortArgs struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | Protocol core.NetworkProtocol
Port int
}
func (s *containerSchema) withoutExposedPort(ctx *core.Context, parent *core.Container, args containerWithoutExposedPortArgs) (*core.Container, error) {
return parent.WithoutExposedPort(args.Port, args.Protocol)
}
type ExposedPort struct {
Port int `json:"port"`
Protocol string `json:"protocol"`
Description *string `json:"description,omitempty"`
}
func (s *containerSchema) exposedPorts(ctx *core.Context, parent *core.Container, args any) ([]ExposedPort, error) {
ports := make(map[string]ExposedPort, len(parent.Ports))
for _, p := range parent.Ports {
ociPort := fmt.Sprintf("%d/%s", p.Port, p.Protocol.Network())
ports[ociPort] = ExposedPort{
Port: p.Port,
Protocol: string(p.Protocol),
Description: p.Description,
}
}
exposedPorts := []ExposedPort{}
for ociPort := range parent.Config.ExposedPorts {
p, exists := ports[ociPort] |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | core/schema/container.go | if !exists {
port, proto, ok := strings.Cut(ociPort, "/")
if !ok {
continue
}
portNr, err := strconv.Atoi(port)
if err != nil {
continue
}
p = ExposedPort{
Port: portNr,
Protocol: strings.ToUpper(proto),
}
}
exposedPorts = append(exposedPorts, p)
}
return exposedPorts, nil
}
func (s *containerSchema) withFocus(ctx *core.Context, parent *core.Container, args any) (*core.Container, error) {
child := parent.Clone()
child.Focused = true
return child, nil
}
func (s *containerSchema) withoutFocus(ctx *core.Context, parent *core.Container, args any) (*core.Container, error) {
child := parent.Clone()
child.Focused = false
return child, nil
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | package dagger
import (
"context"
"dagger.io/dagger/internal/querybuilder"
"github.com/Khan/genqlient/graphql"
)
type CacheID string
type ContainerID string
type DirectoryID string
type FileID string
type Platform string
type ProjectCommandID string
type ProjectID string
type SecretID string
type SocketID string
type BuildArg struct {
Name string `json:"name"`
Value string `json:"value"`
}
type PipelineLabel struct {
Name string `json:"name"`
Value string `json:"value"`
}
type CacheVolume struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q *querybuilder.Selection
c graphql.Client
id *CacheID
}
func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) {
if r.id != nil {
return *r.id, nil
}
q := r.q.Select("id")
var response CacheID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *CacheVolume) XXX_GraphQLType() string {
return "CacheVolume"
}
func (r *CacheVolume) XXX_GraphQLIDType() string {
return "CacheID"
}
func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
type Container struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q *querybuilder.Selection
c graphql.Client
endpoint *string
envVariable *string
export *bool
hostname *string
id *ContainerID
imageRef *string
label *string
platform *Platform
publish *string
stderr *string
stdout *string
sync *ContainerID
user *string
workdir *string
}
type WithContainerFunc func(r *Container) *Container
func (r *Container) With(f WithContainerFunc) *Container {
return f(r)
}
type ContainerBuildOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Dockerfile string
BuildArgs []BuildArg
Target string
Secrets []*Secret
}
func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container {
q := r.q.Select("build")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Dockerfile) {
q = q.Arg("dockerfile", opts[i].Dockerfile)
}
if !querybuilder.IsZeroValue(opts[i].BuildArgs) {
q = q.Arg("buildArgs", opts[i].BuildArgs)
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | if !querybuilder.IsZeroValue(opts[i].Target) {
q = q.Arg("target", opts[i].Target)
}
if !querybuilder.IsZeroValue(opts[i].Secrets) {
q = q.Arg("secrets", opts[i].Secrets)
}
}
q = q.Arg("context", context)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) {
q := r.q.Select("defaultArgs")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Directory(path string) *Directory {
q := r.q.Select("directory")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type ContainerEndpointOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Port int
Scheme string
}
func (r *Container) Endpoint(ctx context.Context, opts ...ContainerEndpointOpts) (string, error) {
if r.endpoint != nil {
return *r.endpoint, nil
}
q := r.q.Select("endpoint")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Port) {
q = q.Arg("port", opts[i].Port) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
if !querybuilder.IsZeroValue(opts[i].Scheme) {
q = q.Arg("scheme", opts[i].Scheme)
}
}
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Entrypoint(ctx context.Context) ([]string, error) {
q := r.q.Select("entrypoint")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) {
if r.envVariable != nil {
return *r.envVariable, nil
}
q := r.q.Select("envVariable")
q = q.Arg("name", name)
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) {
q := r.q.Select("envVariables")
q = q.Select("name value")
type envVariables struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Name string
Value string
}
convert := func(fields []envVariables) []EnvVariable {
out := []EnvVariable{}
for i := range fields {
out = append(out, EnvVariable{name: &fields[i].Name, value: &fields[i].Value})
}
return out
}
var response []envVariables
q = q.Bind(&response)
err := q.Execute(ctx, r.c)
if err != nil {
return nil, err
}
return convert(response), nil
}
type ContainerExportOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | PlatformVariants []*Container
ForcedCompression ImageLayerCompression
MediaTypes ImageMediaTypes
}
func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) {
if r.export != nil {
return *r.export, nil
}
q := r.q.Select("export")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
q = q.Arg("platformVariants", opts[i].PlatformVariants)
}
if !querybuilder.IsZeroValue(opts[i].ForcedCompression) {
q = q.Arg("forcedCompression", opts[i].ForcedCompression)
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | if !querybuilder.IsZeroValue(opts[i].MediaTypes) {
q = q.Arg("mediaTypes", opts[i].MediaTypes)
}
}
q = q.Arg("path", path)
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error) {
q := r.q.Select("exposedPorts")
q = q.Select("description port protocol")
type exposedPorts struct {
Description string
Port int
Protocol NetworkProtocol
}
convert := func(fields []exposedPorts) []Port {
out := []Port{}
for i := range fields {
out = append(out, Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol})
}
return out
}
var response []exposedPorts
q = q.Bind(&response)
err := q.Execute(ctx, r.c)
if err != nil {
return nil, err |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
return convert(response), nil
}
func (r *Container) File(path string) *File {
q := r.q.Select("file")
q = q.Arg("path", path)
return &File{
q: q,
c: r.c,
}
}
func (r *Container) From(address string) *Container {
q := r.q.Select("from")
q = q.Arg("address", address)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) Hostname(ctx context.Context) (string, error) {
if r.hostname != nil {
return *r.hostname, nil
}
q := r.q.Select("hostname")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) ID(ctx context.Context) (ContainerID, error) {
if r.id != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | return *r.id, nil
}
q := r.q.Select("id")
var response ContainerID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) XXX_GraphQLType() string {
return "Container"
}
func (r *Container) XXX_GraphQLIDType() string {
return "ContainerID"
}
func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *Container) ImageRef(ctx context.Context) (string, error) {
if r.imageRef != nil {
return *r.imageRef, nil
}
q := r.q.Select("imageRef")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerImportOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Tag string
}
func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container {
q := r.q.Select("import")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Tag) {
q = q.Arg("tag", opts[i].Tag)
}
}
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) Label(ctx context.Context, name string) (string, error) {
if r.label != nil {
return *r.label, nil
}
q := r.q.Select("label")
q = q.Arg("name", name)
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
func (r *Container) Labels(ctx context.Context) ([]Label, error) {
q := r.q.Select("labels")
q = q.Select("name value")
type labels struct {
Name string
Value string
}
convert := func(fields []labels) []Label {
out := []Label{}
for i := range fields {
out = append(out, Label{name: &fields[i].Name, value: &fields[i].Value})
}
return out
}
var response []labels
q = q.Bind(&response)
err := q.Execute(ctx, r.c)
if err != nil {
return nil, err
}
return convert(response), nil
}
func (r *Container) Mounts(ctx context.Context) ([]string, error) {
q := r.q.Select("mounts")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerPipelineOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Description string
Labels []PipelineLabel
}
func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container {
q := r.q.Select("pipeline")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
if !querybuilder.IsZeroValue(opts[i].Labels) {
q = q.Arg("labels", opts[i].Labels)
}
}
q = q.Arg("name", name)
return &Container{
q: q, |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | c: r.c,
}
}
func (r *Container) Platform(ctx context.Context) (Platform, error) {
if r.platform != nil {
return *r.platform, nil
}
q := r.q.Select("platform")
var response Platform
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerPublishOpts struct {
PlatformVariants []*Container
ForcedCompression ImageLayerCompression
MediaTypes ImageMediaTypes
}
func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) {
if r.publish != nil {
return *r.publish, nil |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
q := r.q.Select("publish")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
q = q.Arg("platformVariants", opts[i].PlatformVariants)
}
if !querybuilder.IsZeroValue(opts[i].ForcedCompression) {
q = q.Arg("forcedCompression", opts[i].ForcedCompression)
}
if !querybuilder.IsZeroValue(opts[i].MediaTypes) {
q = q.Arg("mediaTypes", opts[i].MediaTypes)
}
}
q = q.Arg("address", address)
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Rootfs() *Directory {
q := r.q.Select("rootfs")
return &Directory{
q: q,
c: r.c,
}
}
func (r *Container) Stderr(ctx context.Context) (string, error) {
if r.stderr != nil { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | return *r.stderr, nil
}
q := r.q.Select("stderr")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Stdout(ctx context.Context) (string, error) {
if r.stdout != nil {
return *r.stdout, nil
}
q := r.q.Select("stdout")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Sync(ctx context.Context) (*Container, error) {
q := r.q.Select("sync")
return r, q.Execute(ctx, r.c)
}
func (r *Container) User(ctx context.Context) (string, error) {
if r.user != nil {
return *r.user, nil
}
q := r.q.Select("user")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerWithDefaultArgsOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Args []string
}
func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container {
q := r.q.Select("withDefaultArgs")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Args) {
q = q.Arg("args", opts[i].Args)
}
}
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithDirectoryOpts struct {
Exclude []string
Include []string
Owner string
}
func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container {
q := r.q.Select("withDirectory") |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
}
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
}
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("directory", directory)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithEntrypoint(args []string) *Container {
q := r.q.Select("withEntrypoint")
q = q.Arg("args", args)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithEnvVariableOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Expand bool
}
func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container {
q := r.q.Select("withEnvVariable")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Expand) {
q = q.Arg("expand", opts[i].Expand)
}
}
q = q.Arg("name", name)
q = q.Arg("value", value)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithExecOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | SkipEntrypoint bool
Stdin string
RedirectStdout string
RedirectStderr string
ExperimentalPrivilegedNesting bool
InsecureRootCapabilities bool
}
func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container {
q := r.q.Select("withExec")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].SkipEntrypoint) { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q = q.Arg("skipEntrypoint", opts[i].SkipEntrypoint)
}
if !querybuilder.IsZeroValue(opts[i].Stdin) {
q = q.Arg("stdin", opts[i].Stdin)
}
if !querybuilder.IsZeroValue(opts[i].RedirectStdout) {
q = q.Arg("redirectStdout", opts[i].RedirectStdout)
}
if !querybuilder.IsZeroValue(opts[i].RedirectStderr) {
q = q.Arg("redirectStderr", opts[i].RedirectStderr)
}
if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) {
q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting)
}
if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) {
q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities)
}
}
q = q.Arg("args", args)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithExposedPortOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Protocol NetworkProtocol
Description string
}
func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container {
q := r.q.Select("withExposedPort")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Protocol) {
q = q.Arg("protocol", opts[i].Protocol)
}
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
}
q = q.Arg("port", port)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithFileOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Permissions int
Owner string
}
func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container {
q := r.q.Select("withFile")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
}
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q: q,
c: r.c,
}
}
func (r *Container) WithFocus() *Container {
q := r.q.Select("withFocus")
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithLabel(name string, value string) *Container {
q := r.q.Select("withLabel")
q = q.Arg("name", name)
q = q.Arg("value", value)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithMountedCacheOpts struct {
Source *Directory
Sharing CacheSharingMode |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Owner string
}
func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container {
q := r.q.Select("withMountedCache")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Source) {
q = q.Arg("source", opts[i].Source)
}
if !querybuilder.IsZeroValue(opts[i].Sharing) {
q = q.Arg("sharing", opts[i].Sharing)
}
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("cache", cache)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithMountedDirectoryOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Owner string
}
func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container {
q := r.q.Select("withMountedDirectory")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithMountedFileOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Owner string
}
func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container {
q := r.q.Select("withMountedFile")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithMountedSecretOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Owner string
}
func (r *Container) WithMountedSecret(path string, source *Secret, opts ...ContainerWithMountedSecretOpts) *Container {
q := r.q.Select("withMountedSecret")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithMountedTemp(path string) *Container {
q := r.q.Select("withMountedTemp")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithNewFileOpts struct {
Contents string
Permissions int
Owner string |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | }
func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container {
q := r.q.Select("withNewFile")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Contents) {
q = q.Arg("contents", opts[i].Contents)
}
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
}
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithRegistryAuth(address string, username string, secret *Secret) *Container {
q := r.q.Select("withRegistryAuth")
q = q.Arg("address", address)
q = q.Arg("username", username)
q = q.Arg("secret", secret)
return &Container{
q: q, |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | c: r.c,
}
}
func (r *Container) WithRootfs(directory *Directory) *Container {
q := r.q.Select("withRootfs")
q = q.Arg("directory", directory)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithSecretVariable(name string, secret *Secret) *Container {
q := r.q.Select("withSecretVariable")
q = q.Arg("name", name)
q = q.Arg("secret", secret)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithServiceBinding(alias string, service *Container) *Container {
q := r.q.Select("withServiceBinding")
q = q.Arg("alias", alias)
q = q.Arg("service", service)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithUnixSocketOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Owner string
}
func (r *Container) WithUnixSocket(path string, source *Socket, opts ...ContainerWithUnixSocketOpts) *Container {
q := r.q.Select("withUnixSocket")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Owner) {
q = q.Arg("owner", opts[i].Owner)
}
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithUser(name string) *Container { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q := r.q.Select("withUser")
q = q.Arg("name", name)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithWorkdir(path string) *Container {
q := r.q.Select("withWorkdir")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutEnvVariable(name string) *Container {
q := r.q.Select("withoutEnvVariable")
q = q.Arg("name", name)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithoutExposedPortOpts struct {
Protocol NetworkProtocol
}
func (r *Container) WithoutExposedPort(port int, opts ...ContainerWithoutExposedPortOpts) *Container {
q := r.q.Select("withoutExposedPort")
for i := len(opts) - 1; i >= 0; i-- { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | if !querybuilder.IsZeroValue(opts[i].Protocol) {
q = q.Arg("protocol", opts[i].Protocol)
}
}
q = q.Arg("port", port)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutFocus() *Container {
q := r.q.Select("withoutFocus")
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutLabel(name string) *Container {
q := r.q.Select("withoutLabel")
q = q.Arg("name", name)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutMount(path string) *Container {
q := r.q.Select("withoutMount")
q = q.Arg("path", path)
return &Container{ |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q: q,
c: r.c,
}
}
func (r *Container) WithoutRegistryAuth(address string) *Container {
q := r.q.Select("withoutRegistryAuth")
q = q.Arg("address", address)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutUnixSocket(path string) *Container {
q := r.q.Select("withoutUnixSocket")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) Workdir(ctx context.Context) (string, error) {
if r.workdir != nil {
return *r.workdir, nil
}
q := r.q.Select("workdir")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type Directory struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q *querybuilder.Selection
c graphql.Client
export *bool
id *DirectoryID
sync *DirectoryID
}
type WithDirectoryFunc func(r *Directory) *Directory
func (r *Directory) With(f WithDirectoryFunc) *Directory {
return f(r)
}
func (r *Directory) Diff(other *Directory) *Directory {
q := r.q.Select("diff")
q = q.Arg("other", other)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) Directory(path string) *Directory {
q := r.q.Select("directory")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryDockerBuildOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Dockerfile string
Platform Platform
BuildArgs []BuildArg
Target string
Secrets []*Secret
} |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container {
q := r.q.Select("dockerBuild")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Dockerfile) {
q = q.Arg("dockerfile", opts[i].Dockerfile)
}
if !querybuilder.IsZeroValue(opts[i].Platform) {
q = q.Arg("platform", opts[i].Platform)
}
if !querybuilder.IsZeroValue(opts[i].BuildArgs) {
q = q.Arg("buildArgs", opts[i].BuildArgs)
}
if !querybuilder.IsZeroValue(opts[i].Target) {
q = q.Arg("target", opts[i].Target)
}
if !querybuilder.IsZeroValue(opts[i].Secrets) {
q = q.Arg("secrets", opts[i].Secrets)
}
}
return &Container{
q: q,
c: r.c,
}
}
type DirectoryEntriesOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Path string
}
func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) {
q := r.q.Select("entries")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Path) {
q = q.Arg("path", opts[i].Path)
}
}
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) Export(ctx context.Context, path string) (bool, error) {
if r.export != nil {
return *r.export, nil
}
q := r.q.Select("export")
q = q.Arg("path", path)
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) File(path string) *File { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q := r.q.Select("file")
q = q.Arg("path", path)
return &File{
q: q,
c: r.c,
}
}
func (r *Directory) ID(ctx context.Context) (DirectoryID, error) {
if r.id != nil {
return *r.id, nil
}
q := r.q.Select("id")
var response DirectoryID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) XXX_GraphQLType() string {
return "Directory"
}
func (r *Directory) XXX_GraphQLIDType() string {
return "DirectoryID"
}
func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
type DirectoryPipelineOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Description string
Labels []PipelineLabel
}
func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory {
q := r.q.Select("pipeline")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
}
if !querybuilder.IsZeroValue(opts[i].Labels) {
q = q.Arg("labels", opts[i].Labels)
}
}
q = q.Arg("name", name)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) Sync(ctx context.Context) (*Directory, error) {
q := r.q.Select("sync")
return r, q.Execute(ctx, r.c)
}
type DirectoryWithDirectoryOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Exclude []string
Include []string
}
func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory {
q := r.q.Select("withDirectory")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
}
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
}
}
q = q.Arg("path", path)
q = q.Arg("directory", directory)
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithFileOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Permissions int
}
func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory {
q := r.q.Select("withFile")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
}
}
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithNewDirectoryOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Permissions int
}
func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory {
q := r.q.Select("withNewDirectory")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
}
}
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithNewFileOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | Permissions int
}
func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory {
q := r.q.Select("withNewFile")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
}
}
q = q.Arg("path", path)
q = q.Arg("contents", contents) |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithTimestamps(timestamp int) *Directory {
q := r.q.Select("withTimestamps")
q = q.Arg("timestamp", timestamp)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithoutDirectory(path string) *Directory {
q := r.q.Select("withoutDirectory")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithoutFile(path string) *Directory {
q := r.q.Select("withoutFile")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type EnvVariable struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q *querybuilder.Selection
c graphql.Client
name *string
value *string
}
func (r *EnvVariable) Name(ctx context.Context) (string, error) {
if r.name != nil {
return *r.name, nil
}
q := r.q.Select("name")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *EnvVariable) Value(ctx context.Context) (string, error) {
if r.value != nil {
return *r.value, nil
}
q := r.q.Select("value")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type File struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | q *querybuilder.Selection
c graphql.Client
contents *string
export *bool
id *FileID
size *int
sync *FileID
}
type WithFileFunc func(r *File) *File
func (r *File) With(f WithFileFunc) *File {
return f(r)
}
func (r *File) Contents(ctx context.Context) (string, error) {
if r.contents != nil {
return *r.contents, nil
}
q := r.q.Select("contents")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type FileExportOpts struct { |
closed | dagger/dagger | https://github.com/dagger/dagger | 3,323 | Support configuring additional options for secrets | Buildkit's full `SecretInfo` struct is as follows:
```go
type SecretInfo struct {
ID string
Target string
Mode int
UID int
GID int
Optional bool
IsEnv bool
}
```
We already support `ID`, `Target`, and `IsEnv` but maybe folks will have a use for `Mode`, `UID`, `GUID`, and/or `Optional`. | https://github.com/dagger/dagger/issues/3323 | https://github.com/dagger/dagger/pull/5707 | e5feaea7f1d6eb01d834e83b180fc3daed3463ea | 1ddf4ea46492a1aad850906c0c78c58e43d873c4 | 2022-10-11T23:15:04Z | go | 2023-09-12T06:56:33Z | sdk/go/api.gen.go | AllowParentDirPath bool
}
func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error) {
if r.export != nil {
return *r.export, nil
}
q := r.q.Select("export")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].AllowParentDirPath) {
q = q.Arg("allowParentDirPath", opts[i].AllowParentDirPath)
}
}
q = q.Arg("path", path)
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *File) ID(ctx context.Context) (FileID, error) {
if r.id != nil {
return *r.id, nil
}
q := r.q.Select("id")
var response FileID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.