Documentation ¶
Overview ¶
Package app provides the grafana migration logic
Index ¶
Constants ¶
View Source
const ( AMG_V10 = "10.4" AMG_V9 = "9.4" AMG_V8 = "8.4" )
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
// SrcInput GrafanaInput
Verbose bool
}
App is the main application struct. Contains all the required clients
type CustomGrafanaClient ¶
type CustomGrafanaClient struct {
Client customAPI
}
CustomGrafanaClient is another grafana client in the repo for methods not implemented by gapi
type FoldersResponse ¶ added in v0.1.10
type FoldersResponse struct { SrcFolders []gapi.Folder MigratedFolders []gapi.Folder AllDstFolders []gapi.Folder }
FoldersResponse holds both folders in the source and destination Grafana
type GrafanaHTTPClient ¶
type GrafanaHTTPClient struct { Client *gapi.Client Auth aws.GrafanaAuth Input *GrafanaInput }
GrafanaHTTPClient contains the grafana client and AWS API key
type GrafanaInput ¶
type GrafanaInput struct { URL string WorkspaceID string APIKey string Region string ServiceAccountID string WorkspaceVersion string IsAMG bool IsGamma bool }
GrafanaInput holds the infos about the grafana server from the CLI
func NewGrafanaInput ¶
func NewGrafanaInput(wkspEndpoint, url, serviceAccountID, 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) DeleteGrafanaAuth ¶ added in v0.2.0
func (input *GrafanaInput) DeleteGrafanaAuth(awsgrafanacli *aws.AMG, auth aws.GrafanaAuth) error
DeleteGrafanaAuth delete the temporary API key from the AWS grafana workspace
Source Files ¶
Click to show internal directories.
Click to hide internal directories.