Documentation
¶
Index ¶
- type Service
- func (s *Service) ImportFromPath(ctx context.Context, path string, enrichServerData bool) error
- func (s *Service) SetEmbeddingDimensions(dimensions int)
- func (s *Service) SetEmbeddingProvider(provider embeddings.Provider)
- func (s *Service) SetGenerateEmbeddings(enabled bool)
- func (s *Service) SetGitHubToken(token string)
- func (s *Service) SetHTTPClient(client *http.Client)
- func (s *Service) SetProgressCachePath(path string)
- func (s *Service) SetReadmeSeedPath(path string)
- func (s *Service) SetRequestHeaders(headers map[string]string)
- func (s *Service) SetUpdateIfExists(update bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service handles importing seed data into the registry
func NewService ¶
func NewService(registry service.RegistryService) *Service
NewService creates a new importer service with sane defaults
func (*Service) ImportFromPath ¶
ImportFromPath imports seed data from various sources: 1. Local file paths (*.json files) - expects ServerJSON array format 2. Direct HTTP URLs to seed.json files - expects ServerJSON array format 3. Registry API endpoints (e.g., /v0/servers, /v0.1/servers) - handles pagination automatically
func (*Service) SetEmbeddingDimensions ¶ added in v0.1.11
SetEmbeddingDimensions sets the expected embedding dimensions for validation.
func (*Service) SetEmbeddingProvider ¶ added in v0.1.11
func (s *Service) SetEmbeddingProvider(provider embeddings.Provider)
SetEmbeddingProvider configures the embedding provider used for semantic enrichment.
func (*Service) SetGenerateEmbeddings ¶ added in v0.1.11
SetGenerateEmbeddings toggles whether embeddings should be generated during import.
func (*Service) SetGitHubToken ¶
SetGitHubToken sets a token used only for GitHub enrichment calls
func (*Service) SetHTTPClient ¶
SetHTTPClient overrides the HTTP client used for fetches
func (*Service) SetProgressCachePath ¶
SetProgressCachePath configures a file used to persist import progress between runs.
func (*Service) SetReadmeSeedPath ¶
SetReadmeSeedPath configures an optional README seed file used for imports.
func (*Service) SetRequestHeaders ¶
SetRequestHeaders replaces headers used for HTTP fetches
func (*Service) SetUpdateIfExists ¶
SetUpdateIfExists toggles replacing existing name/version entries instead of skipping