pluginstore

package
v7.2.41 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package pluginstore exposes plugin registry and artifact installation helpers for embedders such as CLIProxyAPIHome.

Index

Constants

Variables

Functions

func ReleaseVersion

func ReleaseVersion(release Release) (string, error)

func SourceID

func SourceID(registryURL string) string

func UpdateAvailable

func UpdateAvailable(installed, latest string) bool

func ValidatePlugin

func ValidatePlugin(plugin Plugin) error

Types

type Client

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

func NewClient

func NewClient(httpClient HTTPDoer, registryURL string) Client

func (Client) FetchLatestRelease

func (c Client) FetchLatestRelease(ctx context.Context, plugin Plugin) (Release, error)

func (Client) FetchRegistry

func (c Client) FetchRegistry(ctx context.Context) (Registry, error)

func (Client) FetchReleaseByTag

func (c Client) FetchReleaseByTag(ctx context.Context, plugin Plugin, tag string) (Release, error)

func (Client) Install

func (c Client) Install(ctx context.Context, plugin Plugin, options InstallOptions) (InstallResult, error)

func (Client) InstallManifest

func (c Client) InstallManifest(ctx context.Context, manifest Manifest, options InstallOptions) (InstallResult, error)

func (Client) InstallVersion

func (c Client) InstallVersion(ctx context.Context, plugin Plugin, releaseTag string, version string, options InstallOptions) (InstallResult, error)

type HTTPDoer

type HTTPDoer interface {
	Do(*http.Request) (*http.Response, error)
}

type Manifest

type Manifest struct {
	ID          string   `yaml:"id,omitempty" json:"id,omitempty"`
	Name        string   `yaml:"name,omitempty" json:"name,omitempty"`
	Description string   `yaml:"description,omitempty" json:"description,omitempty"`
	Author      string   `yaml:"author,omitempty" json:"author,omitempty"`
	Version     string   `yaml:"version,omitempty" json:"version,omitempty"`
	ReleaseTag  string   `yaml:"release-tag,omitempty" json:"release_tag,omitempty"`
	Repository  string   `yaml:"repository,omitempty" json:"repository,omitempty"`
	Homepage    string   `yaml:"homepage,omitempty" json:"homepage,omitempty"`
	License     string   `yaml:"license,omitempty" json:"license,omitempty"`
	Tags        []string `yaml:"tags,omitempty" json:"tags,omitempty"`
	SourceID    string   `yaml:"source-id,omitempty" json:"source_id,omitempty"`
	SourceName  string   `yaml:"source-name,omitempty" json:"source_name,omitempty"`
	SourceURL   string   `yaml:"source-url,omitempty" json:"source_url,omitempty"`
}

func ManifestFromRelease

func ManifestFromRelease(source Source, plugin Plugin, release Release) (Manifest, error)

func (Manifest) Plugin

func (m Manifest) Plugin() Plugin

func (Manifest) Validate

func (m Manifest) Validate() error

type Plugin

type Plugin = internalpluginstore.Plugin

type Registry

type Registry = internalpluginstore.Registry

type Release

type Release = internalpluginstore.Release

type ReleaseAsset

type ReleaseAsset = internalpluginstore.ReleaseAsset

type Source

type Source = internalpluginstore.Source

func DefaultSource

func DefaultSource() Source

func NormalizeSources

func NormalizeSources(registryURLs []string) ([]Source, error)

Jump to

Keyboard shortcuts

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