Documentation
¶
Index ¶
- func ExecutionResultTypeStrings() []string
- type ExecutionResult
- func NewFTPResult(result *FileResult, durationMs int64, err error) *ExecutionResult
- func NewGitResult(result *FileResult, durationMs int64, err error) *ExecutionResult
- func NewHTTPResult(result *HTTPResult, durationMs int64, err error) *ExecutionResult
- func NewMongoDBResult(result *MongoDBResult, durationMs int64, err error) *ExecutionResult
- func NewObjectRowsResult(vendorType string, result *ObjectRowsResult, durationMs int64, err error) *ExecutionResult
- func NewS3Result(result *FileResult, durationMs int64, err error) *ExecutionResult
- func NewSQLResult(vendorType string, result *SQLResult, durationMs int64, err error) *ExecutionResult
- func NewWorkspaceFileResult(r *FileResult, durationMs int64, err error) *ExecutionResult
- func (r *ExecutionResult) CheckResponseSize(limit int64) error
- func (r *ExecutionResult) Clone() *ExecutionResult
- func (r *ExecutionResult) DurationMs() int64
- func (r *ExecutionResult) Error() error
- func (r *ExecutionResult) FTP() (*FileResult, bool)
- func (r *ExecutionResult) File() (*FileResult, bool)
- func (r *ExecutionResult) Git() (*FileResult, bool)
- func (r *ExecutionResult) HTTP() (*HTTPResult, bool)
- func (r *ExecutionResult) IsSuccess() bool
- func (r *ExecutionResult) MarshalJSON() ([]byte, error)
- func (r *ExecutionResult) MongoDB() (*MongoDBResult, bool)
- func (r *ExecutionResult) ObjectRows() (*ObjectRowsResult, bool)
- func (r *ExecutionResult) S3() (*FileResult, bool)
- func (r *ExecutionResult) SQL() (*SQLResult, bool)
- func (r *ExecutionResult) Type() ExecutionResultType
- func (r *ExecutionResult) UnmarshalJSON(data []byte) error
- func (r *ExecutionResult) VendorType() string
- type ExecutionResultType
- type FileResult
- type HTTPResult
- type MongoDBResult
- type ObjectRowsResult
- type ResponseBudget
- type SQLResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecutionResultTypeStrings ¶
func ExecutionResultTypeStrings() []string
ExecutionResultTypeStrings returns a slice of all String values of the enum
Types ¶
type ExecutionResult ¶
type ExecutionResult struct {
// contains filtered or unexported fields
}
ExecutionResult is a discriminated union containing execution results from connector types. Only one typed payload field will be non-nil.
func NewFTPResult ¶
func NewFTPResult(result *FileResult, durationMs int64, err error) *ExecutionResult
func NewGitResult ¶
func NewGitResult(result *FileResult, durationMs int64, err error) *ExecutionResult
func NewHTTPResult ¶
func NewHTTPResult(result *HTTPResult, durationMs int64, err error) *ExecutionResult
func NewMongoDBResult ¶
func NewMongoDBResult(result *MongoDBResult, durationMs int64, err error) *ExecutionResult
func NewObjectRowsResult ¶
func NewObjectRowsResult( vendorType string, result *ObjectRowsResult, durationMs int64, err error, ) *ExecutionResult
func NewS3Result ¶
func NewS3Result(result *FileResult, durationMs int64, err error) *ExecutionResult
func NewSQLResult ¶
func NewSQLResult( vendorType string, result *SQLResult, durationMs int64, err error, ) *ExecutionResult
Constructor functions
func NewWorkspaceFileResult ¶
func NewWorkspaceFileResult(r *FileResult, durationMs int64, err error) *ExecutionResult
func (*ExecutionResult) CheckResponseSize ¶
func (r *ExecutionResult) CheckResponseSize(limit int64) error
CheckResponseSize counts row payloads individually so the final check never allocates a second complete SQL or MongoDB result.
func (*ExecutionResult) Clone ¶
func (r *ExecutionResult) Clone() *ExecutionResult
Clone returns a deep copy of the execution result.
func (*ExecutionResult) DurationMs ¶
func (r *ExecutionResult) DurationMs() int64
func (*ExecutionResult) Error ¶
func (r *ExecutionResult) Error() error
func (*ExecutionResult) FTP ¶
func (r *ExecutionResult) FTP() (*FileResult, bool)
func (*ExecutionResult) File ¶
func (r *ExecutionResult) File() (*FileResult, bool)
File returns the shared file-shaped payload used by FTP, Git, and S3 results. Call FTP, Git, or S3 when the caller needs to preserve the exact execution family.
func (*ExecutionResult) Git ¶
func (r *ExecutionResult) Git() (*FileResult, bool)
func (*ExecutionResult) HTTP ¶
func (r *ExecutionResult) HTTP() (*HTTPResult, bool)
func (*ExecutionResult) IsSuccess ¶
func (r *ExecutionResult) IsSuccess() bool
func (*ExecutionResult) MarshalJSON ¶
func (r *ExecutionResult) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler for storage.
func (*ExecutionResult) MongoDB ¶
func (r *ExecutionResult) MongoDB() (*MongoDBResult, bool)
func (*ExecutionResult) ObjectRows ¶
func (r *ExecutionResult) ObjectRows() (*ObjectRowsResult, bool)
func (*ExecutionResult) S3 ¶
func (r *ExecutionResult) S3() (*FileResult, bool)
func (*ExecutionResult) SQL ¶
func (r *ExecutionResult) SQL() (*SQLResult, bool)
Type-safe accessors - return (payload, true) if type matches, (nil, false) otherwise
func (*ExecutionResult) Type ¶
func (r *ExecutionResult) Type() ExecutionResultType
Metadata accessors
func (*ExecutionResult) UnmarshalJSON ¶
func (r *ExecutionResult) UnmarshalJSON(data []byte) error
UnmarshalJSON restores the discriminated result envelope used by persisted worker execution responses. Error text is carried only inside the encrypted response payload; callers must not log the raw envelope.
func (*ExecutionResult) VendorType ¶
func (r *ExecutionResult) VendorType() string
type ExecutionResultType ¶
type ExecutionResultType int
ExecutionResultType identifies which connector type produced the result.
const ( ExecutionResultTypeUnknown ExecutionResultType = iota ExecutionResultTypeSQL ExecutionResultTypeMongoDB ExecutionResultTypeHTTP ExecutionResultTypeObjectRows ExecutionResultTypeFTP ExecutionResultTypeGit ExecutionResultTypeS3 ExecutionResultTypeWorkspaceFile )
func ExecutionResultTypeString ¶
func ExecutionResultTypeString(s string) (ExecutionResultType, error)
ExecutionResultTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ExecutionResultTypeValues ¶
func ExecutionResultTypeValues() []ExecutionResultType
ExecutionResultTypeValues returns all values of the enum
func (ExecutionResultType) IsAExecutionResultType ¶
func (i ExecutionResultType) IsAExecutionResultType() bool
IsAExecutionResultType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ExecutionResultType) MarshalJSON ¶
func (i ExecutionResultType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for ExecutionResultType
func (ExecutionResultType) String ¶
func (i ExecutionResultType) String() string
func (*ExecutionResultType) UnmarshalJSON ¶
func (i *ExecutionResultType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ExecutionResultType
type FileResult ¶
type FileResult struct {
ResourceID string `json:"file_id,omitempty"`
Name string `json:"name,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Rows []map[string]any `json:"rows"`
ColumnNames []string `json:"column_names"`
RowCount int `json:"row_count"`
Format string `json:"format"`
IsHeadlessCSV bool `json:"is_headless_csv,omitempty"`
IsHeadlessSpreadsheet bool `json:"is_headless_spreadsheet,omitempty"`
Sheet string `json:"sheet,omitempty"`
Range string `json:"range,omitempty"`
Operation string `json:"operation,omitempty"`
TargetPath string `json:"target_path,omitempty"`
File *filepayload.FilePayloadMetadata `json:"file,omitempty"`
Reference *filepayload.Reference `json:"-"`
Content []byte `json:"-"`
WrittenBytes *int `json:"written_bytes,omitempty"`
WrittenRows *int `json:"written_rows,omitempty"`
}
FileResult contains data from FTP and Git file read/write execution.
type HTTPResult ¶
type HTTPResult struct {
StatusCode int `json:"status_code"`
Headers map[string]string `json:"headers"`
Body json.RawMessage `json:"body,omitempty"`
File *filepayload.FilePayloadMetadata `json:"file,omitempty"`
Reference *filepayload.Reference `json:"-"`
RawBody []byte `json:"-"`
PaginationRecordCount *int `json:"-"`
}
HTTPResult contains data from HTTP request execution.
func (*HTTPResult) RowCount ¶
func (r *HTTPResult) RowCount() int
RowCount counts selected pagination records or the ordinary top-level response.
type MongoDBResult ¶
type MongoDBResult struct {
OperationType string `json:"operation_type"` // "find", "insert_one", etc.
// Result fields - populated based on operation type
Documents []map[string]any `json:"documents"`
DocumentCount *int `json:"document_count,omitempty"`
InsertedID any `json:"inserted_id,omitempty"`
InsertedIDs []any `json:"inserted_ids,omitempty"` // For insert_many
InsertedCount *int64 `json:"inserted_count,omitempty"` // For insert_many
MatchedCount *int64 `json:"matched_count,omitempty"`
ModifiedCount *int64 `json:"modified_count,omitempty"`
DeletedCount *int64 `json:"deleted_count,omitempty"`
UpsertedID any `json:"upserted_id,omitempty"`
UpsertedCount *int64 `json:"upserted_count,omitempty"`
}
MongoDBResult contains data from MongoDB operation execution.
type ObjectRowsResult ¶
type ObjectRowsResult struct {
ObjectType string `json:"object_type"`
Operation string `json:"operation,omitempty"`
Rows []map[string]any `json:"rows"`
ColumnNames []string `json:"column_names"`
RowCount int `json:"row_count"`
NextCursor *string `json:"next_cursor,omitempty"`
HasMore bool `json:"has_more"`
ProviderMetadata map[string]any `json:"provider_metadata,omitempty"`
}
ObjectRowsResult contains row-normalized object API operation output.
type ResponseBudget ¶
type ResponseBudget struct {
// contains filtered or unexported fields
}
ResponseBudget bounds retained connector output before appending another value.
func NewResponseBudget ¶
func NewResponseBudget(limit int64) *ResponseBudget
func (*ResponseBudget) Charge ¶
func (b *ResponseBudget) Charge(size int64) error
func (*ResponseBudget) ChargeJSON ¶
func (b *ResponseBudget) ChargeJSON(value any) error
func (*ResponseBudget) Check ¶
func (b *ResponseBudget) Check(size int64) error
type SQLResult ¶
type SQLResult struct {
Rows []map[string]any `json:"rows"`
ColumnNames []string `json:"column_names"`
RowCount int `json:"row_count"`
LastInsertID *int64 `json:"last_insert_id,omitempty"`
File *filepayload.FilePayloadMetadata `json:"file,omitempty"`
Reference *filepayload.Reference `json:"-"`
}
SQLResult contains data from SQL query execution.