framework

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	PanelID      *int
	DashboardUID []string
	StartTime    *time.Time
	EndTime      *time.Time
	Tags         []string
	Text         string
}

func A added in v0.5.8

func A(ns, text string, dashboardUIDs []string, from, to *time.Time) Annotation

A is just a short-cut for default annotation

type Client

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

func NewGrafanaClient

func NewGrafanaClient(url, bearerToken string) *Client

NewGrafanaClient initializes a new Grafana client with the specified URL and API key.

func (*Client) Annotate added in v0.5.2

func (c *Client) Annotate(annotation Annotation) ([]PostAnnotationResponse, []*resty.Response, error)

Annotate adds annotation to all the dashboards, works for both single point annotation with just StartTime and for ranges with StartTime/EndTime

type PostAnnotationResponse

type PostAnnotationResponse struct {
	Message string `json:"message"`
	ID      int64  `json:"id"`
}

Jump to

Keyboard shortcuts

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