diff --git a/README.md b/README.md index 5140223..9da58e4 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@

- - Build Status + + Build Status - - Coverage Status + + Coverage Status - - Report Card + + Report Card

@@ -23,7 +23,7 @@ Retrieve datasources from existing Grafana and export it into a YAML provisioning file Usage: - grafana-datasource-to-yaml export [flags] + hamara export [flags] Flags: -h, --help help for export @@ -36,22 +36,22 @@ Flags: ``` export GRAFANA_API_KEY= -grafana-datasource-to-yaml export --host=localhost:3000 --key=$GRAFANA_API_KEY > datasources.yaml +hamara export --host=localhost:3000 --key=$GRAFANA_API_KEY > datasources.yaml cat datasources.yaml ``` **Installation Options** --- -1. Download the `grafana-datasource-to-yaml` binary from Releases tab. +1. Download the `hamara` binary from Releases tab. 2. Install with `go get` (Installed Go required) - + `$ go get -u github.com/trivago/grafana-datasource-to-yaml` - + `$ grafana-datasource-to-yaml` + + `$ go get -u github.com/trivago/hamara` + + `$ hamara` **How to Contribute** --- -1. Clone repo and create a new branch: `$ git checkout https://github.com/trivago/grafana-datasource-to-yaml -b name_for_new_branch`. +1. Clone repo and create a new branch: `$ git checkout https://github.com/trivago/hamara -b name_for_new_branch`. 2. Make changes and test 3. Submit Pull Request with comprehensive description of changes diff --git a/cmd/export.go b/cmd/export.go index 17d62ed..f17d7f6 100644 --- a/cmd/export.go +++ b/cmd/export.go @@ -6,7 +6,7 @@ import ( "os" "github.com/spf13/cobra" - "github.com/trivago/grafana-datasource-to-yaml/pkg/grafana" + "github.com/trivago/hamara/pkg/grafana" ) type exportCmd struct { diff --git a/cmd/export_test.go b/cmd/export_test.go index 79bd349..e47b9bc 100644 --- a/cmd/export_test.go +++ b/cmd/export_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/trivago/grafana-datasource-to-yaml/cmd" - "github.com/trivago/grafana-datasource-to-yaml/pkg/grafana" + "github.com/trivago/hamara/cmd" + "github.com/trivago/hamara/pkg/grafana" ) type grafanaRestClientMock struct { diff --git a/cmd/root.go b/cmd/root.go index 92f15db..1576e1e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,12 +5,12 @@ import ( "os" "github.com/spf13/cobra" - "github.com/trivago/grafana-datasource-to-yaml/pkg/grafana" + "github.com/trivago/hamara/pkg/grafana" ) func NewRootCmd(args []string) *cobra.Command { cmd := &cobra.Command{ - Use: "grafana-datasource-to-yaml", + Use: "hamara", Short: "Exporter of grafana datasources to YAML", Long: `A tool for export datasources from the existing Grafana DB into a YAML provisioning file`, } diff --git a/cmd/root_test.go b/cmd/root_test.go index 013227a..43b5e1c 100644 --- a/cmd/root_test.go +++ b/cmd/root_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/trivago/grafana-datasource-to-yaml/cmd" + "github.com/trivago/hamara/cmd" ) func TestRootCmd(t *testing.T) { diff --git a/cmd/testdata/no-args.golden b/cmd/testdata/no-args.golden index 891eb33..28afd4c 100644 --- a/cmd/testdata/no-args.golden +++ b/cmd/testdata/no-args.golden @@ -1,13 +1,13 @@ A tool for export datasources from the existing Grafana DB into a YAML provisioning file Usage: - grafana-datasource-to-yaml [command] + hamara [command] Available Commands: export Export datasources help Help about any command Flags: - -h, --help help for grafana-datasource-to-yaml + -h, --help help for hamara -Use "grafana-datasource-to-yaml [command] --help" for more information about a command. +Use "hamara [command] --help" for more information about a command. diff --git a/go.mod b/go.mod index f7e196e..5955e31 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/trivago/grafana-datasource-to-yaml +module github.com/trivago/hamara go 1.12 diff --git a/main.go b/main.go index 748582d..a0da51a 100644 --- a/main.go +++ b/main.go @@ -1,6 +1,6 @@ package main -import "github.com/trivago/grafana-datasource-to-yaml/cmd" +import "github.com/trivago/hamara/cmd" func main() { cmd.Execute() diff --git a/pkg/grafana/rest-client_test.go b/pkg/grafana/rest-client_test.go index 2872e83..caf91c3 100644 --- a/pkg/grafana/rest-client_test.go +++ b/pkg/grafana/rest-client_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/trivago/grafana-datasource-to-yaml/pkg/grafana" + "github.com/trivago/hamara/pkg/grafana" "gopkg.in/h2non/gock.v1" ) diff --git a/pkg/grafana/types_test.go b/pkg/grafana/types_test.go index f845c0e..e8e3f1c 100644 --- a/pkg/grafana/types_test.go +++ b/pkg/grafana/types_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/trivago/grafana-datasource-to-yaml/pkg/grafana" + "github.com/trivago/hamara/pkg/grafana" ) func TestWriteTo(t *testing.T) {