internal

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Command is a variable that allows overriding the command creation for testing
	CommandContext = exec.CommandContext
	// LookPath is a variable that allows overriding the lookup behavior for testing
	LookPath = exec.LookPath
)

Functions

func RegisterTools added in v0.6.0

func RegisterTools(server *mcp.Server, specData []byte, client *http.Client) error

RegisterTools parses the given OpenAPI specification and registers tools on the provided MCP server. All HTTP calls are executed using the provided http.Client. If the client is nil, http.DefaultClient is used.

func ResolveSecretReference

func ResolveSecretReference(ctx context.Context, value string) (string, bool, error)

ResolveSecretReference attempts to resolve a 1Password secret reference (e.g. op://vault/item/field) Returns the resolved value and whether it was a secret reference

func RetryableClient

func RetryableClient(retries int, timeout time.Duration, rps int, logger interface{}) (*http.Client, error)

RetryableClient returns a new http.Client with a retryablehttp.Client configured with the provided parameters.

Types

type HeaderTransport

type HeaderTransport struct {
	Base    http.RoundTripper
	Headers http.Header
}

HeaderTransport is a custom RoundTripper that adds default headers to requests

func (*HeaderTransport) RoundTrip

func (t *HeaderTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip adds the default headers to the request

Jump to

Keyboard shortcuts

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