Documentation ¶
Index ¶
- type ArchMeta
- type Client
- type CompatOpts
- type ErrVersionNotFound
- type ErrVersionUnsupported
- type Manager
- func (m *Manager) GetPluginArchive(ctx context.Context, pluginID, version string, compatOpts CompatOpts) (*PluginArchive, error)
- func (m *Manager) GetPluginArchiveByURL(ctx context.Context, pluginZipURL string, compatOpts CompatOpts) (*PluginArchive, error)
- func (m *Manager) GetPluginDownloadOptions(_ context.Context, pluginID, version string, compatOpts CompatOpts) (*PluginDownloadOptions, error)
- type Plugin
- type PluginArchive
- type PluginDownloadOptions
- type PluginRepo
- type Response4xxError
- type Service
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompatOpts ¶
func NewCompatOpts ¶
func NewCompatOpts(grafanaVersion, os, arch string) CompatOpts
func (CompatOpts) OSAndArch ¶
func (co CompatOpts) OSAndArch() string
func (CompatOpts) String ¶
func (co CompatOpts) String() string
type ErrVersionNotFound ¶
func (ErrVersionNotFound) Error ¶
func (e ErrVersionNotFound) Error() string
type ErrVersionUnsupported ¶
func (ErrVersionUnsupported) Error ¶
func (e ErrVersionUnsupported) Error() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func ProvideService() *Manager
func (*Manager) GetPluginArchive ¶
func (m *Manager) GetPluginArchive(ctx context.Context, pluginID, version string, compatOpts CompatOpts) (*PluginArchive, error)
GetPluginArchive fetches the requested plugin archive
func (*Manager) GetPluginArchiveByURL ¶
func (m *Manager) GetPluginArchiveByURL(ctx context.Context, pluginZipURL string, compatOpts CompatOpts) (*PluginArchive, error)
GetPluginArchiveByURL fetches the requested plugin archive from the provided `pluginZipURL`
func (*Manager) GetPluginDownloadOptions ¶
func (m *Manager) GetPluginDownloadOptions(_ context.Context, pluginID, version string, compatOpts CompatOpts) (*PluginDownloadOptions, error)
GetPluginDownloadOptions returns the options for downloading the requested plugin (with optional `version`)
type PluginArchive ¶
type PluginArchive struct {
File *zip.ReadCloser
}
type PluginDownloadOptions ¶
type PluginRepo ¶
type Response4xxError ¶
func (Response4xxError) Error ¶
func (e Response4xxError) Error() string
type Service ¶
type Service interface { // GetPluginArchive fetches the requested plugin archive. GetPluginArchive(ctx context.Context, pluginID, version string, opts CompatOpts) (*PluginArchive, error) // GetPluginArchiveByURL fetches the requested plugin from the specified URL. GetPluginArchiveByURL(ctx context.Context, archiveURL string, opts CompatOpts) (*PluginArchive, error) // GetPluginDownloadOptions fetches information for downloading the requested plugin. GetPluginDownloadOptions(ctx context.Context, pluginID, version string, opts CompatOpts) (*PluginDownloadOptions, error) }
Service is responsible for retrieving plugin information from a repository.
Click to show internal directories.
Click to hide internal directories.