grafana

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOrganizationNotFound = errors.New("organization not found")

ErrOrganizationNotFound is returned when we couldn't find an organization with a given slug.

View Source
var ErrPrivateOrganization = errors.New("organization is private")

ErrPrivateOrganization is returned when an organization exists but hasn't published any plugins yet.

Functions

This section is empty.

Types

type Client

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

Client provides operations to the grafana.com API.

func NewClient

func NewClient() *Client

NewClient returns a new Client.

func (*Client) FindOrgBySlug

func (c *Client) FindOrgBySlug(slug string) (*Organization, error)

FindOrgBySlug returns the organization with a given slug.

func (*Client) FindPluginVersions

func (c *Client) FindPluginVersions(pluginID string) ([]PluginVersion, error)

FindPluginVersions returns all published versions for a given plugin ID.

func (*Client) ListPlugins

func (c *Client) ListPlugins() ([]*Plugin, error)
type Link struct {
	Rel  string `json:"rel"`
	Href string `json:"href"`
}

type Organization

type Organization struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
	Slug string `json:"slug,omitempty"`
}

Organization maps to a Grafana.com organization.

type Plugin

type Plugin struct {
	ID      int64  `json:"id"`
	Name    string `json:"name"`
	Version string `json:"version"`
	Slug    string `json:"slug"`
	Links   []Link `json:"links"`
}

type PluginVersion

type PluginVersion struct {
	Version   string    `json:"version"`
	Commit    string    `json:"commit"`
	CreatedAt time.Time `json:"createdAt"`
	Downloads int       `json:"downloads"`
	URL       string    `json:"url"`
	Verified  bool      `json:"verified"`
}

PluginVersion contains information about a published plugin.

Jump to

Keyboard shortcuts

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