registry

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

LocalClient represents a client that works with a local copy of the OpenTelemetry registry

func NewClient

func NewClient(registryPath string, logger logger.Logger) *Client

NewLocalClient creates a new local registry client

func (*Client) GetAllComponents

func (c *Client) GetAllComponents() ([]RegistryComponent, error)

GetAllComponents fetches all components from all languages

func (*Client) GetComponentByName

func (c *Client) GetComponentByName(name string) (*RegistryComponent, error)

GetComponentByName fetches a specific component by name from all languages

func (*Client) GetComponentsByLanguage

func (c *Client) GetComponentsByLanguage(language string) ([]RegistryComponent, error)

GetComponentsByLanguage fetches components by language from the local registry

func (*Client) GetRegistryStats

func (c *Client) GetRegistryStats() (map[string]interface{}, error)

GetRegistryStats returns statistics about the local registry

func (*Client) GetSupportedLanguages

func (c *Client) GetSupportedLanguages() []string

GetSupportedLanguages returns the list of supported languages

type GitHubContent

type GitHubContent struct {
	Name        string `json:"name"`
	Path        string `json:"path"`
	Type        string `json:"type"`
	DownloadURL string `json:"download_url"`
}

GitHubContent represents a file or directory in the GitHub repository

type RegistryComponent

type RegistryComponent struct {
	Name        string                 `json:"name"`
	Type        string                 `json:"type"`
	Language    string                 `json:"language"`
	Description string                 `json:"description"`
	Repository  string                 `json:"repository"`
	RegistryURL string                 `json:"registry_url"`
	Homepage    string                 `json:"homepage"`
	Tags        []string               `json:"tags"`
	Maintainers []string               `json:"maintainers"`
	License     string                 `json:"license"`
	LastUpdated time.Time              `json:"last_updated"`
	Metadata    map[string]interface{} `json:"metadata"`
}

RegistryComponent represents a component from the registry

type RegistryResponse

type RegistryResponse struct {
	Components []RegistryComponent `json:"components"`
	Total      int                 `json:"total"`
	Page       int                 `json:"page"`
	PerPage    int                 `json:"per_page"`
}

RegistryResponse represents the response from the registry API

type RegistryYAML

type RegistryYAML struct {
	Title        string   `yaml:"title"`
	RegistryType string   `yaml:"registryType"`
	Language     string   `yaml:"language"`
	Tags         []string `yaml:"tags"`
	License      string   `yaml:"license"`
	Description  string   `yaml:"description"`
	Authors      []struct {
		Name string `yaml:"name"`
	} `yaml:"authors"`
	URLs struct {
		Repo string `yaml:"repo"`
	} `yaml:"urls"`
	CreatedAt    string `yaml:"createdAt"`
	IsFirstParty bool   `yaml:"isFirstParty"`
	Package      struct {
		Registry string `yaml:"registry"`
		Name     string `yaml:"name"`
		Version  string `yaml:"version"`
	} `yaml:"package"`
}

RegistryYAML represents the structure of registry YAML files

Jump to

Keyboard shortcuts

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