extension

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(integration *Integration) server.NewImplementer

New creates a new implementer

Types

type Implementer

type Implementer struct {
	*server.DefaultImplementer
	// contains filtered or unexported fields
}

func (*Implementer) CallTool

CallTool calls a tool

func (*Implementer) Implements

func (i *Implementer) Implements(method string) bool

Implements checks if the method is implemented

func (*Implementer) Initialize

func (*Implementer) ListResourceTemplates

ListResourceTemplates lists all resource templates

func (*Implementer) ListResources

ListResources lists all resources

func (*Implementer) ListTools

ListTools lists all tools

func (*Implementer) ReadResource

ReadResource reads a resource

type Integration

type Integration struct {
	Resources
	ResourcesByURI map[string]*Resource
	ResourceTemplates
	ResourceTemplatesByURI map[string]*ResourceTemplate
	Tools
	ToolsByName map[string]*Tool
}

func NewIntegration

func NewIntegration() *Integration

func (*Integration) AddResource

func (i *Integration) AddResource(resource *Resource)

func (*Integration) AddResourceTemplate

func (i *Integration) AddResourceTemplate(resourceTemplate *ResourceTemplate)

func (*Integration) AddTool

func (i *Integration) AddTool(tool *Tool)

type Resource

type Resource struct {
	schema.Resource
	Handler ResourceHandlerFunc
}

type ResourceTemplate

type ResourceTemplate struct {
	schema.ResourceTemplate
	Handler ResourceTemplateHandlerFunc
}

type ResourceTemplates

type ResourceTemplates []*ResourceTemplate

type Resources

type Resources []*Resource

type Tool

type Tool struct {
	schema.Tool
	Handler ToolHandlerFunc
}

type ToolHandlerFunc

type ToolHandlerFunc func(ctx context.Context, request *schema.CallToolRequestParams) (*schema.CallToolResult, error)

type Tools

type Tools []*Tool

Tools is a collection of Tool

Jump to

Keyboard shortcuts

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