Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminCredentials ¶
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
Folders() folders.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
Click to show internal directories.
Click to hide internal directories.