Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { ID int64 `json:"id"` AlertID int64 `json:"alertId"` DashboardID int64 `json:"dashboardId"` DashboardUID string `json:"dashboardUID"` PanelID int64 `json:"panelId"` PrevState string `json:"prevState"` NewState string `json:"newState"` Text string `json:"text"` Time time.Time `json:"time"` TimeEnd time.Time `json:"timeEnd"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` Tags []interface{} `json:"tags"` Data interface{} `json:"data"` }
type AnnotationsQueryParams ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewGrafanaClient ¶
NewGrafanaClient initializes a new Grafana client with the specified URL and API key.
func (*Client) GetAnnotations ¶
func (c *Client) GetAnnotations(params AnnotationsQueryParams) ([]Annotation, *resty.Response, error)
GetAnnotations retrieves a list of annotations based on specified query parameters.
func (*Client) PostAnnotation ¶
func (c *Client) PostAnnotation(annotation PostAnnotation) (PostAnnotationResponse, *resty.Response, error)
PostAnnotation sends a new annotation to a specified dashboard.
type PostAnnotation ¶
type PostAnnotationResponse ¶
Click to show internal directories.
Click to hide internal directories.