Documentation
¶
Overview ¶
Package batch provides common utilities for batch operations across all MCP tools.
This package includes helpers for:
- Parsing parameters that accept both single values and arrays
- Formatting batch results in a consistent structure
- Processing batch operations with Google APIs
- Handling partial failures in batch operations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatResults ¶
FormatResults creates a formatted JSON string from batch results
func ParseStringOrArray ¶
ParseStringOrArray parses a parameter that can be either a single string or an array of strings
Types ¶
type BatchResult ¶
type BatchResult struct {
Total int `json:"total"`
Successful int `json:"successful"`
Failed int `json:"failed"`
Results []Result `json:"results"`
}
BatchResult represents the aggregated results of a batch operation
type Result ¶
type Result struct {
ID string `json:"id"`
Status string `json:"status"` // "success" or "error"
Result string `json:"result,omitempty"`
Error string `json:"error,omitempty"`
}
Result represents the result of a single operation in a batch
func NewErrorResult ¶
NewErrorResult creates an error result
func NewSuccessResult ¶
NewSuccessResult creates a success result
Click to show internal directories.
Click to hide internal directories.