util

package
v0.0.0-...-7d33afa Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPluginToRegistry

func AddPluginToRegistry(plugin *PluginConfig) error

func CloneRegistryRepo

func CloneRegistryRepo() *git.Repository

func DownloadFile

func DownloadFile(url string, out *os.File) (*os.File, error)

func GetLocalRegistryRepo

func GetLocalRegistryRepo() *git.Repository

func GetLocalRegistryRepoPath

func GetLocalRegistryRepoPath() string

func GetOrCloneLocalRegistryRepo

func GetOrCloneLocalRegistryRepo() *git.Repository

func GetPluginRegistryFilePath

func GetPluginRegistryFilePath(pluginName string) string

func PullLatestRegistryChanges

func PullLatestRegistryChanges() bool

func RemovePluginFromRegistry

func RemovePluginFromRegistry(pluginName string) error

func UnzipFile

func UnzipFile(source string, dest string)

func WriteManifestFile

func WriteManifestFile(config *PluginManifestConfig) error

Types

type PluginConfig

type PluginConfig struct {
	Name          string
	Description   string
	DownloadUrl   string `yaml:"downloadUrl"`
	ExtractPrefix string `yaml:"extractPrefix"`
	Uninstall     struct {
		Files       []string
		Directories []string
	}
}

func ReadPluginRegistryFile

func ReadPluginRegistryFile(pluginName string) (*PluginConfig, error)

type PluginManifestConfig

type PluginManifestConfig struct {
	Plugins []PluginConfig
}

func ReadManifestFile

func ReadManifestFile() (*PluginManifestConfig, error)

Jump to

Keyboard shortcuts

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