Documentation
¶
Overview ¶
Package pluginstore exposes plugin registry and artifact installation helpers for embedders such as CLIProxyAPIHome.
Index ¶
- Constants
- Variables
- func ReleaseVersion(release Release) (string, error)
- func SourceID(registryURL string) string
- func UpdateAvailable(installed, latest string) bool
- func ValidatePlugin(plugin Plugin) error
- type Client
- func (c Client) FetchLatestRelease(ctx context.Context, plugin Plugin) (Release, error)
- func (c Client) FetchRegistry(ctx context.Context) (Registry, error)
- func (c Client) FetchReleaseByTag(ctx context.Context, plugin Plugin, tag string) (Release, error)
- func (c Client) Install(ctx context.Context, plugin Plugin, options InstallOptions) (InstallResult, error)
- func (c Client) InstallManifest(ctx context.Context, manifest Manifest, options InstallOptions) (InstallResult, error)
- func (c Client) InstallVersion(ctx context.Context, plugin Plugin, releaseTag string, version string, ...) (InstallResult, error)
- type HTTPDoer
- type InstallOptions
- type InstallResult
- type Manifest
- type Plugin
- type Registry
- type Release
- type ReleaseAsset
- type Source
Constants ¶
View Source
const ( DefaultRegistryURL = internalpluginstore.DefaultRegistryURL DefaultSourceID = internalpluginstore.DefaultSourceID DefaultSourceName = internalpluginstore.DefaultSourceName SchemaVersion = internalpluginstore.SchemaVersion )
Variables ¶
View Source
var ErrLoadedPluginLocked = internalpluginstore.ErrLoadedPluginLocked
Functions ¶
func ReleaseVersion ¶
func UpdateAvailable ¶
func ValidatePlugin ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (Client) FetchLatestRelease ¶
func (Client) FetchReleaseByTag ¶
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 InstallOptions ¶
type InstallOptions = internalpluginstore.InstallOptions
type InstallResult ¶
type InstallResult = internalpluginstore.InstallResult
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"`
Logo string `yaml:"logo,omitempty" json:"logo,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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.