adapter

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(server *mcp.Server, document *openapi.Document, client *HTTPClient, options Options) error

Types

type HTTPClient

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

func NewHTTPClient

func NewHTTPClient(options Options) *HTTPClient

func (*HTTPClient) Call

func (c *HTTPClient) Call(ctx context.Context, view openapi.OperationView, input map[string]any) (any, error)

type Options

type Options struct {
	BaseURL            string
	BearerToken        string
	APIKeyName         string
	APIKeyValue        string
	APIKeyIn           string
	BasicUsername      string
	BasicPassword      string
	OAuth2ClientID     string
	OAuth2ClientSecret string
	OAuth2TokenURL     string
	OAuth2Scopes       []string
	OAuth2TokenSource  oauth2.TokenSource
	Timeout            time.Duration
	MaxResponseBytes   int64
	MaxRetries         int
	RetryBaseDelay     time.Duration
	RetryNonIdempotent bool
	Allow              []string
	Deny               []string
	HTTPClient         *http.Client
}

Jump to

Keyboard shortcuts

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