extension

package
v0.15.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 {
	*implementer.Base
	// 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