feedextract

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource struct {
	types.DataSource `json:",inline" yaml:",inline"`
	Source           string            `json:"source,omitempty" yaml:"source,omitempty"`
	Name             string            `json:"name,omitempty" yaml:"name,omitempty"`
	Merge            string            `json:"merge,omitempty" yaml:"merge,omitempty"`
	Inputs           []string          `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	ExposeAs         string            `json:"exposeAs,omitempty" yaml:"exposeAs,omitempty"`
	Root             bool              `json:"root,omitempty" yaml:"root,omitempty"`
	Derive           map[string]string `json:"derive,omitempty" yaml:"derive,omitempty"`
}

DataSource extends Forge's datasource model with feed extraction fields.

type Input

type Input struct {
	Spec             *Spec
	RequestPayloads  []string
	ResponsePayloads []string
}

Input carries raw request/response payloads for generalized extraction.

type Result

type Result struct {
	DataSources map[string]interface{} `json:"dataSources,omitempty"`
	RootName    string                 `json:"rootName,omitempty"`
	RootData    map[string]interface{} `json:"rootData,omitempty"`
	ItemCount   int                    `json:"itemCount,omitempty"`
}

Result contains resolved datasource values plus a normalized rootData projection used by the SDK feed payload shape.

func Extract

func Extract(input *Input) (*Result, error)

Extract executes generalized datasource extraction against raw tool payloads.

type Spec

type Spec struct {
	ID          string                 `json:"id,omitempty" yaml:"id,omitempty"`
	DataSources map[string]*DataSource `json:"dataSources,omitempty" yaml:"dataSources,omitempty"`
	CountSource string                 `json:"countSource,omitempty" yaml:"countSource,omitempty"`
}

Spec defines a generalized feed extraction plan.

Jump to

Keyboard shortcuts

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