catalog

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultCatalogURL is the URL to the catalog repository releases
	DefaultCatalogURL = "https://github.com/dokulabs/doku-catalog/releases/latest/download/catalog.toml"
	CatalogFileName   = "catalog.toml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager handles catalog operations

func NewManager

func NewManager(catalogDir string) *Manager

NewManager creates a new catalog manager

func (*Manager) CatalogExists

func (m *Manager) CatalogExists() bool

CatalogExists checks if the catalog file exists

func (*Manager) FetchCatalog

func (m *Manager) FetchCatalog() error

FetchCatalog downloads the catalog from the configured URL

func (*Manager) GetCatalogPath

func (m *Manager) GetCatalogPath() string

GetCatalogPath returns the path to the local catalog file

func (*Manager) GetCatalogVersion

func (m *Manager) GetCatalogVersion() (string, error)

GetCatalogVersion returns the version of the loaded catalog

func (*Manager) GetService

func (m *Manager) GetService(serviceName string) (*types.CatalogService, error)

GetService retrieves a specific service from the catalog

func (*Manager) GetServiceVersion

func (m *Manager) GetServiceVersion(serviceName, version string) (*types.ServiceSpec, error)

GetServiceVersion retrieves a specific version of a service

func (*Manager) ListServices

func (m *Manager) ListServices() ([]*types.CatalogService, error)

ListServices returns a list of all available services

func (*Manager) ListServicesByCategory

func (m *Manager) ListServicesByCategory(category string) ([]*types.CatalogService, error)

ListServicesByCategory returns services filtered by category

func (*Manager) LoadCatalog

func (m *Manager) LoadCatalog() (*types.ServiceCatalog, error)

LoadCatalog loads and parses the catalog from disk

func (*Manager) SearchServices

func (m *Manager) SearchServices(query string) ([]*types.CatalogService, error)

SearchServices searches for services by name, description, or tags

func (*Manager) SetCatalogURL

func (m *Manager) SetCatalogURL(url string)

SetCatalogURL sets a custom catalog URL (for testing or custom catalogs)

func (*Manager) ValidateCatalog

func (m *Manager) ValidateCatalog() error

ValidateCatalog validates the catalog structure

Jump to

Keyboard shortcuts

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