csvexample

package
v0.8.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package csvexample declares an app-owned CSV task with a native artifact tool.

Index

Constants

View Source
const Filename = "converted.csv"

Variables

This section is empty.

Functions

func NewApp

func NewApp(outputDir string) (*agentsdk.Agent, *agentsdk.AgentHandle[Input, Output])

NewApp registers a real hosted task with an explicitly provisioned app-local artifact directory. Models/resources are bound by Airlock, not the factory.

Types

type Input

type Input struct {
	Header []string   `json:"header"`
	Rows   [][]string `json:"rows"`
}

Input supplies already structured table cells, preserving their exact strings.

type Output

type Output struct {
	Filename string `json:"filename"`
	Rows     int    `json:"rows"`
}

Output identifies the artifact and the number of data rows, excluding headers.

func WriteCSV

func WriteCSV(ctx context.Context, outputDir string, in Input) (Output, error)

WriteCSV is deterministic domain work; it has no host/model dependency.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL