manager

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubAsset

type GitHubAsset struct {
	Name               string `json:"name"`
	BrowserDownloadURL string `json:"browser_download_url"`
	Size               int64  `json:"size"`
}

GitHubAsset represents a release asset

type GitHubRelease

type GitHubRelease struct {
	TagName     string        `json:"tag_name"`
	Assets      []GitHubAsset `json:"assets"`
	PublishedAt time.Time     `json:"published_at"`
}

GitHubRelease represents a GitHub release

type Manager

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

Manager handles downloading and managing plugins from GitHub

func NewManager

func NewManager(logger *zap.Logger, cacheDir string) *Manager

NewManager creates a new plugin manager

func (*Manager) Cleanup

func (m *Manager) Cleanup(maxAge time.Duration) error

Cleanup removes old cached plugins

func (*Manager) DownloadGitHubPlugin

func (m *Manager) DownloadGitHubPlugin(configMap map[string]any) (string, error)

DownloadGitHubPlugin downloads a plugin from GitHub using config map

func (*Manager) GenerateCachePath

func (m *Manager) GenerateCachePath(source, org, pluginName, version, platform string) string

GenerateCachePath generates the cache path using the new directory structure (public method)

func (*Manager) GetCacheDir

func (m *Manager) GetCacheDir() string

GetCacheDir returns the cache directory path

func (*Manager) GetPluginPath

func (m *Manager) GetPluginPath(pluginConfig config.PluginConfig) (string, error)

GetPluginPath returns the path to a plugin executable If it's a GitHub plugin, it will download and cache it

Jump to

Keyboard shortcuts

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