grafana

package
v0.0.0-...-94e4715 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SetDebug(bool) Client
	ListFolders(ctx context.Context) ([]FolderHit, error)
	GetFolder(ctx context.Context, id int) (*Folder, error)
	CreateFolder(ctx context.Context, params CreateFolderParams) (*Folder, error)
	ImportDashboard(ctx context.Context, dashboard []byte, params ImportDashboardParams) error
}

func NewClient

func NewClient(apiUrl string, user string, password string) Client

type CreateFolderParams

type CreateFolderParams struct {
	Title string `json:"title"`
}

type Folder

type Folder struct {
	FolderHit

	CanAdmin  bool      `json:"canAdmin"`
	CanEdit   bool      `json:"canEdit"`
	CanSave   bool      `json:"canSave"`
	Created   time.Time `json:"created"`
	CreatedBy string    `json:"createdBy"`
	HasAcl    bool      `json:"hasAcl"`
	Updated   time.Time `json:"updated"`
	UpdatedBy string    `json:"updatedBy"`
	Url       string    `json:"url"`
	Version   int       `json:"version"`
}

type FolderHit

type FolderHit struct {
	Id    int    `json:"id"`
	UId   string `json:"uid"`
	Title string `json:"title"`
}

type ImportDashboardData

type ImportDashboardData struct {
	ImportDashboardParams
	Dashboard map[string]interface{} `json:"dashboard"`
}

type ImportDashboardInput

type ImportDashboardInput struct {
	Type     string `json:"type"`
	PluginId string `json:"pluginId"`
	Name     string `json:"name"`
	Value    string `json:"value"`
}

type ImportDashboardParams

type ImportDashboardParams struct {
	FolderId  int                    `json:"folderId"`
	Overwrite bool                   `json:"overwrite"`
	Inputs    []ImportDashboardInput `json:"inputs"`
}

Jump to

Keyboard shortcuts

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