Help us shape the future of Go! Take the 2026 Go Developer Survey

tool

package
v0.1.58 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RewriteContainerDataSourceRefs

func RewriteContainerDataSourceRefs(c types.Container, nameMap map[string]string) types.Container

Types

type ActivationSpec

type ActivationSpec struct {
	Kind    string                 `yaml:"kind,omitempty" json:"kind,omitempty"`
	Scope   string                 `yaml:"scope,omitempty" json:"scope,omitempty"`
	Service string                 `yaml:"service,omitempty" json:"service,omitempty"`
	Method  string                 `yaml:"method,omitempty" json:"method,omitempty"`
	Args    map[string]interface{} `yaml:"args,omitempty" json:"args,omitempty"`
}

type DataFeed

type DataFeed struct {
	Name        string      `json:"name" yaml:"name"`
	Data        interface{} `json:"data" yaml:"data"`
	RawSelector string      `json:"rawSelector" yaml:"rawSelector"`
}

DataFeed carries resolved value and the raw selector used to obtain it.

type DataSource

type DataSource struct {
	types.DataSource `yaml:",inline"`
	Source           string `json:"source" yaml:"source"`
	Name             string `json:"name" yaml:"name"`
}

func (*DataSource) HasSource

func (d *DataSource) HasSource() bool

type DataSources

type DataSources map[string]*DataSource

func (DataSources) FeedDataSource

func (s DataSources) FeedDataSource() (*DataSource, error)

func (DataSources) Normalize

func (s DataSources) Normalize() map[string]*types.DataSource

func (DataSources) Transform

func (s DataSources) Transform(hash string) (map[string]*types.DataSource, map[string]string)

type Feed

type Feed struct {
	ID string `json:"id" yaml:"id"`

	Data DataFeed `json:"dataFeed" yaml:"dataFeed"`

	UI *types.Container `json:"ui" yaml:"ui"`

	DataSources map[string]*types.DataSource `yaml:"dataSources,omitempty" json:"dataSources,omitempty"`

	Invoked bool `json:"-" yaml:"-"`
}

Feed describes a matched rule and extracted data rendered by the UI.

type FeedSpec

type FeedSpec struct {
	ID          string          `yaml:"id,omitempty" json:"id,omitempty"`
	Title       string          `yaml:"title,omitempty" json:"title,omitempty"`
	Priority    int             `yaml:"priority,omitempty" json:"priority,omitempty"`
	Match       MatchSpec       `yaml:"match" json:"match"`
	Activation  ActivationSpec  `yaml:"activation" json:"activation"`
	DataSources DataSources     `yaml:"dataSource,omitempty" json:"dataSource,omitempty"`
	UI          types.Container `yaml:"ui" json:"ui"`
}

func (*FeedSpec) InvokeServiceMethod

func (f *FeedSpec) InvokeServiceMethod() (string, string)

func (*FeedSpec) ShallInvokeTool

func (f *FeedSpec) ShallInvokeTool() bool

func (*FeedSpec) ShallUseHistory

func (f *FeedSpec) ShallUseHistory() bool

type FeedSpecs

type FeedSpecs []*FeedSpec

func (FeedSpecs) Index

func (s FeedSpecs) Index() map[mcpname2.Name]*FeedSpec

func (FeedSpecs) MatchSpec

func (s FeedSpecs) MatchSpec() []MatchSpec

func (FeedSpecs) Matches

func (s FeedSpecs) Matches(name mcpname2.Name) bool

type MatchSpec

type MatchSpec struct {
	Service string `yaml:"service,omitempty" json:"service,omitempty"`
	Method  string `yaml:"method,omitempty" json:"method,omitempty"`
}

func (MatchSpec) Matches

func (m MatchSpec) Matches(name mcpname2.Name) bool

func (*MatchSpec) Name

func (m *MatchSpec) Name() mcpname2.Name

Jump to

Keyboard shortcuts

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