add initial version of Grafana updater
This commit is contained in:
25
grafana-watcher/grafana/grafana.go
Normal file
25
grafana-watcher/grafana/grafana.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package grafana
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
type Interface interface {
|
||||
Dashboards() DashboardsInterface
|
||||
}
|
||||
|
||||
type Clientset struct {
|
||||
BaseUrl string
|
||||
HTTPClient *http.Client
|
||||
}
|
||||
|
||||
func New(baseUrl string) Interface {
|
||||
return &Clientset{
|
||||
BaseUrl: baseUrl,
|
||||
HTTPClient: http.DefaultClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *Clientset) Dashboards() DashboardsInterface {
|
||||
return NewDashboardsClient(c.BaseUrl, c.HTTPClient)
|
||||
}
|
||||
Reference in New Issue
Block a user