services

package
v0.0.0-...-900be4e Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IoHelper            models.IoUtil = IoUtilImp{}
	HttpClient          http.Client
	HttpClientNoTimeout http.Client

	ErrNotFoundError = errors.New("404 not found error")
)

Functions

func GetLocalPlugins

func GetLocalPlugins(pluginDir string) []models.InstalledPlugin

func Init

func Init(version string, skipTLSVerify bool)

func ReadPlugin

func ReadPlugin(pluginDir, pluginName string) (models.InstalledPlugin, error)

func RemoveInstalledPlugin

func RemoveInstalledPlugin(pluginPath, pluginName string) error

Types

type BadRequestError

type BadRequestError struct {
	Message string
	Status  string
}

func (*BadRequestError) Error

func (e *BadRequestError) Error() string

type GrafargComClient

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

func (*GrafargComClient) DownloadFile

func (client *GrafargComClient) DownloadFile(pluginName string, tmpFile *os.File, url string, checksum string) (err error)

func (*GrafargComClient) GetPlugin

func (client *GrafargComClient) GetPlugin(pluginId, repoUrl string) (models.Plugin, error)

func (*GrafargComClient) ListAllPlugins

func (client *GrafargComClient) ListAllPlugins(repoUrl string) (models.PluginRepo, error)

type IoUtilImp

type IoUtilImp struct {
}

func (IoUtilImp) ReadDir

func (i IoUtilImp) ReadDir(path string) ([]os.FileInfo, error)

func (IoUtilImp) ReadFile

func (i IoUtilImp) ReadFile(filename string) ([]byte, error)

func (IoUtilImp) RemoveAll

func (i IoUtilImp) RemoveAll(path string) error

func (IoUtilImp) Stat

func (i IoUtilImp) Stat(path string) (os.FileInfo, error)

Jump to

Keyboard shortcuts

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