pluginstore

package
v8.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 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 AuthConfigured

func AuthConfigured(auth []AuthConfig, requestURL string, kind string) bool

func ClearResolvedAuthConfigs

func ClearResolvedAuthConfigs(auth []ResolvedAuthConfig)

func GitHubRepositoryParts

func GitHubRepositoryParts(repository string) (string, string, error)

func PluginAuthConfigured

func PluginAuthConfigured(source Source, plugin Plugin, auth []AuthConfig) bool

func PluginInstallType

func PluginInstallType(plugin Plugin) string

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

func ValidateResolvedAuthConfig

func ValidateResolvedAuthConfig(auth ResolvedAuthConfig) error

Types

type Artifact

type Artifact = internalpluginstore.Artifact

func PluginArtifacts

func PluginArtifacts(plugin Plugin) []Artifact

func SelectArtifact

func SelectArtifact(plan InstallPlan, goos string, goarch string) (Artifact, error)

type AuthConfig

type AuthConfig = internalpluginstore.AuthConfig

func NormalizeAuthConfigs

func NormalizeAuthConfigs(auth []AuthConfig) []AuthConfig

type Client

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

func NewClient

func NewClient(httpClient HTTPDoer, registryURL string) Client

func NewClientWithAuth

func NewClientWithAuth(httpClient HTTPDoer, registryURL string, auth []AuthConfig) Client

func NewClientWithResolvedAuth

func NewClientWithResolvedAuth(httpClient HTTPDoer, registryURL string, auth []ResolvedAuthConfig) Client

func NewClientWithResolvedAuthExpiry

func NewClientWithResolvedAuthExpiry(httpClient HTTPDoer, registryURL string, auth []ResolvedAuthConfig, expiresAt time.Time) Client

func (*Client) ClearAuth

func (c *Client) ClearAuth()

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)

func (Client) WithNetworkScope

func (c Client) WithNetworkScope(networkScope string) Client

WithNetworkScope returns a copy with the given proxy/egress identity for shared GitHub API cooldowns. Use the same scope for clients with the same egress and credentials; an empty scope denotes direct connections. This does not configure the HTTP transport, which must use the corresponding proxy/egress separately.

type HTTPDoer

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

type InstallPlan

type InstallPlan = internalpluginstore.InstallPlan

type Manifest

type Manifest = internalpluginstore.Manifest

func ManifestFromPlugin

func ManifestFromPlugin(source Source, plugin Plugin) (Manifest, error)

func ManifestFromRelease

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

type Platform

type Platform = internalpluginstore.Platform

func PluginPlatforms

func PluginPlatforms(plugin Plugin) []Platform

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 ResolvedAuthConfig

type ResolvedAuthConfig = internalpluginstore.ResolvedAuthConfig

func ResolvedAuthForRequest

func ResolvedAuthForRequest(auth []ResolvedAuthConfig, requestURL string, kind string) (ResolvedAuthConfig, bool)

type Secret

type Secret = internalpluginstore.Secret

type Source

type Source = internalpluginstore.Source

func DefaultSource

func DefaultSource() Source

func NormalizeSources

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

type Version

type Version = internalpluginstore.Version

Jump to

Keyboard shortcuts

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