grafanadashboardfolder

package
v4.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CreateOrUpdateFolderUrl = "%v/api/folders"
	FolderPermissionsUrl    = "%v/api/folders/%v/permissions"
)
View Source
const (
	ControllerName = "controller_grafanadashboardfolder"
)

Variables

This section is empty.

Functions

func Add

func Add(mgr manager.Manager, namespace string) error

Add creates a new GrafanaDashboardFolder Controller and adds it to the Manager. The Manager will set fields on the Controller and Start it when the Manager is Started.

func SetupWithManager

func SetupWithManager(mgr ctrl.Manager, r reconcile.Reconciler, namespace string) error

SetupWithManager sets up the controller with the Manager.

Types

type GrafanaClient

type GrafanaClient interface {
	FindOrCreateFolder(folderName string) (GrafanaFolderResponse, error)
	ApplyFolderPermissions(folderName string, folderPermissions []*v1alpha1.GrafanaPermissionItem) (GrafanaFolderPermissionsResponse, error)
}

func NewGrafanaClient

func NewGrafanaClient(url, user, password string, transport *http.Transport, timeoutSeconds time.Duration) GrafanaClient

type GrafanaClientImpl

type GrafanaClientImpl struct {
	// contains filtered or unexported fields
}

func (*GrafanaClientImpl) ApplyFolderPermissions

func (r *GrafanaClientImpl) ApplyFolderPermissions(folderName string, folderPermissions []*v1alpha1.GrafanaPermissionItem) (GrafanaFolderPermissionsResponse, error)

func (*GrafanaClientImpl) FindOrCreateFolder

func (r *GrafanaClientImpl) FindOrCreateFolder(folderName string) (GrafanaFolderResponse, error)

type GrafanaDashboardFolderReconciler

type GrafanaDashboardFolderReconciler struct {
	Client client.Client
	Scheme *runtime.Scheme

	Log logr.Logger
	// contains filtered or unexported fields
}

GrafanaDashboardFolderReconciler reconciles a GrafanaFolder object

func (*GrafanaDashboardFolderReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. the GrafanaDashboard object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.7.0/pkg/reconcile

func (*GrafanaDashboardFolderReconciler) SetupWithManager

func (r *GrafanaDashboardFolderReconciler) SetupWithManager(mgr manager.Manager) error

type GrafanaFolderPermissionsResponse

type GrafanaFolderPermissionsResponse struct {
	ID      *int64 `json:"id"`
	Title   string `json:"title"`
	Message string `json:"message"`
}

type GrafanaFolderRequest

type GrafanaFolderRequest struct {
	Title string `json:"title"`
	UID   string `json:"uid"`
}

type GrafanaFolderResponse

type GrafanaFolderResponse struct {
	ID    *int64 `json:"id"`
	Title string `json:"title"`
	UID   string `json:"uid"`
}

Jump to

Keyboard shortcuts

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