registry

package
v0.0.1-alpha.22 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BaseURL    = "https://cdn.plugins.omniview.dev"
	UserAgent  = "Omniview-Plugin-Client/1.0"
	TimeoutSec = 15
)

Constants for the CDN

Variables

This section is empty.

Functions

This section is empty.

Types

type Maintainer

type Maintainer struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type Plugin

type Plugin struct {
	ID            string        `json:"id"`
	Name          string        `json:"name"`
	Icon          string        `json:"icon"`
	Description   string        `json:"description"`
	Official      bool          `json:"official"`
	LatestVersion PluginVersion `json:"latest_version"`
}

type PluginArtifact

type PluginArtifact struct {
	Checksum    string `json:"checksum"`
	DownloadURL string `json:"download_url"`
	Size        int64  `json:"size"`
}

type PluginIndex

type PluginIndex struct {
	ID            string          `json:"id"`
	Name          string          `json:"name"`
	Icon          string          `json:"icon"`
	Description   string          `json:"description"`
	Official      bool            `json:"official"`
	LatestVersion PluginVersion   `json:"latest_version"`
	Versions      []PluginVersion `json:"versions"`
	// contains filtered or unexported fields
}

type PluginRegistry

type PluginRegistry struct {
	Plugins []Plugin `json:"plugins"`
}

type PluginTheme

type PluginTheme struct {
	Colors map[string]string `json:"colors"`
}

type PluginVersion

type PluginVersion struct {
	Metadata      config.PluginMeta         `json:"metadata"`
	Version       string                    `json:"version"`
	Architectures map[string]PluginArtifact `json:"architectures"`
	Created       time.Time                 `json:"created"`
	Updated       time.Time                 `json:"updated"`
}

type PluginVersions

type PluginVersions struct {
	Latest   string
	Versions []string
}

type RegistryClient

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

func NewRegistryClient

func NewRegistryClient() *RegistryClient

func (*RegistryClient) DownloadAndPrepare

func (rc *RegistryClient) DownloadAndPrepare(
	pluginID, version string,
) (string, error)

func (*RegistryClient) GetPluginIndex

func (rc *RegistryClient) GetPluginIndex(pluginID string) (*PluginIndex, error)

func (*RegistryClient) GetPluginVersions

func (rc *RegistryClient) GetPluginVersions(pluginID string) PluginVersions

func (*RegistryClient) ListPlugins

func (rc *RegistryClient) ListPlugins() ([]Plugin, error)

Jump to

Keyboard shortcuts

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