grafana

package module
v0.0.0-...-e45e0bd Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package grafana provides the API client, operations, and parameter types for the API.

The Grafana server.

Index

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 AlertTestInput struct {

	// This member is required.
	Dashboard smithy.Document

	// This member is required.
	PanelId *string

	OrgId int64
}

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

func New(options Options, optFns ...func(*Options)) *Client

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 GetAlertInput struct {

	// The alert ID.
	//
	// This member is required.
	Id *string

	OrgId int64
}

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 GetAlertStatesForDashboardInput

type GetAlertStatesForDashboardInput struct {

	// The dashboard ID.
	//
	// This member is required.
	DashboardId *string

	// Organization ID.
	OrgId int64
}

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 HTTPClient

type HTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type ListAlertsInput

type ListAlertsInput struct {
	DashboardIds []int64

	DashboardQuery *string

	DashboardTags []string

	FolderIds []int64
}

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
}

func (Options) Copy

func (o Options) Copy() Options

Copy creates a clone where the APIOptions list is deep copied.

type PauseAlertInput

type PauseAlertInput struct {

	// The alert ID.
	//
	// This member is required.
	Id *string

	// Whether to pause.
	//
	// This member is required.
	Paused bool

	OrgId int64
}

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 QueryMetricsV2Input struct {

	// This member is required.
	From *string

	// This member is required.
	To *string

	Debug *bool
}

type QueryMetricsV2Output

type QueryMetricsV2Output struct {

	// This member is required.
	Responses map[string]types.DataResponse

	// Metadata pertaining to the operation's result.
	ResultMetadata middleware.Metadata
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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