Versions in this module Expand all Collapse all v0 v0.2.21 Aug 13, 2021 v0.2.20 Aug 10, 2021 v0.2.19 Jul 28, 2021 v0.2.18 Jul 20, 2021 v0.2.17 Jul 16, 2021 v0.2.16 Jul 9, 2021 v0.2.15 Jul 2, 2021 v0.2.14 Jun 28, 2021 v0.2.13 Jun 22, 2021 v0.2.12 Jun 1, 2021 v0.2.11 May 24, 2021 v0.2.10 May 23, 2021 v0.2.9 May 5, 2021 v0.2.8 Apr 23, 2021 v0.2.7 Apr 12, 2021 v0.2.6 Apr 7, 2021 Changes in this version + const AddPromDatasource + const DeletePromDatasource + const GetPromDatasource + const PromDatasource + const UpdatePromDatasource + func NewGrafanaHTTPReverseProxy(serverAddr string, transport http.RoundTripper) func(writer http.ResponseWriter, request *http.Request) + type BasicAuthPayload struct + BasicAuthPassword string + BasicAuthUser string + JsonData *JsonData + SecureJsonData *SecureJsonData + type Config struct + Host string + Namespace string + Port string + func GetConfig() (*Config, error) + type CreateDatasourceRequest struct + Access string + BasicAuth bool + Name string + Type string + Url string + type DatasourceResponse struct + Id int + Message string + Name string + type GetPrometheusDatasourceResponse struct + Access string + BasicAuth bool + BasicAuthPassword string + BasicAuthUser string + Database string + Id int + IsDefault bool + JsonData JsonData + Name string + OrgId int + Password string + ReadOnly bool + SecureJsonFields SecureJsonFields + Type string + TypeLogoUrl string + Url string + User string + Version *int + WithCredentials bool + type GrafanaClient interface + CreateDatasource func(createDatasourceRequest CreateDatasourceRequest) (*DatasourceResponse, error) + GetAllDatasource func() ([]*GetPrometheusDatasourceResponse, error) + GetDatasource func(datasourceId int) (*GetPrometheusDatasourceResponse, error) + UpdateDatasource func(updateDatasourceRequest UpdateDatasourceRequest, datasourceId int) (*DatasourceResponse, error) + type GrafanaClientConfig struct + DestinationURL string + GrafanaOrgId int + GrafanaPassword string + GrafanaUsername string + func GetGrafanaClientConfig() (*GrafanaClientConfig, error) + type GrafanaClientImpl struct + func NewGrafanaClientImpl(logger *zap.SugaredLogger, client *http.Client, config *GrafanaClientConfig, ...) *GrafanaClientImpl + func (impl *GrafanaClientImpl) CreateDatasource(createDatasourceRequest CreateDatasourceRequest) (*DatasourceResponse, error) + func (impl *GrafanaClientImpl) GetAllDatasource() ([]*GetPrometheusDatasourceResponse, error) + func (impl *GrafanaClientImpl) GetDatasource(datasourceId int) (*GetPrometheusDatasourceResponse, error) + func (impl *GrafanaClientImpl) UpdateDatasource(updateDatasourceRequest UpdateDatasourceRequest, datasourceId int) (*DatasourceResponse, error) + type JsonData struct + AuthType string + DefaultRegion string + HttpMethod string + KeepCookies []string + TlsAuth bool + type SecureJsonData struct + BasicAuthPassword string + TlsClientCert string + TlsClientKey string + type SecureJsonFields struct + type StatusCode int + func (code StatusCode) IsSuccess() bool + type UpdateDatasourceRequest struct + Access string + BasicAuth bool + BasicAuthPassword string + BasicAuthUser string + Database string + Id int + IsDefault bool + JsonData JsonData + Name string + OrgId int + Password string + ReadOnly bool + SecureJsonFields SecureJsonFields + Type string + TypeLogoUrl string + Url string + User string + Version *int + WithCredentials bool