Documentation ¶
Index ¶
- Constants
- Variables
- type BackupCmd
- type BackupConfig
- type BackupProvider
- type Client
- type DashboardCmd
- type DashboardConfig
- type DashboardInspectCmd
- type DashboardInspectConfig
- type DashboardLsCmd
- type DashboardLsConfig
- type DashboardSyncCmd
- type DashboardSyncConfig
- type GrafanaBackup
- type ImportCmd
- type ImportConfig
- type Query
- type QueryManager
- type QueryType
- type RootCmd
- type RootConfig
- type RootConfigOption
Constants ¶
const ( SQL = iota Prometheus )
Variables ¶
var ( GCSBackupProvider = BackupProvider("gcs") LocalBackupProvider = BackupProvider("local") )
Functions ¶
This section is empty.
Types ¶
type BackupCmd ¶ added in v0.0.3
type BackupCmd struct { Conf *BackupConfig *ffcli.Command }
BackupCmd wraps the dashboardBackup config and a ffcli.Command
func NewBackupCmd ¶ added in v0.0.3
func NewBackupCmd(rootConf *RootConfig) *BackupCmd
NewBackupCmd creates a new BackupCmd
func (*BackupCmd) RegisterFlags ¶ added in v0.0.3
RegisterFlags registers a set of flags for the dashboardBackup command
type BackupConfig ¶ added in v0.0.3
type BackupConfig struct { *RootConfig Provider string Out string }
BackupConfig has the config for the dashboardBackup command and a reference to the root command config
type BackupProvider ¶ added in v0.0.3
type BackupProvider string
type Client ¶
func (*Client) BackupGrafana ¶ added in v0.0.3
type DashboardCmd ¶
type DashboardCmd struct { Conf *DashboardConfig *ffcli.Command }
DashboardCmd wraps the dashboard config and a ffcli.Command
func NewDashboardCmd ¶
func NewDashboardCmd(rootConf *RootConfig) *DashboardCmd
NewDashboardCmd creates a new DashboardCmd
func (*DashboardCmd) Exec ¶
func (c *DashboardCmd) Exec(ctx context.Context, args []string) error
Exec executes the dashboard command
func (*DashboardCmd) RegisterFlags ¶
func (c *DashboardCmd) RegisterFlags(fs *flag.FlagSet)
RegisterFlags registers a set of flags for the dashboard command
type DashboardConfig ¶
type DashboardConfig struct {
*RootConfig
}
DashboardConfig has the config for the dashboard command and a reference to the root command config
type DashboardInspectCmd ¶ added in v0.0.2
type DashboardInspectCmd struct { Conf *DashboardInspectConfig *ffcli.Command }
DashboardInspectCmd wraps the dashboardInspect config and a ffcli.Command
func NewDashboardInspectCmd ¶ added in v0.0.2
func NewDashboardInspectCmd(dashConf *DashboardConfig) *DashboardInspectCmd
NewDashboardInspectCmd creates a new DashboardInspectCmd
func (*DashboardInspectCmd) Exec ¶ added in v0.0.2
func (c *DashboardInspectCmd) Exec(ctx context.Context, args []string) error
Exec executes the dashboard ls command
func (*DashboardInspectCmd) RegisterFlags ¶ added in v0.0.2
func (c *DashboardInspectCmd) RegisterFlags(fs *flag.FlagSet)
RegisterFlags registers a set of flags for the dashboardInspect command
type DashboardInspectConfig ¶ added in v0.0.2
type DashboardInspectConfig struct { *DashboardConfig UID string }
DashboardInspectConfig has the config for the dashboardInspect command and a reference to the root command config
type DashboardLsCmd ¶
type DashboardLsCmd struct { Conf *DashboardLsConfig *ffcli.Command }
DashboardLsCmd wraps the dashboardLs config and a ffcli.Command
func NewDashboardLsCmd ¶
func NewDashboardLsCmd(dashConf *DashboardConfig) *DashboardLsCmd
NewDashboardLsCmd creates a new DashboardLsCmd
func (*DashboardLsCmd) Exec ¶
func (c *DashboardLsCmd) Exec(ctx context.Context, args []string) error
Exec executes the dashboard ls command
func (*DashboardLsCmd) RegisterFlags ¶
func (c *DashboardLsCmd) RegisterFlags(fs *flag.FlagSet)
RegisterFlags registers a set of flags for the dashboardLs command
type DashboardLsConfig ¶
type DashboardLsConfig struct { *DashboardConfig UID string }
DashboardLsConfig has the config for the dashboardLs command and a reference to the root command config
type DashboardSyncCmd ¶
type DashboardSyncCmd struct { Conf *DashboardSyncConfig *ffcli.Command }
DashboardSyncCmd wraps the dashboardSync config and a ffcli.Command
func NewDashboardSyncCmd ¶
func NewDashboardSyncCmd(dashConf *DashboardConfig) *DashboardSyncCmd
NewDashboardSyncCmd creates a new DashboardSyncCmd
func (*DashboardSyncCmd) Exec ¶
func (c *DashboardSyncCmd) Exec(ctx context.Context, args []string) error
Exec executes the dashboard sync command
func (*DashboardSyncCmd) RegisterFlags ¶
func (c *DashboardSyncCmd) RegisterFlags(fs *flag.FlagSet)
RegisterFlags registers a set of flags for the dashboardSync command
type DashboardSyncConfig ¶
type DashboardSyncConfig struct { *DashboardConfig UID string QueriesDir string }
DashboardSyncConfig has the config for the dashboardSync command and a reference to the root command config
type GrafanaBackup ¶ added in v0.0.3
type GrafanaBackup struct { Datasources []*grafsdk.Datasource `json:"datasources"` Folders []*grafsdk.Folder `json:"folders"` Dashboards []*grafsdk.DashboardWithMeta `json:"dashboards"` }
type ImportCmd ¶ added in v0.0.3
type ImportCmd struct { Conf *ImportConfig *ffcli.Command }
ImportCmd wraps the dashboardImport config and a ffcli.Command
func NewImportCmd ¶ added in v0.0.3
func NewImportCmd(rootConf *RootConfig) *ImportCmd
NewImportCmd creates a new ImportCmd
func (*ImportCmd) RegisterFlags ¶ added in v0.0.3
RegisterFlags registers a set of flags for the dashboardImport command
type ImportConfig ¶ added in v0.0.3
type ImportConfig struct { *RootConfig Src string }
ImportConfig has the config for the dashboardImport command and a reference to the root command config
type QueryManager ¶ added in v0.0.3
type QueryManager struct {
// contains filtered or unexported fields
}
func NewQueryManager ¶ added in v0.0.3
func NewQueryManager(queryDir string) (*QueryManager, error)
func (QueryManager) Get ¶ added in v0.0.3
func (q QueryManager) Get(file string) *Query
func (QueryManager) Put ¶ added in v0.0.3
func (q QueryManager) Put(file string) error
func (QueryManager) SupportedQueryFile ¶ added in v0.0.3
func (q QueryManager) SupportedQueryFile(file string) bool
type RootCmd ¶
type RootCmd struct { Conf *RootConfig *ffcli.Command }
RootCmd wraps the config and a ffcli.Command
func NewRootCmd ¶
func NewRootCmd(opts ...RootConfigOption) *RootCmd
NewRootCmd creates a new RootCmd
func (*RootCmd) RegisterFlags ¶
RegisterFlags registers a set of flags for the root command
type RootConfig ¶
RootConfig has the config for the root command
func (*RootConfig) Client ¶
func (c *RootConfig) Client() *Client
type RootConfigOption ¶
type RootConfigOption = func(c *RootConfig)
RootConfigOption defines the signature for functional options to be applied to the root command