filters

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler provides a thin wrapper around cvemap.Client.GetVulnerabilityFilters so that CLI tooling can remain decoupled from the API client. The design mirrors pkg/tools/id.Handler and pkg/tools/search.Handler for consistency.

The zero value of Handler is not valid; always instantiate the type via NewHandler.

func NewHandler

func NewHandler(client *cvemap.Client) *Handler

NewHandler returns a new Handler that will use the supplied *cvemap.Client for all network operations. The provided client must be fully configured and ready for use.

func (*Handler) List

func (h *Handler) List() ([]cvemap.VulnerabilityFilter, error)

List retrieves the full list of vulnerability filter definitions from the CVEMap API. It forwards the call to cvemap.Client.GetVulnerabilityFilters using a background context.

func (*Handler) MCPHandler

func (h *Handler) MCPHandler(client *cvemap.Client) func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)

MCPHandler returns the MCP handler for this tool.

func (*Handler) MCPToolSpec

func (h *Handler) MCPToolSpec() mcp.Tool

MCPToolSpec returns the MCP tool spec for registration.

Jump to

Keyboard shortcuts

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