services

package
v0.0.0-test Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: AGPL-3.0 Imports: 19 Imported by: 276

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IoHelper            models.IoUtil = IoUtilImp{}
	HttpClient          http.Client
	HttpClientNoTimeout http.Client
	GrafanaVersion      string
	ErrNotFoundError    = errors.New("404 not found error")
	Logger              *logger.CLILogger
)

Functions

func GetLocalPlugins

func GetLocalPlugins(pluginDir string) []models.InstalledPlugin

func Init

func Init(version string, skipTLSVerify bool, debugMode 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 GrafanaComClient

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

func (*GrafanaComClient) DownloadFile

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

func (*GrafanaComClient) GetPlugin

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

func (*GrafanaComClient) ListAllPlugins

func (client *GrafanaComClient) 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