client

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminCredentials

type AdminCredentials struct {
	Username string
	Password string
}

type DefaultGrafanaClientGenerator added in v0.34.0

type DefaultGrafanaClientGenerator struct{}

DefaultGrafanaClientGenerator is the default implementation

func (*DefaultGrafanaClientGenerator) GenerateGrafanaClient added in v0.34.0

func (g *DefaultGrafanaClientGenerator) GenerateGrafanaClient(ctx context.Context, k8sClient client.Client, grafanaURL *url.URL) (GrafanaClient, error)

GenerateGrafanaClient creates a new Grafana client by fetching credentials and TLS configuration from Kubernetes secrets.

type GrafanaClient added in v0.34.0

type GrafanaClient interface {
	// Organization context management
	OrgID() int64
	WithOrgID(orgID int64) GrafanaClient

	// Client services - expose focused client interfaces
	Datasources() datasources.ClientService
	Orgs() orgs.ClientService
	Dashboards() dashboards.ClientService
	SsoSettings() sso_settings.ClientService
}

GrafanaClient defines the unified interface that provides access to all Grafana API operations This interface allows for easier testing by providing a single point to mock all Grafana API operations through focused client services.

func NewGrafanaClient added in v0.34.0

func NewGrafanaClient(api *grafana.GrafanaHTTPAPI) GrafanaClient

NewGrafanaClient creates a new GrafanaClient implementation wrapping the provided GrafanaHTTPAPI

type GrafanaClientGenerator added in v0.34.0

type GrafanaClientGenerator interface {
	GenerateGrafanaClient(ctx context.Context, k8sClient client.Client, grafanaURL *url.URL) (GrafanaClient, error)
}

GrafanaClientGenerator defines the interface for generating Grafana clients

type TLSConfig

type TLSConfig struct {
	Cert string
	Key  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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