services

package
v0.0.0-...-34a2968 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2020 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 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