### Start Windows VM Service (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Starts the Windows VM as a Dagger service, making it accessible via a web interface on port 8006. This allows you to interact with the Windows environment through your browser after starting the service. ```go // Start Windows VM service windowsService := dag.Windows().Service() windowsService, err := windowsService.Start(ctx) // Access via browser at http://localhost:8006 ``` -------------------------------- ### Start K3S Server and Get Endpoint in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Starts a K3S server as a Dagger service and retrieves its endpoint. This allows other containers to connect to the K3S cluster. ```go // Start K3S server and use it k3s := dag.K3S("test") kServer := k3s.Server() kServer, err := kServer.Start(ctx) if err != nil { return "", err } // Get endpoint for the service ep, err := kServer.Endpoint(ctx, dagger.ServiceEndpointOpts{Port: 80, Scheme: "http"}) ``` -------------------------------- ### Run Multiple Commands in Container with WithCommands (Go) Source: https://github.com/marcosnils/daggerverse/blob/main/utils/README.md Demonstrates how to use the `WithCommands` function to run multiple shell commands concurrently in a Dagger container. This function requires the container to have bash installed and redirects stdout/stderr to a cache volume. The execution stops when the first command exits. ```go c, _ := dag.Utils().WithCommands(dag.Container().From("alpine"). WithExec([]string{"apk", "add", "bash"}), [][]string{ {"sh", "-c", "\"echo hello; sleep 2\""}, {"sh", "-c", "\"echo bye; sleep 5\""}, }) } ``` -------------------------------- ### Make Discord API Calls (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Enables making authenticated API calls to Discord. It supports all standard HTTP methods (GET, POST, PUT, DELETE, etc.) and allows specifying request paths and bodies. Useful for interacting with various Discord features programmatically. ```go // GET request - fetch bot information botInfo, err := dag.Discord(botToken).Call(ctx, dagger.DiscordCallOpts{ Method: "GET", Path: "/users/@me", }, ) // POST request - send a message response, err := dag.Discord(botToken).Call(ctx, dagger.DiscordCallOpts{ Method: "POST", Path: "/channels/123456789/messages", Body: `{"content": "Hello from Dagger!"}`, }, ) ``` -------------------------------- ### Windows Service API Source: https://context7.com/marcosnils/daggerverse/llms.txt Returns the Windows VM as a Dagger service, accessible via a web interface on port 8006 after starting. ```APIDOC ## Windows Service ### Description Returns the Windows VM as a Dagger service accessible via web interface on port 8006. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **ctx** (context.Context) - Required - The context for the operation. ### Request Example ```go // Start Windows VM service windowsService := dag.Windows().Service() windowsService, err := windowsService.Start(ctx) // Access via browser at http://localhost:8006 ``` ### Response #### Success Response - **windowsService** (*Service) - A Dagger Service representing the running Windows VM. ``` -------------------------------- ### Run Multiple Commands Concurrently in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Executes multiple commands concurrently within the same container, stopping when the first command finishes. This is useful for running background services. Requires 'bash' to be installed in the container. ```go // Run multiple background commands in a container c, err := dag.Utils().WithCommands( dag.Container().From("alpine"). WithExec([]string{"apk", "add", "bash"}), [][]string{ {"sh", "-c", "\"echo hello; sleep 2\""}, {"sh", "-c", "\"echo bye; sleep 5\""}, }, ) // Container exits when first command completes // Logs available in /tmp/jobs/0.out, /tmp/jobs/0.err, etc. ``` -------------------------------- ### Query Documents with RAG using OpenAI in Dagger (TypeScript) Source: https://context7.com/marcosnils/daggerverse/llms.txt Performs Retrieval-Augmented Generation (RAG) on documents using an OpenAI model. This TypeScript example queries a PDF and an image file for information. ```typescript // TypeScript: Query documents using RAG const nixPaper = dag.http("https://edolstra.github.io/pubs/nspfssd-lisa2004-final.pdf"); const foxImage = dag.http("https://fsquaredmarketing.com/wp-content/uploads/2024/04/bitter-font.png"); const answer = await dag.gptools().rag( openaiApiKey, dag.directory() .withFile("nix-paper.pdf", nixPaper) .withFile("image.png", foxImage), "What is Nix and how does it work?" ); ``` -------------------------------- ### Get K3S Cluster Kubeconfig in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Retrieves the kubeconfig file for a K3S cluster. The `local=true` option is used for accessing the cluster from the host machine. ```go // Get kubeconfig for use in containers k3s := dag.K3S("test") configFile := k3s.Config() // For container use // Get kubeconfig for local access (localhost:6443) localConfig := k3s.Config(ctx, true) ``` -------------------------------- ### Discord Call API Source: https://context7.com/marcosnils/daggerverse/llms.txt Makes authenticated API calls to the Discord API, supporting all standard HTTP methods (GET, POST, PUT, DELETE, etc.). ```APIDOC ## Discord Call ### Description Makes authenticated API calls to the Discord API, supporting all HTTP methods. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **ctx** (context.Context) - Required - The context for the operation. - **opts** (dagger.DiscordCallOpts) - Required - Options for the API call. - **Method** (string) - Required - The HTTP method (e.g., "GET", "POST"). - **Path** (string) - Required - The API path relative to the Discord API base URL. - **Body** (string) - Optional - The request body for POST/PUT requests. ### Request Example ```go // GET request - fetch bot information botInfo, err := dag.Discord(botToken).Call(ctx, dagger.DiscordCallOpts{ Method: "GET", Path: "/users/@me", }, ) // POST request - send a message response, err := dag.Discord(botToken).Call(ctx, dagger.DiscordCallOpts{ Method: "POST", Path: "/channels/123456789/messages", Body: `{"content": "Hello from Dagger!"}`, }, ) ``` ### Response #### Success Response - **response** (string) - The response from the Discord API, typically in JSON format. ``` -------------------------------- ### Get K3s Terminal UI (k9s) Container in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Provides a Dagger container with the k9s terminal UI for interactive management of the K3S cluster. Use with `WithDefaultTerminalCmd` for interactive sessions. ```go // Get interactive k9s terminal k9sContainer := dag.K3S("test").Kns(ctx) // Use with WithDefaultTerminalCmd for interactive sessions ``` -------------------------------- ### Create Ghostty Build Environment (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Initializes a Ghostty build environment. You can use default settings (latest tip, Zig 0.13.0, latest Ubuntu) or specify custom versions for Ghostty, Zig, and Ubuntu. This environment is used for building the Ghostty terminal emulator. ```go // Initialize Ghostty builder ghostty := dag.Ghostty() // Uses defaults: tip, zig 0.13.0, ubuntu latest // With custom configuration ghostty := dag.Ghostty(dagger.GhosttyOpts{ GhosttyTag: "v1.0.0", ZigVersion: "0.13.0", UbuntuVersion: "22.04", }) ``` -------------------------------- ### Create Windows VM Container (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Provisions a Windows virtual machine container. You can use default settings (Windows 11, 4GB RAM, 2 CPUs, 64GB disk) or customize resources like the Windows version, RAM, CPU count, and disk size. ```go // Create Windows VM with defaults (win11, 4GB RAM, 2 CPU, 64GB disk) windows := dag.Windows() // Custom configuration windows := dag.Windows(dagger.WindowsOpts{ Version: "win10", Ram: "8G", Cpu: "4", Disk: "128G", }) ``` -------------------------------- ### Initialize Discord Client (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a new Discord client instance. Authentication is handled using a bot token, which should be provided as a secret. This client is used for making subsequent authenticated calls to the Discord API. ```go // Initialize Discord client discord := dag.Discord(botTokenSecret) ``` -------------------------------- ### Build Ghostty Binary (Go, Shell) Source: https://context7.com/marcosnils/daggerverse/llms.txt Builds the Ghostty terminal emulator from source within a configured environment and returns the compiled binary. The binary can then be exported to a local file. This is useful for deploying or running Ghostty. ```go // Build Ghostty binary binary := dag.Ghostty().Binary() // Export the binary binary.Export(ctx, "./ghostty") ``` ```shell # Build Ghostty from CLI dagger download -m github.com/marcosnils/daggerverse/ghostty binary -o ghostty ``` -------------------------------- ### Ask YouTube Video Questions with YtChat (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt The YtChat function allows you to ask questions about a YouTube video. It downloads the video, transcribes its content using OpenAI Whisper, and then runs Retrieval-Augmented Generation (RAG) on the transcript to answer your questions. Requires an OpenAI API key. ```go // Ask questions about a YouTube video answer, err := dag.GPTools().YtChat( openaiApiKey, "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "What is this video about?", ) ``` -------------------------------- ### Ghostty New API Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a Ghostty build environment, allowing configuration of the Zig version and Ubuntu base image. ```APIDOC ## Ghostty New ### Description Creates a Ghostty build environment with configurable Zig version and Ubuntu base. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **opts** (dagger.GhosttyOpts) - Optional - Options to configure the Ghostty build environment. - **GhosttyTag** (string) - Optional - The specific tag of Ghostty to use. - **ZigVersion** (string) - Optional - The desired Zig compiler version. - **UbuntuVersion** (string) - Optional - The desired Ubuntu base image version. ### Request Example ```go // Initialize Ghostty builder with defaults ghostty := dag.Ghostty() // Uses defaults: tip, zig 0.13.0, ubuntu latest // With custom configuration ghostty := dag.Ghostty(dagger.GhosttyOpts{ GhosttyTag: "v1.0.0", ZigVersion: "0.13.0", UbuntuVersion: "22.04", }) ``` ### Response #### Success Response - **ghostty** (*GhosttyBuilder) - A Ghostty builder instance. ``` -------------------------------- ### Extract Audio from YouTube Video (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt This function extracts the audio track from a YouTube video and saves it as an MP3 file. It takes the YouTube video URL as input and returns a file object containing the MP3 audio. ```go // Download audio from YouTube audioFile := dag.GPTools().Audio("https://www.youtube.com/watch?v=dQw4w9WgXcQ") // Returns *File containing the MP3 audio ``` -------------------------------- ### Windows New API Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a Windows virtual machine container with configurable resources such as version, RAM, CPU, and disk size. ```APIDOC ## Windows New ### Description Creates a Windows virtual machine container with configurable resources. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **opts** (dagger.WindowsOpts) - Optional - Options to configure the Windows VM. - **Version** (string) - Optional - The Windows version (e.g., "win11", "win10"). Defaults to "win11". - **Ram** (string) - Optional - The amount of RAM (e.g., "4G", "8G"). Defaults to "4G". - **Cpu** (string) - Optional - The number of CPU cores (e.g., "2", "4"). Defaults to "2". - **Disk** (string) - Optional - The disk size (e.g., "64G", "128G"). Defaults to "64G". ### Request Example ```go // Create Windows VM with defaults (win11, 4GB RAM, 2 CPU, 64GB disk) windows := dag.Windows() // Custom configuration windows := dag.Windows(dagger.WindowsOpts{ Version: "win10", Ram: "8G", Cpu: "4", Disk: "128G", }) ``` ### Response #### Success Response - **windows** (*WindowsVM) - A Windows VM instance. ``` -------------------------------- ### Create K3S Cluster Instance in Dagger (Shell) Source: https://context7.com/marcosnils/daggerverse/llms.txt Initializes a new K3S cluster instance using the Dagger CLI. This command allows for basic cluster creation with a specified name. ```shell # Initialize a new K3S cluster from CLI dagger call -m github.com/marcosnils/daggerverse/k3s new --name my-cluster ``` -------------------------------- ### Ghostty Binary API Source: https://context7.com/marcosnils/daggerverse/llms.txt Builds the Ghostty terminal emulator from source code and returns the compiled binary as a Dagger File. ```APIDOC ## Ghostty Binary ### Description Builds the Ghostty terminal emulator from source and returns the compiled binary. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters None ### Request Example ```go // Build Ghostty binary binary := dag.Ghostty().Binary() // Export the binary binary.Export(ctx, "./ghostty") ``` ```shell # Build Ghostty from CLI dagger download -m github.com/marcosnils/daggerverse/ghostty binary -o ghostty ``` ### Response #### Success Response - **binary** (*File) - A Dagger File object containing the compiled Ghostty binary. ``` -------------------------------- ### Query Documents with RAG using OpenAI in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Executes a Retrieval-Augmented Generation (RAG) process on documents using an OpenAI model via the Dagger SDK for Go. It takes an OpenAI API key, a directory of documents, and a query as input. ```go // Go: Query documents using RAG answer, err := dag.GPTools().RAG( openaiApiKey, dag.Directory().WithFile("docs.pdf", pdfFile), "What are the main features described?", ) ``` -------------------------------- ### Create K3S Cluster Instance in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a K3S cluster instance programmatically using the Dagger SDK for Go. Supports custom options for image, state persistence, Traefik, and debug logging. ```go // Create a K3S cluster in Go k3s := dag.K3S("my-cluster") // With custom options k3s := dag.K3S("my-cluster", dagger.K3SOpts{ Image: "rancher/k3s:v1.28.0", KeepState: true, EnableTraefik: false, Debug: true, }, ) ``` -------------------------------- ### Run Kubectl Commands Against K3S in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Executes kubectl commands against a K3S cluster managed by Dagger. It returns a configured container ready to run kubectl operations and can also deploy Helm charts. ```go // Run kubectl commands result := dag.K3S("test").Kubectl("get pods -A") output, err := result.Stdout(ctx) // Deploy a helm chart with kubectl dag.Container().From("alpine/helm"). WithExec([]string{"apk", "add", "kubectl"}). WithEnvVariable("KUBECONFIG", "/.kube/config"). WithFile("/.kube/config", k3s.Config()). WithExec([]string{"helm", "upgrade", "--install", "--force", "--wait", "nginx", "oci://registry-1.docker.io/bitnamicharts/nginx"}) ``` -------------------------------- ### YtChat API Source: https://context7.com/marcosnils/daggerverse/llms.txt Allows asking questions about a YouTube video by downloading, transcribing, and running RAG on the transcript. Requires an OpenAI API key. ```APIDOC ## YtChat ### Description Asks questions about a YouTube video by downloading, transcribing, and running RAG on the transcript. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **openaiApiKey** (string) - Required - The OpenAI API key for transcription and RAG. - **videoUrl** (string) - Required - The URL of the YouTube video. - **question** (string) - Required - The question to ask about the video. ### Request Example ```go answer, err := dag.GPTools().YtChat( openaiApiKey, "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "What is this video about?", ) ``` ### Response #### Success Response - **answer** (string) - The answer to the question based on the video transcript. - **err** (error) - An error object if the operation fails. ``` -------------------------------- ### Audio Extraction API Source: https://context7.com/marcosnils/daggerverse/llms.txt Extracts audio from a YouTube video and returns it as an MP3 file. ```APIDOC ## Audio Extraction ### Description Extracts audio from a YouTube video as an MP3 file. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **videoUrl** (string) - Required - The URL of the YouTube video. ### Request Example ```go // Download audio from YouTube audioFile := dag.GPTools().Audio("https://www.youtube.com/watch?v=dQw4w9WgXcQ") // Returns *File containing the MP3 audio ``` ### Response #### Success Response - **audioFile** (*File) - A Dagger File object containing the extracted MP3 audio. ``` -------------------------------- ### Generate Video Transcript (TypeScript, Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt This functionality converts audio or video files into text transcripts using OpenAI Whisper. It can process files from HTTP URLs or local host directories. The output is the text content of the transcript. ```typescript // Get transcript from a video file const video = dag.http("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4"); const transcript = await dag.gptools().transcript(video).contents(); ``` ```go // Go: Get transcript from audio file audioFile := dag.HTTP("https://example.com/audio.mp3") transcriptFile := dag.GPTools().Transcript(audioFile) transcriptText, err := transcriptFile.Contents(ctx) ``` -------------------------------- ### Discord New API Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a new Discord client instance, enabling authenticated interactions with the Discord API using a bot token. ```APIDOC ## Discord New ### Description Creates a new Discord client instance with bot token authentication. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **botTokenSecret** (*Secret) - Required - A Dagger Secret containing the Discord bot token. ### Request Example ```go // Initialize Discord client discord := dag.Discord(botTokenSecret) ``` ### Response #### Success Response - **discord** (*DiscordClient) - An initialized Discord client instance. ``` -------------------------------- ### Stitch Videos Together (Shell, Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt The Stitch function concatenates multiple MP4 files located in a specified directory into a single output video file. It utilizes ffmpeg for the video processing. Ensure the source directory contains only MP4 files. ```shell # Stitch videos from CLI dagger download -m github.com/marcosnils/daggerverse/videostitch@main stitch --src-dir . ``` ```go // Stitch multiple videos in Go srcDir := dag.Host().Directory("./videos") // Directory containing .mp4 files outputVideo, err := dag.Videostitch().Stitch(ctx, srcDir) if err != nil { // Handle error - e.g., "no mp4 files found to process" return err } // outputVideo is a *File containing the concatenated video outputVideo.Export(ctx, "./output.mp4") ``` -------------------------------- ### Transcript API Source: https://context7.com/marcosnils/daggerverse/llms.txt Converts audio or video files to text transcripts using OpenAI Whisper. Supports various input formats. ```APIDOC ## Transcript ### Description Converts audio/video files to text transcripts using OpenAI Whisper. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **input** (*File or URL) - Required - The audio or video file to transcribe. ### Request Example ```typescript // Get transcript from a video file const video = dag.http("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/TearsOfSteel.mp4"); const transcript = await dag.gptools().transcript(video).contents(); ``` ```go // Go: Get transcript from audio file audioFile := dag.HTTP("https://example.com/audio.mp3") transcriptFile := dag.GPTools().Transcript(audioFile) transcriptText, err := transcriptFile.Contents(ctx) ``` ### Response #### Success Response - **transcript** (string) - The transcribed text content of the audio/video file. ``` -------------------------------- ### Create Dapr Sidecar (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a Dapr sidecar container, essential for enabling Dapr's service mesh capabilities. It requires an application ID and can be configured with options like app port, channel address, and component definitions. The sidecar can be integrated with other Dagger services. ```go // Create Dapr sidecar daprSidecar := dag.Dapr().Dapr(ctx, "my-app", // appId dagger.DaprDaprOpts{ AppPort: intPtr(8080), AppChannelAddress: strPtr("localhost"), ComponentsPath: dag.Host().Directory("./components"), }, ) // Use as a service binding myApp := dag.Container().From("my-app:latest"). WithServiceBinding("dapr", daprSidecar.AsService()) ``` -------------------------------- ### Videostitch Stitch API Source: https://context7.com/marcosnils/daggerverse/llms.txt Concatenates multiple MP4 files from a specified directory into a single output video using ffmpeg. ```APIDOC ## Videostitch Stitch ### Description Concatenates multiple MP4 files from a directory into a single output video using ffmpeg. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **srcDir** (*Directory) - Required - A Dagger Directory containing the MP4 files to stitch. ### Request Example ```shell # Stitch videos from CLI dagger download -m github.com/marcosnils/daggerverse/videostitch@main stitch --src-dir . ``` ```go // Stitch multiple videos in Go srcDir := dag.Host().Directory("./videos") // Directory containing .mp4 files outputVideo, err := dag.Videostitch().Stitch(ctx, srcDir) if err != nil { // Handle error - e.g., "no mp4 files found to process" return err } // outputVideo is a *File containing the concatenated video outputVideo.Export(ctx, "./output.mp4") ``` ### Response #### Success Response - **outputVideo** (*File) - A Dagger File object containing the concatenated video. ``` -------------------------------- ### Inject Environment Variables from Secret in Dagger (Go) Source: https://context7.com/marcosnils/daggerverse/llms.txt Injects environment variables into a container from a Dagger secret. The secret must contain newline-separated KEY=VALUE pairs. ```go // Load environment variables from a secret envSecret := dag.SetSecret("env-vars", "DB_HOST=localhost\nDB_PORT=5432\nAPI_KEY=secret123") container := dag.Utils().WithEnvVariables(ctx, dag.Container().From("alpine"), envSecret, ) // Container now has DB_HOST, DB_PORT, and API_KEY environment variables set ``` -------------------------------- ### DID Resolve API Source: https://context7.com/marcosnils/daggerverse/llms.txt Resolves a Decentralized Identifier (DID) and returns its corresponding DID document as JSON using the QuarkID resolver. ```APIDOC ## DID Resolve ### Description Resolves a Decentralized Identifier (DID) and returns the DID document as JSON using the QuarkID resolver. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **did** (string) - Required - The Decentralized Identifier to resolve. ### Request Example ```typescript // Resolve a DID to its document const didDocument = await dag.did().resolve("did:web:example.com"); console.log(didDocument); // JSON string with DID document ``` ```shell # Resolve DID from CLI dagger call -m github.com/marcosnils/daggerverse/did resolve --did "did:web:example.com" ``` ### Response #### Success Response - **didDocument** (string) - A JSON string representing the DID document. ``` -------------------------------- ### Resolve Decentralized Identifier (DID) (TypeScript, Shell) Source: https://context7.com/marcosnils/daggerverse/llms.txt This module resolves a Decentralized Identifier (DID) to its corresponding DID document. It uses the QuarkID resolver to fetch the document, which is returned as a JSON string. Supports both programmatic and CLI access. ```typescript // Resolve a DID to its document const didDocument = await dag.did().resolve("did:web:example.com"); console.log(didDocument); // JSON string with DID document ``` ```shell # Resolve DID from CLI dagger call -m github.com/marcosnils/daggerverse/did resolve --did "did:web:example.com" ``` -------------------------------- ### Dapr Dapr API Source: https://context7.com/marcosnils/daggerverse/llms.txt Creates a Dapr sidecar container, enabling service mesh capabilities such as service invocation, state management, and pub/sub. ```APIDOC ## Dapr Dapr ### Description Creates a Dapr sidecar container for service mesh capabilities including service invocation, state management, and pub/sub. ### Method Not specified (likely a function call within Dagger) ### Endpoint N/A (Function call) ### Parameters - **ctx** (context.Context) - Required - The context for the operation. - **appId** (string) - Required - The unique identifier for the application. - **opts** (dagger.DaprDaprOpts) - Optional - Options to configure the Dapr sidecar. - **AppPort** (int) - Optional - The port the application is listening on. - **AppChannelAddress** (string) - Optional - The address for the application's channel. - **ComponentsPath** (*Directory) - Optional - A Dagger Directory containing Dapr components configuration. ### Request Example ```go // Create Dapr sidecar daprSidecar := dag.Dapr().Dapr(ctx, "my-app", // appId dagger.DaprDaprOpts{ AppPort: intPtr(8080), AppChannelAddress: strPtr("localhost"), ComponentsPath: dag.Host().Directory("./components"), }, ) // Use as a service binding myApp := dag.Container().From("my-app:latest"). WithServiceBinding("dapr", daprSidecar.AsService()) ``` ### Response #### Success Response - **daprSidecar** (*Service) - A Dagger Service representing the Dapr sidecar. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.