s3

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package s3 provides an S3 toolkit adapter for the MCP data platform.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Region          string        `yaml:"region"`
	Endpoint        string        `yaml:"endpoint"`
	AccessKeyID     string        `yaml:"access_key_id"`
	SecretAccessKey string        `yaml:"secret_access_key"`
	SessionToken    string        `yaml:"session_token"`
	Profile         string        `yaml:"profile"`
	UsePathStyle    bool          `yaml:"use_path_style"`
	Timeout         time.Duration `yaml:"timeout"`
	DisableSSL      bool          `yaml:"disable_ssl"`
	ReadOnly        bool          `yaml:"read_only"`
	MaxGetSize      int64         `yaml:"max_get_size"`
	MaxPutSize      int64         `yaml:"max_put_size"`
	ConnectionName  string        `yaml:"connection_name"`
	BucketPrefix    string        `yaml:"bucket_prefix"`
}

Config holds S3 toolkit configuration.

func ParseConfig

func ParseConfig(cfg map[string]any) (Config, error)

ParseConfig parses an S3 toolkit configuration from a map.

type Toolkit

type Toolkit struct {
	// contains filtered or unexported fields
}

Toolkit wraps mcp-s3 toolkit for the platform.

func New

func New(name string, cfg Config) (*Toolkit, error)

New creates a new S3 toolkit.

func (*Toolkit) Client

func (t *Toolkit) Client() *s3client.Client

Client returns the underlying S3 client for direct use.

func (*Toolkit) Close

func (t *Toolkit) Close() error

Close releases resources.

func (*Toolkit) Config

func (t *Toolkit) Config() Config

Config returns the toolkit configuration.

func (*Toolkit) Kind

func (t *Toolkit) Kind() string

Kind returns the toolkit kind.

func (*Toolkit) Name

func (t *Toolkit) Name() string

Name returns the toolkit instance name.

func (*Toolkit) RegisterTools

func (t *Toolkit) RegisterTools(s *mcp.Server)

RegisterTools registers S3 tools with the MCP server.

func (*Toolkit) SetMiddleware

func (t *Toolkit) SetMiddleware(chain *middleware.Chain)

SetMiddleware sets the middleware chain for tool handlers.

func (*Toolkit) SetQueryProvider

func (t *Toolkit) SetQueryProvider(provider query.Provider)

SetQueryProvider sets the query execution provider for enrichment.

func (*Toolkit) SetSemanticProvider

func (t *Toolkit) SetSemanticProvider(provider semantic.Provider)

SetSemanticProvider sets the semantic metadata provider for enrichment.

func (*Toolkit) Tools

func (t *Toolkit) Tools() []string

Tools returns the list of tool names that would be provided by this toolkit.

Jump to

Keyboard shortcuts

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