8 changed files/cool-sdk
cool-sdk | ||
dagger | ||
dagger | ||
dagger.gen.go | ||
.gitattributes + | ||
.gitignore + | ||
dagger.gen.go | ||
go.mod | ||
go.sum | ||
main.go | ||
dagger.json | ||
Displayed content is truncated due to maximum viewable content limit.
Add comment 1 Minus // Code generated by dagger. DO NOT EDIT.
Add comment 2 Minus
Add comment 3 Minus package dagger
Add comment 4 Minus
Add comment 5 Minus import (
Add comment 6 Minus "context"
Add comment 7 Minus "encoding/json"
Add comment 8 Minus "errors"
Add comment 9 Minus "fmt"
Add comment 10 Minus "net"
Add comment 11 Minus "net/http"
Add comment 12 Minus "os"
Add comment 13 Minus "reflect"
Add comment 14 Minus "strconv"
Add comment 15 Minus "strings"
Add comment 16 Minus
Add comment 17 Minus "github.com/Khan/genqlient/graphql"
Add comment 18 Minus "github.com/vektah/gqlparser/v2/gqlerror"
Add comment 19 Minus
Add comment 20 Minus "main/querybuilder"
Add comment 21 Minus )
Add comment 22 Minus
Add comment 23 Minus // assertNotNil panic if the given value is nil.
Add comment 24 Minus // This function is used to validate that input with pointer type are not nil.
Add comment 25 Minus // See https://github.com/dagger/dagger/issues/5696 for more context.
Add comment 26 Minus func assertNotNil(argName string, value any) {
Add comment 27 Minus // We use reflect because just comparing value to nil is not working since
Add comment 28 Minus // the value is wrapped into a type when passed as parameter.
Add comment 29 Minus // E.g., nil become (*dagger.File)(nil).
Add comment 30 Minus if reflect.ValueOf(value).IsNil() {
Add comment 31 Minus panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName))
Add comment 32 Minus }
Add comment 33 Minus }
Add comment 34 Minus
Add comment 35 Minus type DaggerObject querybuilder.GraphQLMarshaller
Add comment 36 Minus
Add comment 37 Minus // getCustomError parses a GraphQL error into a more specific error type.
Add comment 38 Minus func getCustomError(err error) error {
Add comment 39 Minus var gqlErr *gqlerror.Error
Add comment 40 Minus
Add comment 41 Minus if !errors.As(err, &gqlErr) {
Add comment 42 Minus return nil
Add comment 43 Minus }
Add comment 44 Minus
Add comment 45 Minus ext := gqlErr.Extensions
Add comment 46 Minus
Add comment 47 Minus typ, ok := ext["_type"].(string)
Add comment 48 Minus if !ok {
Add comment 49 Minus return nil
Add comment 50 Minus }
Add comment 51 Minus
Add comment 52 Minus if typ == "EXEC_ERROR" {
Add comment 53 Minus e := &ExecError{
Add comment 54 Minus original: err,
Add comment 55 Minus }
Add comment 56 Minus if code, ok := ext["exitCode"].(float64); ok {
Add comment 57 Minus e.ExitCode = int(code)
Add comment 58 Minus }
Add comment 59 Minus if args, ok := ext["cmd"].([]interface{}); ok {
Add comment 60 Minus cmd := make([]string, len(args))
Add comment 61 Minus for i, v := range args {
Add comment 62 Minus cmd[i] = v.(string)
Add comment 63 Minus }
Add comment 64 Minus e.Cmd = cmd
Add comment 65 Minus }
Add comment 66 Minus if stdout, ok := ext["stdout"].(string); ok {
Add comment 67 Minus e.Stdout = stdout
Add comment 68 Minus }
Add comment 69 Minus if stderr, ok := ext["stderr"].(string); ok {
Add comment 70 Minus e.Stderr = stderr
Add comment 71 Minus }
Add comment 72 Minus return e
Add comment 73 Minus }
Add comment 74 Minus
Add comment 75 Minus return nil
Add comment 76 Minus }
Add comment 77 Minus
Add comment 78 Minus // ExecError is an API error from an exec operation.
Add comment 79 Minus type ExecError struct {
Add comment 80 Minus original error
Add comment 81 Minus Cmd []string
Add comment 82 Minus ExitCode int
Add comment 83 Minus Stdout string
Add comment 84 Minus Stderr string
Add comment 85 Minus }
Add comment 86 Minus
Add comment 87 Minus func (e *ExecError) Error() string {
Add comment 88 Minus // As a default when just printing the error, include the stdout
Add comment 89 Minus // and stderr for visibility
Add comment 90 Minus msg := e.Message()
Add comment 91 Minus if strings.TrimSpace(e.Stdout) != "" {
Add comment 92 Minus msg += "\nStdout:\n" + e.Stdout
Add comment 93 Minus }
Add comment 94 Minus if strings.TrimSpace(e.Stderr) != "" {
Add comment 95 Minus msg += "\nStderr:\n" + e.Stderr
Add comment 96 Minus }
Add comment 97 Minus return msg
Add comment 98 Minus }
Add comment 99 Minus
Add comment 100 Minus func (e *ExecError) Message() string {
Add comment 101 Minus return e.original.Error()
Add comment 102 Minus }
Add comment 103 Minus
Add comment 104 Minus func (e *ExecError) Unwrap() error {
Add comment 105 Minus return e.original
Add comment 106 Minus }
Add comment 107 Minus
Add comment 108 Minus // The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
Add comment 109 Minus type CacheVolumeID string
Add comment 110 Minus
Add comment 111 Minus // The `ContainerID` scalar type represents an identifier for an object of type Container.
Add comment 112 Minus type ContainerID string
Add comment 113 Minus
Add comment 114 Minus // The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
Add comment 115 Minus type CurrentModuleID string
Add comment 116 Minus
Add comment 117 Minus // The `DirectoryID` scalar type represents an identifier for an object of type Directory.
Add comment 118 Minus type DirectoryID string
Add comment 119 Minus
Add comment 120 Minus // The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
Add comment 121 Minus type EnvVariableID string
Add comment 122 Minus
Add comment 123 Minus // The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
Add comment 124 Minus type FieldTypeDefID string
Add comment 125 Minus
Add comment 126 Minus // The `FileID` scalar type represents an identifier for an object of type File.
Add comment 127 Minus type FileID string
Add comment 128 Minus
Add comment 129 Minus // The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
Add comment 130 Minus type FunctionArgID string
Add comment 131 Minus
Add comment 132 Minus // The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
Add comment 133 Minus type FunctionCallArgValueID string
Add comment 134 Minus
Add comment 135 Minus // The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
Add comment 136 Minus type FunctionCallID string
Add comment 137 Minus
Add comment 138 Minus // The `FunctionID` scalar type represents an identifier for an object of type Function.
Add comment 139 Minus type FunctionID string
Add comment 140 Minus
Add comment 141 Minus // The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
Add comment 142 Minus type GeneratedCodeID string
Add comment 143 Minus
Add comment 144 Minus // The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
Add comment 145 Minus type GitModuleSourceID string
Add comment 146 Minus
Add comment 147 Minus // The `GitRefID` scalar type represents an identifier for an object of type GitRef.
Add comment 148 Minus type GitRefID string
Add comment 149 Minus
Add comment 150 Minus // The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
Add comment 151 Minus type GitRepositoryID string
Add comment 152 Minus
Add comment 153 Minus // The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.
Add comment 154 Minus type InputTypeDefID string
Add comment 155 Minus
Add comment 156 Minus // The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
Add comment 157 Minus type InterfaceTypeDefID string
Add comment 158 Minus
Add comment 159 Minus // An arbitrary JSON-encoded value.
Add comment 160 Minus type JSON string
Add comment 161 Minus
Add comment 162 Minus // The `LabelID` scalar type represents an identifier for an object of type Label.
Add comment 163 Minus type LabelID string
Add comment 164 Minus
Add comment 165 Minus // The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
Add comment 166 Minus type ListTypeDefID string
Add comment 167 Minus
Add comment 168 Minus // The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
Add comment 169 Minus type LocalModuleSourceID string
Add comment 170 Minus
Add comment 171 Minus // The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
Add comment 172 Minus type ModuleDependencyID string
Add comment 173 Minus
Add comment 174 Minus // The `ModuleID` scalar type represents an identifier for an object of type Module.
Add comment 175 Minus type ModuleID string
Add comment 176 Minus
Add comment 177 Minus // The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
Add comment 178 Minus type ModuleSourceID string
Add comment 179 Minus
Add comment 180 Minus // The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
Add comment 181 Minus type ObjectTypeDefID string
Add comment 182 Minus
Add comment 183 Minus // The platform config OS and architecture in a Container.
Add comment 184 Minus //
Add comment 185 Minus // The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
Add comment 186 Minus type Platform string
Add comment 187 Minus
Add comment 188 Minus // The `PortID` scalar type represents an identifier for an object of type Port.
Add comment 189 Minus type PortID string
Add comment 190 Minus
Add comment 191 Minus // The `SecretID` scalar type represents an identifier for an object of type Secret.
Add comment 192 Minus type SecretID string
Add comment 193 Minus
Add comment 194 Minus // The `ServiceID` scalar type represents an identifier for an object of type Service.
Add comment 195 Minus type ServiceID string
Add comment 196 Minus
Add comment 197 Minus // The `SocketID` scalar type represents an identifier for an object of type Socket.
Add comment 198 Minus type SocketID string
Add comment 199 Minus
Add comment 200 Minus // The `TerminalID` scalar type represents an identifier for an object of type Terminal.
Add comment 201 Minus type TerminalID string
Add comment 202 Minus
Add comment 203 Minus // The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
Add comment 204 Minus type TypeDefID string
Add comment 205 Minus
Add comment 206 Minus // The absence of a value.
Add comment 207 Minus //
Add comment 208 Minus // A Null Void is used as a placeholder for resolvers that do not return anything.
Add comment 209 Minus type Void string
Add comment 210 Minus
Add comment 211 Minus // Key value object that represents a build argument.
Add comment 212 Minus type BuildArg struct {
Add comment 213 Minus // The build argument name.
Add comment 214 Minus Name string `json:"name"`
Add comment 215 Minus
Add comment 216 Minus // The build argument value.
Add comment 217 Minus Value string `json:"value"`
Add comment 218 Minus }
Add comment 219 Minus
Add comment 220 Minus // Key value object that represents a pipeline label.
Add comment 221 Minus type PipelineLabel struct {
Add comment 222 Minus // Label name.
Add comment 223 Minus Name string `json:"name"`
Add comment 224 Minus
Add comment 225 Minus // Label value.
Add comment 226 Minus Value string `json:"value"`
Add comment 227 Minus }
Add comment 228 Minus
Add comment 229 Minus // Port forwarding rules for tunneling network traffic.
Add comment 230 Minus type PortForward struct {
Add comment 231 Minus // Destination port for traffic.
Add comment 232 Minus Backend int `json:"backend"`
Add comment 233 Minus
Add comment 234 Minus // Port to expose to clients. If unspecified, a default will be chosen.
Add comment 235 Minus Frontend int `json:"frontend"`
Add comment 236 Minus
Add comment 237 Minus // Transport layer protocol to use for traffic.
Add comment 238 Minus Protocol NetworkProtocol `json:"protocol,omitempty"`
Add comment 239 Minus }
Add comment 240 Minus
Add comment 241 Minus // A directory whose contents persist across runs.
Add comment 242 Minus type CacheVolume struct {
Add comment 243 Minus Query *querybuilder.Selection
Add comment 244 Minus Client graphql.Client
Add comment 245 Minus
Add comment 246 Minus id *CacheVolumeID
Add comment 247 Minus }
Add comment 248 Minus
Add comment 249 Minus // A unique identifier for this CacheVolume.
Add comment 250 Minus func (r *CacheVolume) ID(ctx context.Context) (CacheVolumeID, error) {
Add comment 251 Minus if r.id != nil {
Add comment 252 Minus return *r.id, nil
Add comment 253 Minus }
Add comment 254 Minus q := r.Query.Select("id")
Add comment 255 Minus
Add comment 256 Minus var response CacheVolumeID
Add comment 257 Minus
Add comment 258 Minus q = q.Bind(&response)
Add comment 259 Minus return response, q.Execute(ctx, r.Client)
Add comment 260 Minus }
Add comment 261 Minus
Add comment 262 Minus // XXX_GraphQLType is an internal function. It returns the native GraphQL type name
Add comment 263 Minus func (r *CacheVolume) XXX_GraphQLType() string {
Add comment 264 Minus return "CacheVolume"
Add comment 265 Minus }
Add comment 266 Minus
Add comment 267 Minus // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object
Add comment 268 Minus func (r *CacheVolume) XXX_GraphQLIDType() string {
Add comment 269 Minus return "CacheVolumeID"
Add comment 270 Minus }
Add comment 271 Minus
Add comment 272 Minus // XXX_GraphQLID is an internal function. It returns the underlying type ID
Add comment 273 Minus func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) {
Add comment 274 Minus id, err := r.ID(ctx)
Add comment 275 Minus if err != nil {
Add comment 276 Minus return "", err
Add comment 277 Minus }
Add comment 278 Minus return string(id), nil
Add comment 279 Minus }
Add comment 280 Minus
Add comment 281 Minus func (r *CacheVolume) MarshalJSON() ([]byte, error) {
Add comment 282 Minus id, err := r.ID(context.Background())
Add comment 283 Minus if err != nil {
Add comment 284 Minus return nil, err
Add comment 285 Minus }
Add comment 286 Minus return json.Marshal(id)
Add comment 287 Minus }
Add comment 288 Minus func (r *CacheVolume) UnmarshalJSON(bs []byte) error {
Add comment 289 Minus var id string
Add comment 290 Minus err := json.Unmarshal(bs, &id)
Add comment 291 Minus if err != nil {
Add comment 292 Minus return err
Add comment 293 Minus }
Add comment 294 Minus *r = *dag.LoadCacheVolumeFromID(CacheVolumeID(id))
Add comment 295 Minus return nil
Add comment 296 Minus }
Add comment 297 Minus
Add comment 298 Minus // An OCI-compatible container, also known as a Docker container.
Add comment 299 Minus type Container struct {
Add comment 300 Minus Query *querybuilder.Selection
Add comment 301 Minus Client graphql.Client
Add comment 302 Minus
Add comment 303 Minus envVariable *string
Add comment 304 Minus export *bool
Add comment 305 Minus id *ContainerID
Add comment 306 Minus imageRef *string
Add comment 307 Minus label *string
Add comment 308 Minus platform *Platform
Add comment 309 Minus publish *string
Add comment 310 Minus stderr *string
Add comment 311 Minus stdout *string
Add comment 312 Minus sync *ContainerID
Add comment 313 Minus user *string
Add comment 314 Minus workdir *string
Add comment 315 Minus }
Add comment 316 Minus type WithContainerFunc func(r *Container) *Container
Add comment 317 Minus
Add comment 318 Minus // With calls the provided function with current Container.
Add comment 319 Minus //
Add comment 320 Minus // This is useful for reusability and readability by not breaking the calling chain.
Add comment 321 Minus func (r *Container) With(f WithContainerFunc) *Container {
Add comment 322 Minus return f(r)
Add comment 323 Minus }
Add comment 324 Minus
Add comment 325 Minus // Turn the container into a Service.
Add comment 326 Minus //
Add comment 327 Minus // Be sure to set any exposed ports before this conversion.
Add comment 328 Minus func (r *Container) AsService() *Service {
Add comment 329 Minus q := r.Query.Select("asService")
Add comment 330 Minus
Add comment 331 Minus return &Service{
Add comment 332 Minus Query: q,
Add comment 333 Minus Client: r.Client,
Add comment 334 Minus }
Add comment 335 Minus }
Add comment 336 Minus
Add comment 337 Minus // ContainerAsTarballOpts contains options for Container.AsTarball
Add comment 338 Minus type ContainerAsTarballOpts struct {
Add comment 339 Minus // Identifiers for other platform specific containers.
Add comment 340 Minus //
Add comment 341 Minus // Used for multi-platform images.
Add comment 342 Minus PlatformVariants []*Container
Add comment 343 Minus // Force each layer of the image to use the specified compression algorithm.
Add comment 344 Minus //
Add comment 345 Minus // If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
Add comment 346 Minus ForcedCompression ImageLayerCompression
Add comment 347 Minus // Use the specified media types for the image's layers.
Add comment 348 Minus //
Add comment 349 Minus // Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
Add comment 350 Minus MediaTypes ImageMediaTypes
Add comment 351 Minus }
Add comment 352 Minus
Add comment 353 Minus // Returns a File representing the container serialized to a tarball.
Add comment 354 Minus func (r *Container) AsTarball(opts ...ContainerAsTarballOpts) *File {
Add comment 355 Minus q := r.Query.Select("asTarball")
Add comment 356 Minus for i := len(opts) - 1; i >= 0; i-- {
Add comment 357 Minus // `platformVariants` optional argument
Add comment 358 Minus if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
Add comment 359 Minus q = q.Arg("platformVariants", opts[i].PlatformVariants)
Add comment 360 Minus }
Add comment 361 Minus // `forcedCompression` optional argument
Add comment 362 Minus if !querybuilder.IsZeroValue(opts[i].ForcedCompression) {
Add comment 363 Minus q = q.Arg("forcedCompression", opts[i].ForcedCompression)
Add comment 364 Minus }
Add comment 365 Minus // `mediaTypes` optional argument
Add comment 366 Minus if !querybuilder.IsZeroValue(opts[i].MediaTypes) {
Add comment 367 Minus q = q.Arg("mediaTypes", opts[i].MediaTypes)
Add comment 368 Minus }
Add comment 369 Minus }
Add comment 370 Minus
Add comment 371 Minus return &File{
Add comment 372 Minus Query: q,
Add comment 373 Minus Client: r.Client,
Add comment 374 Minus }
Add comment 375 Minus }
Add comment 376 Minus
Add comment 377 Minus // ContainerBuildOpts contains options for Container.Build
Add comment 378 Minus type ContainerBuildOpts struct {
Add comment 379 Minus // Path to the Dockerfile to use.
Add comment 380 Minus Dockerfile string
Add comment 381 Minus // Target build stage to build.
Add comment 382 Minus Target string
Add comment 383 Minus // Additional build arguments.
Add comment 384 Minus BuildArgs []BuildArg
Add comment 385 Minus // Secrets to pass to the build.
Add comment 386 Minus //
Add comment 387 Minus // They will be mounted at /run/secrets/[secret-name] in the build container
Add comment 388 Minus //
Add comment 389 Minus // They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl http://example.com?token=$(cat /run/secrets/my-secret)
Add comment 390 Minus Secrets []*Secret
Add comment 391 Minus }
Add comment 392 Minus
Add comment 393 Minus // Initializes this container from a Dockerfile build.
Add comment 394 Minus func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container {
Add comment 395 Minus assertNotNil("context", context)
Add comment 396 Minus q := r.Query.Select("build")
Add comment 397 Minus for i := len(opts) - 1; i >= 0; i-- {
Add comment 398 Minus // `dockerfile` optional argument
Add comment 399 Minus if !querybuilder.IsZeroValue(opts[i].Dockerfile) {
Add comment 400 Minus q = q.Arg("dockerfile", opts[i].Dockerfile)
Add comment 401 Minus }
Add comment 402 Minus // `target` optional argument
Add comment 403 Minus if !querybuilder.IsZeroValue(opts[i].Target) {
Add comment 404 Minus q = q.Arg("target", opts[i].Target)
Add comment 405 Minus }
Add comment 406 Minus // `buildArgs` optional argument
Add comment 407 Minus if !querybuilder.IsZeroValue(opts[i].BuildArgs) {
Add comment 408 Minus q = q.Arg("buildArgs", opts[i].BuildArgs)
Add comment 409 Minus }
Add comment 410 Minus // `secrets` optional argument
Add comment 411 Minus if !querybuilder.IsZeroValue(opts[i].Secrets) {
Add comment 412 Minus q = q.Arg("secrets", opts[i].Secrets)
Add comment 413 Minus }
Add comment 414 Minus }
Add comment 415 Minus q = q.Arg("context", context)
Add comment 416 Minus
Add comment 417 Minus return &Container{
Add comment 418 Minus Query: q,
Add comment 419 Minus Client: r.Client,
Add comment 420 Minus }
Add comment 421 Minus }
Add comment 422 Minus
Add comment 423 Minus // Retrieves default arguments for future commands.
Add comment 424 Minus func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) {
Add comment 425 Minus q := r.Query.Select("defaultArgs")
Add comment 426 Minus
Add comment 427 Minus var response []string
Add comment 428 Minus
Add comment 429 Minus q = q.Bind(&response)
Add comment 430 Minus return response, q.Execute(ctx, r.Client)
Add comment 431 Minus }
Add comment 432 Minus
Add comment 433 Minus // Retrieves a directory at the given path.
Add comment 434 Minus //
Add comment 435 Minus // Mounts are included.
Add comment 436 Minus func (r *Container) Directory(path string) *Directory {
Add comment 437 Minus q := r.Query.Select("directory")
Add comment 438 Minus q = q.Arg("path", path)
Add comment 439 Minus
Add comment 440 Minus return &Directory{
Add comment 441 Minus Query: q,
Add comment 442 Minus Client: r.Client,
Add comment 443 Minus }
Add comment 444 Minus }
Add comment 445 Minus
Add comment 446 Minus // Retrieves entrypoint to be prepended to the arguments of all commands.
Add comment 447 Minus func (r *Container) Entrypoint(ctx context.Context) ([]string, error) {
Add comment 448 Minus q := r.Query.Select("entrypoint")
Add comment 449 Minus
Add comment 450 Minus var response []string
Add comment 451 Minus
Add comment 452 Minus q = q.Bind(&response)
Add comment 453 Minus return response, q.Execute(ctx, r.Client)
Add comment 454 Minus }
Add comment 455 Minus
Add comment 456 Minus // Retrieves the value of the specified environment variable.
Add comment 457 Minus func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) {
Add comment 458 Minus if r.envVariable != nil {
Add comment 459 Minus return *r.envVariable, nil
Add comment 460 Minus }
Add comment 461 Minus q := r.Query.Select("envVariable")
Add comment 462 Minus q = q.Arg("name", name)
Add comment 463 Minus
Add comment 464 Minus var response string
Add comment 465 Minus
Add comment 466 Minus q = q.Bind(&response)
Add comment 467 Minus return response, q.Execute(ctx, r.Client)
Add comment 468 Minus }
Add comment 469 Minus
Add comment 470 Minus // Retrieves the list of environment variables passed to commands.
Add comment 471 Minus func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) {
Add comment 472 Minus q := r.Query.Select("envVariables")
Add comment 473 Minus
Add comment 474 Minus q = q.Select("id")
Add comment 475 Minus
Add comment 476 Minus type envVariables struct {
Add comment 477 Minus Id EnvVariableID
Add comment 478 Minus }
Add comment 479 Minus
Add comment 480 Minus convert := func(fields []envVariables) []EnvVariable {
Add comment 481 Minus out := []EnvVariable{}
Add comment 482 Minus
Add comment 483 Minus for i := range fields {
Add comment 484 Minus val := EnvVariable{id: &fields[i].Id}
Add comment 485 Minus val.Query = querybuilder.Query().Select("loadEnvVariableFromID").Arg("id", fields[i].Id)
Add comment 486 Minus val.Client = r.Client
Add comment 487 Minus out = append(out, val)
Add comment 488 Minus }
Add comment 489 Minus
Add comment 490 Minus return out
Add comment 491 Minus }
Add comment 492 Minus var response []envVariables
Add comment 493 Minus
Add comment 494 Minus q = q.Bind(&response)
Add comment 495 Minus
Add comment 496 Minus err := q.Execute(ctx, r.Client)
Add comment 497 Minus if err != nil {
Add comment 498 Minus return nil, err
Add comment 499 Minus }
Add comment 1 Plus /dagger.gen.go linguist-generated
Add comment 2 Plus /internal/dagger/** linguist-generated
Add comment 3 Plus /internal/querybuilder/** linguist-generated
Add comment 4 Plus /internal/telemetry/** linguist-generated
Add comment 5 Plus
Add comment 1 Plus /dagger.gen.go
Add comment 2 Plus /internal/dagger
Add comment 3 Plus /internal/querybuilder
Add comment 4 Plus /internal/telemetry
Add comment 5 Plus
Displayed content is truncated due to maximum viewable content limit.
Add comment 5 import (
Add comment 6 "context"
Add comment 7 "encoding/json"
Add comment 8 Plus "errors"
Add comment 8 9 "fmt"
Add comment 9 Minus "main/dagger"
Add comment 10 Plus "log/slog"
Add comment 10 11 "os"
Add comment 11 Minus )
Add comment 12
Add comment 13 Minus var dag = dagger.Connect()
Add comment 13 Plus "github.com/vektah/gqlparser/v2/gqlerror"
Add comment 14 Plus "go.opentelemetry.io/otel"
Add comment 15 Plus "go.opentelemetry.io/otel/sdk/resource"
Add comment 16 Plus semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
Add comment 17 Plus "go.opentelemetry.io/otel/trace"
Add comment 14 18
Add comment 15 Minus type DaggerObject = dagger.DaggerObject
Add comment 16 Minus
Add comment 17 Minus type ExecError = dagger.ExecError
Add comment 18 Minus
Add comment 19 Minus // The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.
Add comment 20 Minus type CacheVolumeID = dagger.CacheVolumeID
Add comment 21 Minus
Add comment 22 Minus // The `ContainerID` scalar type represents an identifier for an object of type Container.
Add comment 23 Minus type ContainerID = dagger.ContainerID
Add comment 24 Minus
Add comment 25 Minus // The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.
Add comment 26 Minus type CurrentModuleID = dagger.CurrentModuleID
Add comment 27 Minus
Add comment 28 Minus // The `DirectoryID` scalar type represents an identifier for an object of type Directory.
Add comment 29 Minus type DirectoryID = dagger.DirectoryID
Add comment 30 Minus
Add comment 31 Minus // The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.
Add comment 32 Minus type EnvVariableID = dagger.EnvVariableID
Add comment 33 Minus
Add comment 34 Minus // The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.
Add comment 35 Minus type FieldTypeDefID = dagger.FieldTypeDefID
Add comment 36 Minus
Add comment 37 Minus // The `FileID` scalar type represents an identifier for an object of type File.
Add comment 38 Minus type FileID = dagger.FileID
Add comment 39 Minus
Add comment 40 Minus // The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.
Add comment 41 Minus type FunctionArgID = dagger.FunctionArgID
Add comment 42 Minus
Add comment 43 Minus // The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.
Add comment 44 Minus type FunctionCallArgValueID = dagger.FunctionCallArgValueID
Add comment 45 Minus
Add comment 46 Minus // The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.
Add comment 47 Minus type FunctionCallID = dagger.FunctionCallID
Add comment 48 Minus
Add comment 49 Minus // The `FunctionID` scalar type represents an identifier for an object of type Function.
Add comment 50 Minus type FunctionID = dagger.FunctionID
Add comment 51 Minus
Add comment 52 Minus // The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.
Add comment 53 Minus type GeneratedCodeID = dagger.GeneratedCodeID
Add comment 54 Minus
Add comment 55 Minus // The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.
Add comment 56 Minus type GitModuleSourceID = dagger.GitModuleSourceID
Add comment 57 Minus
Add comment 58 Minus // The `GitRefID` scalar type represents an identifier for an object of type GitRef.
Add comment 59 Minus type GitRefID = dagger.GitRefID
Add comment 60 Minus
Add comment 61 Minus // The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.
Add comment 62 Minus type GitRepositoryID = dagger.GitRepositoryID
Add comment 63 Minus
Add comment 64 Minus // The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.
Add comment 65 Minus type InputTypeDefID = dagger.InputTypeDefID
Add comment 66 Minus
Add comment 67 Minus // The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.
Add comment 68 Minus type InterfaceTypeDefID = dagger.InterfaceTypeDefID
Add comment 69 Minus
Add comment 70 Minus // An arbitrary JSON-encoded value.
Add comment 71 Minus type JSON = dagger.JSON
Add comment 72 Minus
Add comment 73 Minus // The `LabelID` scalar type represents an identifier for an object of type Label.
Add comment 74 Minus type LabelID = dagger.LabelID
Add comment 75 Minus
Add comment 76 Minus // The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.
Add comment 77 Minus type ListTypeDefID = dagger.ListTypeDefID
Add comment 78 Minus
Add comment 79 Minus // The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.
Add comment 80 Minus type LocalModuleSourceID = dagger.LocalModuleSourceID
Add comment 81 Minus
Add comment 82 Minus // The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.
Add comment 83 Minus type ModuleDependencyID = dagger.ModuleDependencyID
Add comment 84 Minus
Add comment 85 Minus // The `ModuleID` scalar type represents an identifier for an object of type Module.
Add comment 86 Minus type ModuleID = dagger.ModuleID
Add comment 87 Minus
Add comment 88 Minus // The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.
Add comment 89 Minus type ModuleSourceID = dagger.ModuleSourceID
Add comment 90 Minus
Add comment 91 Minus // The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.
Add comment 92 Minus type ObjectTypeDefID = dagger.ObjectTypeDefID
Add comment 93 Minus
Add comment 94 Minus // The platform config OS and architecture in a Container.
Add comment 95 Minus //
Add comment 96 Minus // The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").
Add comment 97 Minus type Platform = dagger.Platform
Add comment 98 Minus
Add comment 99 Minus // The `PortID` scalar type represents an identifier for an object of type Port.
Add comment 100 Minus type PortID = dagger.PortID
Add comment 101 Minus
Add comment 102 Minus // The `SecretID` scalar type represents an identifier for an object of type Secret.
Add comment 103 Minus type SecretID = dagger.SecretID
Add comment 104 Minus
Add comment 105 Minus // The `ServiceID` scalar type represents an identifier for an object of type Service.
Add comment 106 Minus type ServiceID = dagger.ServiceID
Add comment 107 Minus
Add comment 108 Minus // The `SocketID` scalar type represents an identifier for an object of type Socket.
Add comment 109 Minus type SocketID = dagger.SocketID
Add comment 110 Minus
Add comment 111 Minus // The `TerminalID` scalar type represents an identifier for an object of type Terminal.
Add comment 112 Minus type TerminalID = dagger.TerminalID
Add comment 113 Minus
Add comment 114 Minus // The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.
Add comment 115 Minus type TypeDefID = dagger.TypeDefID
Add comment 116 Minus
Add comment 117 Minus // The absence of a value.
Add comment 118 Minus //
Add comment 119 Minus // A Null Void is used as a placeholder for resolvers that do not return anything.
Add comment 120 Minus type Void = dagger.Void
Add comment 121 Minus
Add comment 122 Minus // Key value object that represents a build argument.
Add comment 123 Minus type BuildArg = dagger.BuildArg
Add comment 124 Minus
Add comment 125 Minus // Key value object that represents a pipeline label.
Add comment 126 Minus type PipelineLabel = dagger.PipelineLabel
Add comment 127 Minus
Add comment 128 Minus // Port forwarding rules for tunneling network traffic.
Add comment 129 Minus type PortForward = dagger.PortForward
Add comment 130 Minus
Add comment 131 Minus // A directory whose contents persist across runs.
Add comment 132 Minus type CacheVolume = dagger.CacheVolume
Add comment 133 Minus
Add comment 134 Minus // An OCI-compatible container, also known as a Docker container.
Add comment 135 Minus type Container = dagger.Container
Add comment 136 Minus
Add comment 137 Minus type WithContainerFunc = dagger.WithContainerFunc
Add comment 138 Minus
Add comment 139 Minus // ContainerAsTarballOpts contains options for Container.AsTarball
Add comment 140 Minus type ContainerAsTarballOpts = dagger.ContainerAsTarballOpts
Add comment 141 Minus
Add comment 142 Minus // ContainerBuildOpts contains options for Container.Build
Add comment 143 Minus type ContainerBuildOpts = dagger.ContainerBuildOpts
Add comment 144 Minus
Add comment 145 Minus // ContainerExportOpts contains options for Container.Export
Add comment 146 Minus type ContainerExportOpts = dagger.ContainerExportOpts
Add comment 147 Minus
Add comment 148 Minus // ContainerImportOpts contains options for Container.Import
Add comment 149 Minus type ContainerImportOpts = dagger.ContainerImportOpts
Add comment 150 Minus
Add comment 151 Minus // ContainerPipelineOpts contains options for Container.Pipeline
Add comment 152 Minus type ContainerPipelineOpts = dagger.ContainerPipelineOpts
Add comment 153 Minus
Add comment 154 Minus // ContainerPublishOpts contains options for Container.Publish
Add comment 155 Minus type ContainerPublishOpts = dagger.ContainerPublishOpts
Add comment 156 Minus
Add comment 157 Minus // ContainerTerminalOpts contains options for Container.Terminal
Add comment 158 Minus type ContainerTerminalOpts = dagger.ContainerTerminalOpts
Add comment 159 Minus
Add comment 160 Minus // ContainerWithDirectoryOpts contains options for Container.WithDirectory
Add comment 161 Minus type ContainerWithDirectoryOpts = dagger.ContainerWithDirectoryOpts
Add comment 162 Minus
Add comment 163 Minus // ContainerWithEntrypointOpts contains options for Container.WithEntrypoint
Add comment 164 Minus type ContainerWithEntrypointOpts = dagger.ContainerWithEntrypointOpts
Add comment 165 Minus
Add comment 166 Minus // ContainerWithEnvVariableOpts contains options for Container.WithEnvVariable
Add comment 167 Minus type ContainerWithEnvVariableOpts = dagger.ContainerWithEnvVariableOpts
Add comment 168 Minus
Add comment 169 Minus // ContainerWithExecOpts contains options for Container.WithExec
Add comment 170 Minus type ContainerWithExecOpts = dagger.ContainerWithExecOpts
Add comment 171 Minus
Add comment 172 Minus // ContainerWithExposedPortOpts contains options for Container.WithExposedPort
Add comment 173 Minus type ContainerWithExposedPortOpts = dagger.ContainerWithExposedPortOpts
Add comment 174 Minus
Add comment 175 Minus // ContainerWithFileOpts contains options for Container.WithFile
Add comment 176 Minus type ContainerWithFileOpts = dagger.ContainerWithFileOpts
Add comment 177 Minus
Add comment 178 Minus // ContainerWithFilesOpts contains options for Container.WithFiles
Add comment 179 Minus type ContainerWithFilesOpts = dagger.ContainerWithFilesOpts
Add comment 180 Minus
Add comment 181 Minus // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache
Add comment 182 Minus type ContainerWithMountedCacheOpts = dagger.ContainerWithMountedCacheOpts
Add comment 183 Minus
Add comment 184 Minus // ContainerWithMountedDirectoryOpts contains options for Container.WithMountedDirectory
Add comment 185 Minus type ContainerWithMountedDirectoryOpts = dagger.ContainerWithMountedDirectoryOpts
Add comment 186 Minus
Add comment 187 Minus // ContainerWithMountedFileOpts contains options for Container.WithMountedFile
Add comment 188 Minus type ContainerWithMountedFileOpts = dagger.ContainerWithMountedFileOpts
Add comment 189 Minus
Add comment 190 Minus // ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret
Add comment 191 Minus type ContainerWithMountedSecretOpts = dagger.ContainerWithMountedSecretOpts
Add comment 192 Minus
Add comment 193 Minus // ContainerWithNewFileOpts contains options for Container.WithNewFile
Add comment 194 Minus type ContainerWithNewFileOpts = dagger.ContainerWithNewFileOpts
Add comment 195 Minus
Add comment 196 Minus // ContainerWithUnixSocketOpts contains options for Container.WithUnixSocket
Add comment 197 Minus type ContainerWithUnixSocketOpts = dagger.ContainerWithUnixSocketOpts
Add comment 198 Minus
Add comment 199 Minus // ContainerWithoutEntrypointOpts contains options for Container.WithoutEntrypoint
Add comment 200 Minus type ContainerWithoutEntrypointOpts = dagger.ContainerWithoutEntrypointOpts
Add comment 201 Minus
Add comment 202 Minus // ContainerWithoutExposedPortOpts contains options for Container.WithoutExposedPort
Add comment 203 Minus type ContainerWithoutExposedPortOpts = dagger.ContainerWithoutExposedPortOpts
Add comment 204 Minus
Add comment 205 Minus // Reflective module API provided to functions at runtime.
Add comment 206 Minus type CurrentModule = dagger.CurrentModule
Add comment 207 Minus
Add comment 208 Minus // CurrentModuleWorkdirOpts contains options for CurrentModule.Workdir
Add comment 209 Minus type CurrentModuleWorkdirOpts = dagger.CurrentModuleWorkdirOpts
Add comment 210 Minus
Add comment 211 Minus // A directory.
Add comment 212 Minus type Directory = dagger.Directory
Add comment 213 Minus
Add comment 214 Minus type WithDirectoryFunc = dagger.WithDirectoryFunc
Add comment 215 Minus
Add comment 216 Minus // DirectoryAsModuleOpts contains options for Directory.AsModule
Add comment 217 Minus type DirectoryAsModuleOpts = dagger.DirectoryAsModuleOpts
Add comment 218 Minus
Add comment 219 Minus // DirectoryDockerBuildOpts contains options for Directory.DockerBuild
Add comment 220 Minus type DirectoryDockerBuildOpts = dagger.DirectoryDockerBuildOpts
Add comment 221 Minus
Add comment 222 Minus // DirectoryEntriesOpts contains options for Directory.Entries
Add comment 223 Minus type DirectoryEntriesOpts = dagger.DirectoryEntriesOpts
Add comment 224 Minus
Add comment 225 Minus // DirectoryPipelineOpts contains options for Directory.Pipeline
Add comment 226 Minus type DirectoryPipelineOpts = dagger.DirectoryPipelineOpts
Add comment 227 Minus
Add comment 228 Minus // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory
Add comment 229 Minus type DirectoryWithDirectoryOpts = dagger.DirectoryWithDirectoryOpts
Add comment 230 Minus
Add comment 231 Minus // DirectoryWithFileOpts contains options for Directory.WithFile
Add comment 232 Minus type DirectoryWithFileOpts = dagger.DirectoryWithFileOpts
Add comment 233 Minus
Add comment 234 Minus // DirectoryWithFilesOpts contains options for Directory.WithFiles
Add comment 235 Minus type DirectoryWithFilesOpts = dagger.DirectoryWithFilesOpts
Add comment 236 Minus
Add comment 237 Minus // DirectoryWithNewDirectoryOpts contains options for Directory.WithNewDirectory
Add comment 238 Minus type DirectoryWithNewDirectoryOpts = dagger.DirectoryWithNewDirectoryOpts
Add comment 239 Minus
Add comment 240 Minus // DirectoryWithNewFileOpts contains options for Directory.WithNewFile
Add comment 241 Minus type DirectoryWithNewFileOpts = dagger.DirectoryWithNewFileOpts
Add comment 242 Minus
Add comment 243 Minus // An environment variable name and value.
Add comment 244 Minus type EnvVariable = dagger.EnvVariable
Add comment 245 Minus
Add comment 246 Minus // A definition of a field on a custom object defined in a Module.
Add comment 247 Minus //
Add comment 248 Minus // A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments).
Add comment 249 Minus type FieldTypeDef = dagger.FieldTypeDef
Add comment 250 Minus
Add comment 251 Minus // A file.
Add comment 252 Minus type File = dagger.File
Add comment 253 Minus
Add comment 254 Minus type WithFileFunc = dagger.WithFileFunc
Add comment 255 Minus
Add comment 256 Minus // FileExportOpts contains options for File.Export
Add comment 257 Minus type FileExportOpts = dagger.FileExportOpts
Add comment 258 Minus
Add comment 259 Minus // Function represents a resolver provided by a Module.
Add comment 260 Minus //
Add comment 261 Minus // A function always evaluates against a parent object and is given a set of named arguments.
Add comment 262 Minus type Function = dagger.Function
Add comment 263 Minus
Add comment 264 Minus type WithFunctionFunc = dagger.WithFunctionFunc
Add comment 265 Minus
Add comment 266 Minus // FunctionWithArgOpts contains options for Function.WithArg
Add comment 267 Minus type FunctionWithArgOpts = dagger.FunctionWithArgOpts
Add comment 268 Minus
Add comment 269 Minus // An argument accepted by a function.
Add comment 270 Minus //
Add comment 271 Minus // This is a specification for an argument at function definition time, not an argument passed at function call time.
Add comment 272 Minus type FunctionArg = dagger.FunctionArg
Add comment 273 Minus
Add comment 274 Minus // An active function call.
Add comment 275 Minus type FunctionCall = dagger.FunctionCall
Add comment 276 Minus
Add comment 277 Minus // A value passed as a named argument to a function call.
Add comment 278 Minus type FunctionCallArgValue = dagger.FunctionCallArgValue
Add comment 279 Minus
Add comment 280 Minus // The result of running an SDK's codegen.
Add comment 281 Minus type GeneratedCode = dagger.GeneratedCode
Add comment 282 Minus
Add comment 283 Minus type WithGeneratedCodeFunc = dagger.WithGeneratedCodeFunc
Add comment 284 Minus
Add comment 285 Minus // Module source originating from a git repo.
Add comment 286 Minus type GitModuleSource = dagger.GitModuleSource
Add comment 287 Minus
Add comment 288 Minus // A git ref (tag, branch, or commit).
Add comment 289 Minus type GitRef = dagger.GitRef
Add comment 290 Minus
Add comment 291 Minus // GitRefTreeOpts contains options for GitRef.Tree
Add comment 292 Minus type GitRefTreeOpts = dagger.GitRefTreeOpts
Add comment 293 Minus
Add comment 294 Minus // A git repository.
Add comment 295 Minus type GitRepository = dagger.GitRepository
Add comment 296 Minus
Add comment 297 Minus // A graphql input type, which is essentially just a group of named args.
Add comment 298 Minus // This is currently only used to represent pre-existing usage of graphql input types
Add comment 299 Minus // in the core API. It is not used by user modules and shouldn't ever be as user
Add comment 300 Minus // module accept input objects via their id rather than graphql input types.
Add comment 301 Minus type InputTypeDef = dagger.InputTypeDef
Add comment 302 Minus
Add comment 303 Minus // A definition of a custom interface defined in a Module.
Add comment 304 Minus type InterfaceTypeDef = dagger.InterfaceTypeDef
Add comment 305 Minus
Add comment 306 Minus // A simple key value object that represents a label.
Add comment 307 Minus type Label = dagger.Label
Add comment 308 Minus
Add comment 309 Minus // A definition of a list type in a Module.
Add comment 310 Minus type ListTypeDef = dagger.ListTypeDef
Add comment 311 Minus
Add comment 312 Minus // Module source that that originates from a path locally relative to an arbitrary directory.
Add comment 313 Minus type LocalModuleSource = dagger.LocalModuleSource
Add comment 314 Minus
Add comment 315 Minus // A Dagger module.
Add comment 316 Minus type Module = dagger.Module
Add comment 317 Minus
Add comment 318 Minus type WithModuleFunc = dagger.WithModuleFunc
Add comment 319 Minus
Add comment 320 Minus // The configuration of dependency of a module.
Add comment 321 Minus type ModuleDependency = dagger.ModuleDependency
Add comment 322 Minus
Add comment 323 Minus // The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.
Add comment 324 Minus type ModuleSource = dagger.ModuleSource
Add comment 325 Minus
Add comment 326 Minus type WithModuleSourceFunc = dagger.WithModuleSourceFunc
Add comment 327 Minus
Add comment 328 Minus // A definition of a custom object defined in a Module.
Add comment 329 Minus type ObjectTypeDef = dagger.ObjectTypeDef
Add comment 330 Minus
Add comment 331 Minus // A port exposed by a container.
Add comment 332 Minus type Port = dagger.Port
Add comment 333 Minus
Add comment 334 Minus // The root of the DAG.
Add comment 335 Minus type Client = dagger.Client
Add comment 336 Minus
Add comment 337 Minus type WithClientFunc = dagger.WithClientFunc
Add comment 338 Minus
Add comment 339 Minus // ContainerOpts contains options for Client.Container
Add comment 340 Minus type ContainerOpts = dagger.ContainerOpts
Add comment 341 Minus
Add comment 342 Minus // DirectoryOpts contains options for Client.Directory
Add comment 343 Minus type DirectoryOpts = dagger.DirectoryOpts
Add comment 344 Minus
Add comment 345 Minus // GitOpts contains options for Client.Git
Add comment 346 Minus type GitOpts = dagger.GitOpts
Add comment 347 Minus
Add comment 348 Minus // HTTPOpts contains options for Client.HTTP
Add comment 349 Minus type HTTPOpts = dagger.HTTPOpts
Add comment 350 Minus
Add comment 351 Minus // ModuleDependencyOpts contains options for Client.ModuleDependency
Add comment 352 Minus type ModuleDependencyOpts = dagger.ModuleDependencyOpts
Add comment 353 Minus
Add comment 354 Minus // ModuleSourceOpts contains options for Client.ModuleSource
Add comment 355 Minus type ModuleSourceOpts = dagger.ModuleSourceOpts
Add comment 356 Minus
Add comment 357 Minus // PipelineOpts contains options for Client.Pipeline
Add comment 358 Minus type PipelineOpts = dagger.PipelineOpts
Add comment 359 Minus
Add comment 360 Minus // A reference to a secret value, which can be handled more safely than the value itself.
Add comment 361 Minus type Secret = dagger.Secret
Add comment 362 Minus
Add comment 363 Minus // A content-addressed service providing TCP connectivity.
Add comment 364 Minus type Service = dagger.Service
Add comment 365 Minus
Add comment 366 Minus // ServiceEndpointOpts contains options for Service.Endpoint
Add comment 367 Minus type ServiceEndpointOpts = dagger.ServiceEndpointOpts
Add comment 368 Minus
Add comment 369 Minus // ServiceStopOpts contains options for Service.Stop
Add comment 370 Minus type ServiceStopOpts = dagger.ServiceStopOpts
Add comment 371 Minus
Add comment 372 Minus // ServiceUpOpts contains options for Service.Up
Add comment 373 Minus type ServiceUpOpts = dagger.ServiceUpOpts
Add comment 374 Minus
Add comment 375 Minus // A Unix or TCP/IP socket that can be mounted into a container.
Add comment 376 Minus type Socket = dagger.Socket
Add comment 377 Minus
Add comment 378 Minus // An interactive terminal that clients can connect to.
Add comment 379 Minus type Terminal = dagger.Terminal
Add comment 380 Minus
Add comment 381 Minus // A definition of a parameter or return type in a Module.
Add comment 382 Minus type TypeDef = dagger.TypeDef
Add comment 383 Minus
Add comment 384 Minus type WithTypeDefFunc = dagger.WithTypeDefFunc
Add comment 385 Minus
Add comment 386 Minus // TypeDefWithFieldOpts contains options for TypeDef.WithField
Add comment 387 Minus type TypeDefWithFieldOpts = dagger.TypeDefWithFieldOpts
Add comment 388 Minus
Add comment 389 Minus // TypeDefWithInterfaceOpts contains options for TypeDef.WithInterface
Add comment 390 Minus type TypeDefWithInterfaceOpts = dagger.TypeDefWithInterfaceOpts
Add comment 391 Minus
Add comment 392 Minus // TypeDefWithObjectOpts contains options for TypeDef.WithObject
Add comment 393 Minus type TypeDefWithObjectOpts = dagger.TypeDefWithObjectOpts
Add comment 394 Minus
Add comment 395 Minus // Sharing mode of the cache volume.
Add comment 396 Minus type CacheSharingMode = dagger.CacheSharingMode
Add comment 397 Minus
Add comment 398 Minus const (
Add comment 399 Minus // Shares the cache volume amongst many build pipelines, but will serialize the writes
Add comment 400 Minus Locked CacheSharingMode = dagger.Locked
Add comment 401 Minus
Add comment 402 Minus // Keeps a cache volume for a single build pipeline
Add comment 403 Minus Private CacheSharingMode = dagger.Private
Add comment 404 Minus
Add comment 405 Minus // Shares the cache volume amongst many build pipelines
Add comment 406 Minus Shared CacheSharingMode = dagger.Shared
Add comment 407 Minus )
Add comment 408 Minus
Add comment 409 Minus // Compression algorithm to use for image layers.
Add comment 410 Minus type ImageLayerCompression = dagger.ImageLayerCompression
Add comment 411 Minus
Add comment 412 Minus const (
Add comment 413 Minus Estargz ImageLayerCompression = dagger.Estargz
Add comment 414 Minus
Add comment 415 Minus Gzip ImageLayerCompression = dagger.Gzip
Add comment 416 Minus
Add comment 417 Minus Uncompressed ImageLayerCompression = dagger.Uncompressed
Add comment 418 Minus
Add comment 419 Minus Zstd ImageLayerCompression = dagger.Zstd
Add comment 420 Minus )
Add comment 421 Minus
Add comment 422 Minus // Mediatypes to use in published or exported image metadata.
Add comment 423 Minus type ImageMediaTypes = dagger.ImageMediaTypes
Add comment 424 Minus
Add comment 425 Minus const (
Add comment 426 Minus Dockermediatypes ImageMediaTypes = dagger.Dockermediatypes
Add comment 427 Minus
Add comment 428 Minus Ocimediatypes ImageMediaTypes = dagger.Ocimediatypes
Add comment 429 Minus )
Add comment 430 Minus
Add comment 431 Minus // The kind of module source.
Add comment 432 Minus type ModuleSourceKind = dagger.ModuleSourceKind
Add comment 433 Minus
Add comment 434 Minus const (
Add comment 435 Minus GitSource ModuleSourceKind = dagger.GitSource
Add comment 436 Minus
Add comment 437 Minus LocalSource ModuleSourceKind = dagger.LocalSource
Add comment 438 Minus )
Add comment 439 Minus
Add comment 440 Minus // Transport layer network protocol associated to a port.
Add comment 441 Minus type NetworkProtocol = dagger.NetworkProtocol
Add comment 442 Minus
Add comment 443 Minus const (
Add comment 444 Minus Tcp NetworkProtocol = dagger.Tcp
Add comment 445 Minus
Add comment 446 Minus Udp NetworkProtocol = dagger.Udp
Add comment 19 Plus "main/internal/dagger"
Add comment 20 Plus "main/internal/querybuilder"
Add comment 21 Plus "main/internal/telemetry"
Add comment 447 22 )
Add comment 448 23
Add comment 449 Minus // Distinguishes the different kinds of TypeDefs.
Add comment 450 Minus type TypeDefKind = dagger.TypeDefKind
Add comment 451 Minus
Add comment 452 Minus const (
Add comment 453 Minus // A boolean value.
Add comment 454 Minus BooleanKind TypeDefKind = dagger.BooleanKind
Add comment 455 Minus
Add comment 456 Minus // A graphql input type, used only when representing the core API via TypeDefs.
Add comment 457 Minus InputKind TypeDefKind = dagger.InputKind
Add comment 458 Minus
Add comment 459 Minus // An integer value.
Add comment 460 Minus IntegerKind TypeDefKind = dagger.IntegerKind
Add comment 24 Plus var dag = dagger.Connect()
Add comment 461 25
Add comment 462 Minus // A named type of functions that can be matched+implemented by other objects+interfaces.
Add comment 463 Minus //
Add comment 464 Minus // Always paired with an InterfaceTypeDef.
Add comment 465 Minus InterfaceKind TypeDefKind = dagger.InterfaceKind
Add comment 26 Plus func Tracer() trace.Tracer {
Add comment 27 Plus return otel.Tracer("dagger.io/sdk.go")
Add comment 28 Plus }
Add comment 466 29
Add comment 467 Minus // A list of values all having the same type.
Add comment 468 Minus //
Add comment 469 Minus // Always paired with a ListTypeDef.
Add comment 470 Minus ListKind TypeDefKind = dagger.ListKind
Add comment 30 Plus // used for local MarshalJSON implementations
Add comment 31 Plus var marshalCtx = context.Background()
Add comment 471 32
Add comment 472 Minus // A named type defined in the GraphQL schema, with fields and functions.
Add comment 473 Minus //
Add comment 474 Minus // Always paired with an ObjectTypeDef.
Add comment 475 Minus ObjectKind TypeDefKind = dagger.ObjectKind
Add comment 33 Plus // called by main()
Add comment 34 Plus func setMarshalContext(ctx context.Context) {
Add comment 35 Plus marshalCtx = ctx
Add comment 36 Plus dagger.SetMarshalContext(ctx)
Add comment 37 Plus }
Add comment 476 38
Add comment 477 Minus // A string value.
Add comment 478 Minus StringKind TypeDefKind = dagger.StringKind
Add comment 39 Plus type DaggerObject = querybuilder.GraphQLMarshaller
Add comment 479 40
Add comment 480 Minus // A special kind used to signify that no value is returned.