Documentation
¶
Overview ¶
Package app provides the grafana migration logic
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// Grafana api clients for source and destination workspaces
Src, Dst api
}
App is the main application struct. Contains all the required clients
func (*App) Run ¶
func (a *App) Run(srcCustomGrafanaClient CustomGrafanaClient) error
Run orchestrates the migration of grafana contents TODO: allow specifying what to migrate or all (dashboard, ...)
type CustomGrafanaClient ¶
type CustomGrafanaClient struct {
Client customAPI
}
CustomGrafanaClient is another grafana client in the repo for methods not implemented by gapi
type GrafanaHTTPClient ¶
type GrafanaHTTPClient struct { Client *gapi.Client Key aws.AMGApiKey Input *GrafanaInput }
GrafanaHTTPClient contains the grafana client and AWS API key
type GrafanaInput ¶
type GrafanaInput struct { URL string WorkspaceID string APIKey string Region string IsAMG bool //TODO: remove IsGamma bool }
GrafanaInput holds the infos about the grafana server from the CLI
func NewGrafanaInput ¶
func NewGrafanaInput(wkspEndpoint, url, apiKey string) (GrafanaInput, error)
NewGrafanaInput validate input from command line to return a GrafanaInput object
func (*GrafanaInput) CreateGrafanaAPIClient ¶
func (input *GrafanaInput) CreateGrafanaAPIClient(awsgrafanacli *aws.AMG) (*GrafanaHTTPClient, error)
CreateGrafanaAPIClient create a grafana HTTP API client from the input
func (*GrafanaInput) DeleteAPIKeys ¶
DeleteAPIKeys delete the temporary API key from the AWS grafana workspace