config

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientInterface

type ClientInterface interface {
	Push(ctx context.Context, record *corev1.Record) (*corev1.RecordRef, error)
	SearchCIDs(ctx context.Context, req *searchv1.SearchCIDsRequest) (streaming.StreamResult[searchv1.SearchCIDsResponse], error)
	PullBatch(ctx context.Context, recordRefs []*corev1.RecordRef) ([]*corev1.Record, error)
}

ClientInterface defines the interface for the DIR client used by importers. This allows for easier testing and mocking.

type Config

type Config struct {
	Type        ImportType        // Import kind (--type); see ImportType* constants
	RegistryURL string            // Base URL of the registry (when Type is registry-based)
	FilePath    string            // Path to JSON file (when Type is file-based)
	Filters     map[string]string // Registry-specific filters
	Limit       int               // Number of records to import (default: 0 for all)
	DryRun      bool              // If true, preview without actually importing
	SignFunc    SignFunc          // Function to sign records (if set, signing is enabled)

	Force bool // If true, push even if record already exists
	Debug bool // If true, enable verbose debug output

	Enricher         enricherconfig.Config // Configuration for the enricher pipeline stage
	EnricherOverride types.Enricher        // When set, bypass enricher initialization and use this instead (test-only)
	Scanner          scannerconfig.Config  // Configuration for the scanner pipeline stage
}

Config contains configuration for an import operation.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid.

type ImportType

type ImportType string

ImportType identifies what to import and which fetch path to use (registry URL, local file, etc.).

const (
	// ImportTypeMCPRegistry imports MCP server listings from an HTTP MCP registry (e.g. v0.1 list API).
	ImportTypeMCPRegistry ImportType = "mcp-registry"
	// ImportTypeMCP imports MCP server definition(s) from a local JSON file (one object or an array).
	ImportTypeMCP ImportType = "mcp"
	// ImportTypeA2A imports A2A AgentCard JSON from a local file (one object or an array).
	ImportTypeA2A ImportType = "a2a"
	// ImportTypeAgentSkill imports one Agent Skills directory (SKILL.md per https://agentskills.io/specification).
	ImportTypeAgentSkill ImportType = "agent-skill"
)

type SignFunc

type SignFunc func(ctx context.Context, cid string) error

SignFunc is a function type for signing records after push.

Jump to

Keyboard shortcuts

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