Documentation ¶
Overview ¶
Package grafana provides the API client, operations, and parameter types for the API.
The Grafana server.
Index ¶
- Constants
- func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
- type AlertTestInput
- type AlertTestOutput
- type Client
- func (c *Client) AlertTest(ctx context.Context, params *AlertTestInput, optFns ...func(*Options)) (*AlertTestOutput, error)
- func (c *Client) GetAlert(ctx context.Context, params *GetAlertInput, optFns ...func(*Options)) (*GetAlertOutput, error)
- func (c *Client) GetAlertStatesForDashboard(ctx context.Context, params *GetAlertStatesForDashboardInput, ...) (*GetAlertStatesForDashboardOutput, error)
- func (c *Client) ListAlerts(ctx context.Context, params *ListAlertsInput, optFns ...func(*Options)) (*ListAlertsOutput, error)
- func (c *Client) PauseAlert(ctx context.Context, params *PauseAlertInput, optFns ...func(*Options)) (*PauseAlertOutput, error)
- func (c *Client) QueryMetricsV2(ctx context.Context, params *QueryMetricsV2Input, optFns ...func(*Options)) (*QueryMetricsV2Output, error)
- type GetAlertInput
- type GetAlertOutput
- type GetAlertStatesForDashboardInput
- type GetAlertStatesForDashboardOutput
- type HTTPClient
- type ListAlertsInput
- type ListAlertsOutput
- type Options
- type PauseAlertInput
- type PauseAlertOutput
- type QueryMetricsV2Input
- type QueryMetricsV2Output
Constants ¶
View Source
const ServiceAPIVersion = "2021-04-07"
View Source
const ServiceID = "grafana#Grafana"
Variables ¶
This section is empty.
Functions ¶
func WithAPIOptions ¶
func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options)
WithAPIOptions returns a functional option for setting the Client's APIOptions option.
Types ¶
type AlertTestInput ¶
type AlertTestOutput ¶
type AlertTestOutput struct { // This member is required. ConditionEvals *string // This member is required. Firing bool // This member is required. State *string // This member is required. TimeMs *string EvalMatches []types.EvalMatch Logs []types.AlertTestResultLog // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides the API client to make operations call for the API.
func New ¶
New returns an initialized Client based on the functional options. Provide additional functional options to further configure the behavior of the client, such as changing the client's endpoint or adding custom middleware behavior.
func (*Client) AlertTest ¶
func (c *Client) AlertTest(ctx context.Context, params *AlertTestInput, optFns ...func(*Options)) (*AlertTestOutput, error)
Make a test alert.
func (*Client) GetAlert ¶
func (c *Client) GetAlert(ctx context.Context, params *GetAlertInput, optFns ...func(*Options)) (*GetAlertOutput, error)
Get an alert.
func (*Client) GetAlertStatesForDashboard ¶
func (c *Client) GetAlertStatesForDashboard(ctx context.Context, params *GetAlertStatesForDashboardInput, optFns ...func(*Options)) (*GetAlertStatesForDashboardOutput, error)
Get alert states for a dashboard.
func (*Client) ListAlerts ¶
func (c *Client) ListAlerts(ctx context.Context, params *ListAlertsInput, optFns ...func(*Options)) (*ListAlertsOutput, error)
Get alerts.
func (*Client) PauseAlert ¶
func (c *Client) PauseAlert(ctx context.Context, params *PauseAlertInput, optFns ...func(*Options)) (*PauseAlertOutput, error)
Pause an alert.
func (*Client) QueryMetricsV2 ¶
func (c *Client) QueryMetricsV2(ctx context.Context, params *QueryMetricsV2Input, optFns ...func(*Options)) (*QueryMetricsV2Output, error)
Query for metrics.
type GetAlertInput ¶
type GetAlertOutput ¶
type GetAlertOutput struct { // This member is required. Created *time.Time // This member is required. DashboardId int64 // This member is required. For int64 // This member is required. Frequency int64 // This member is required. Id *string // This member is required. Message *string // This member is required. Name *string // This member is required. OrgId int64 // This member is required. PanelId *string // This member is required. Silenced bool // This member is required. State *string // This member is required. Version int64 Updated *time.Time // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type GetAlertStatesForDashboardOutput ¶
type GetAlertStatesForDashboardOutput struct { // The found alert states. // // This member is required. Items []types.AlertStateInfo // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type ListAlertsInput ¶
type ListAlertsOutput ¶
type ListAlertsOutput struct { // This member is required. Items []types.AlertSummary // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type Options ¶
type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // The logger writer interface to write logging messages to. Logger logging.Logger // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient }
type PauseAlertInput ¶
type PauseAlertOutput ¶
type PauseAlertOutput struct { // The alert ID. // // This member is required. Id *string // Message. // // This member is required. Message *string // Alert state. // // This member is required. State *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
type QueryMetricsV2Input ¶
type QueryMetricsV2Output ¶
type QueryMetricsV2Output struct { // This member is required. Responses map[string]types.DataResponse // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.