Documentation
¶
Overview ¶
Package secrets exposes the Dapr secrets building block as MCP tools.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterTools ¶
func RegisterTools(server *mcp.Server, client SecretsClient, metrics *telemetry.ToolMetrics)
RegisterTools registers the get_secret and get_bulk_secrets tools on server. metrics may be nil.
Types ¶
type GetBulkSecretArgs ¶
type GetBulkSecretArgs struct {
StoreName string `json:"storeName" jsonschema:"The name of the configured Dapr secret store component (e.g., 'vault')."`
Metadata map[string]string `json:"metadata,omitempty" jsonschema:"Optional per-request metadata for the bulk retrieval operation."`
}
GetBulkSecretArgs are the arguments of the get_bulk_secrets tool.
type GetSecretArgs ¶
type GetSecretArgs struct {
StoreName string `json:"storeName" jsonschema:"The name of the configured Dapr secret store component (e.g., 'vault')."`
SecretName string `json:"secretName" jsonschema:"The specific name of the secret to retrieve (e.g., 'db-credentials')."`
Metadata map[string]string `` /* 149-byte string literal not displayed */
}
GetSecretArgs are the arguments of the get_secret tool.
type SecretsClient ¶
type SecretsClient interface {
GetSecret(ctx context.Context, storeName, key string, meta map[string]string) (map[string]string, error)
GetBulkSecret(ctx context.Context, storeName string, meta map[string]string) (map[string]map[string]string, error)
}
SecretsClient defines the interface for secrets operations.