registry

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AvailablePlugin

type AvailablePlugin struct {
	ID            string   `json:"id"`
	Name          string   `json:"name"`
	Description   string   `json:"description"`
	IconURL       string   `json:"icon_url"`
	Category      string   `json:"category"`
	Tags          []string `json:"tags"`
	License       string   `json:"license"`
	Official      bool     `json:"official"`
	Featured      bool     `json:"featured"`
	DownloadCount int64    `json:"download_count"`
	AverageRating float64  `json:"average_rating"`
	ReviewCount   int64    `json:"review_count"`
	Repository    string   `json:"repository"`
	URL           string   `json:"url"`
	PublisherName string   `json:"publisher_name"`
	Installed     bool     `json:"installed"`
	InstalledVer  string   `json:"installed_version"`
	LatestVer     string   `json:"latest_version"`
	UpdateAvail   bool     `json:"update_available"`
}

AvailablePlugin represents a plugin from the marketplace, enriched with local install status for the desktop app frontend.

type Client

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

Client wraps the registry client with convenience methods for the desktop app.

func NewClient

func NewClient(baseURL string) *Client

NewClient creates a new registry client.

func (*Client) BaseURL

func (c *Client) BaseURL() string

BaseURL returns the current marketplace API URL.

func (*Client) DownloadPlugin

func (c *Client) DownloadPlugin(ctx context.Context, pluginID, version string) (string, error)

DownloadPlugin downloads and verifies a plugin artifact. Returns the path to the downloaded temp file.

func (*Client) GetPluginDownloadStats

func (c *Client) GetPluginDownloadStats(ctx context.Context, pluginID string) (*DownloadStats, error)

GetPluginDownloadStats fetches download statistics.

func (*Client) GetPluginReadme

func (c *Client) GetPluginReadme(ctx context.Context, pluginID string) (string, error)

GetPluginReadme fetches the readme for a plugin.

func (*Client) GetPluginReviews

func (c *Client) GetPluginReviews(ctx context.Context, pluginID string, page int) ([]Review, error)

GetPluginReviews fetches reviews for a plugin.

func (*Client) GetPluginVersions

func (c *Client) GetPluginVersions(ctx context.Context, pluginID string) ([]VersionInfo, error)

GetPluginVersions fetches version history for a plugin.

func (*Client) ListPlugins

func (c *Client) ListPlugins(ctx context.Context) ([]AvailablePlugin, error)

ListPlugins fetches all available plugins from the marketplace, paginating through results automatically.

func (*Client) SearchPlugins

func (c *Client) SearchPlugins(ctx context.Context, query, category, sort string) ([]AvailablePlugin, error)

SearchPlugins searches plugins with filters, paginating through all results.

func (*Client) SetBaseURL

func (c *Client) SetBaseURL(baseURL string)

SetBaseURL replaces the underlying client with one pointing at a new API URL. No-op if the URL hasn't changed.

type DailyStat

type DailyStat struct {
	Date  string `json:"date"`
	Count int64  `json:"count"`
}

DailyStat is a single day's download count.

type DownloadStats

type DownloadStats struct {
	Total      int64       `json:"total"`
	LastMonth  int64       `json:"last_month"`
	LastWeek   int64       `json:"last_week"`
	DailyStats []DailyStat `json:"daily_stats"`
}

DownloadStats holds plugin download statistics.

type Review

type Review struct {
	ID        string `json:"id"`
	UserID    uint   `json:"user_id"`
	Rating    int    `json:"rating"`
	Title     string `json:"title"`
	Body      string `json:"body"`
	CreatedAt string `json:"created_at"`
}

Review represents a plugin review for the frontend.

type VersionInfo

type VersionInfo struct {
	Version             string   `json:"version"`
	Description         string   `json:"description"`
	Changelog           string   `json:"changelog"`
	MinIDEVersion       string   `json:"min_ide_version"`
	MaxIDEVersion       string   `json:"max_ide_version"`
	Capabilities        []string `json:"capabilities"`
	CreatedAt           string   `json:"created_at"`
	Compatible          bool     `json:"compatible"`
	CompatibilityReason string   `json:"compatibility_reason"`
	DiscoverySupported  bool     `json:"discovery_supported"`
}

VersionInfo represents a plugin version for the frontend.

Jump to

Keyboard shortcuts

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