Documentation
¶
Index ¶
- type AvailablePlugin
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) DownloadPlugin(ctx context.Context, pluginID, version string) (string, error)
- func (c *Client) GetPluginDownloadStats(ctx context.Context, pluginID string) (*DownloadStats, error)
- func (c *Client) GetPluginReadme(ctx context.Context, pluginID string) (string, error)
- func (c *Client) GetPluginReviews(ctx context.Context, pluginID string, page int) ([]Review, error)
- func (c *Client) GetPluginVersions(ctx context.Context, pluginID string) ([]VersionInfo, error)
- func (c *Client) ListPlugins(ctx context.Context) ([]AvailablePlugin, error)
- func (c *Client) SearchPlugins(ctx context.Context, query, category, sort string) ([]AvailablePlugin, error)
- func (c *Client) SetBaseURL(baseURL string)
- type DailyStat
- type DownloadStats
- type Review
- type VersionInfo
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 (*Client) DownloadPlugin ¶
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 ¶
GetPluginReadme fetches the readme for a plugin.
func (*Client) GetPluginReviews ¶
GetPluginReviews fetches reviews for a plugin.
func (*Client) GetPluginVersions ¶
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 ¶
SetBaseURL replaces the underlying client with one pointing at a new API URL. No-op if the URL hasn't changed.
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"`
}
VersionInfo represents a plugin version for the frontend.