diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba8a60d..2bfa35e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,9 +2,6 @@ name: Test on: push -env: - BRANCH_NAME: ${GITHUB_REF#refs/heads/} - jobs: test: runs-on: ubuntu-latest @@ -13,7 +10,7 @@ jobs: uses: actions/checkout@v2.3.4 - name: Install cookiecutter - run: sudo apt-get install cookiecutter + run: sudo -H python3 -m pip install cookiecutter - name: Setup Go environment uses: actions/setup-go@v2.1.3 @@ -28,4 +25,4 @@ jobs: - name: Test env: GOPATH: /home/runner/go - run: BRANCH=${{env.BRANCH_NAME}} make test + run: make test diff --git a/.gitignore b/.gitignore index cc9c8bd..9b75aa4 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,4 @@ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc +.DS_Store diff --git a/Makefile b/Makefile index 5b97579..9a62935 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ .PHONY: test test: - BRANCH=$(BRANCH) go test -v -p 1 -count=1 ./... + go test -v -p 1 -count=1 ./... diff --git a/README.md b/README.md index 38e1818..f15f7a9 100644 --- a/README.md +++ b/README.md @@ -45,8 +45,6 @@ Check this [wiki](https://github.com/nimblehq/gin-templates/wiki/Directories) fo ## Test -- Execute all unit tests. Note that the **main** branch is being used by default. Refer to [this wiki page](https://github.com/nimblehq/gin-templates/wiki/Commands) for instructions on how to use a different branch. - ```sh make test ``` diff --git a/cmd/cmd_suite_test.go b/cmd/cmd_suite_test.go index 29cd380..09eaaf7 100644 --- a/cmd/cmd_suite_test.go +++ b/cmd/cmd_suite_test.go @@ -1,29 +1,13 @@ package cmd_test import ( - "os" "testing" - "github.com/nimblehq/gin-templates/tests" - . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) -var TemplateGeneratedPath string - func TestTemplate(t *testing.T) { RegisterFailHandler(Fail) RunSpecs(t, "Template Suite") } - -var _ = BeforeSuite(func() { - tests.DownloadGinTemplate() - tests.BuildGinTemplate() - tests.RemoveCookiecuttersCache() - TemplateGeneratedPath = tests.CreateProjectFromGinTemplate() -}) - -var _ = AfterSuite(func() { - os.RemoveAll(TemplateGeneratedPath + "/test-gin-templates") -}) diff --git a/cmd/create_test.go b/cmd/create_test.go index a18833c..390672f 100644 --- a/cmd/create_test.go +++ b/cmd/create_test.go @@ -1,6 +1,7 @@ package cmd_test import ( + "io/ioutil" "os" "github.com/nimblehq/gin-templates/tests" @@ -9,13 +10,22 @@ import ( . "github.com/onsi/gomega" ) +var currentTemplatePath string = tests.GetCurrentDirectory() + var _ = BeforeEach(func() { - tests.ChangeDirectory(TemplateGeneratedPath + "/test-gin-templates") + tests.ChangeDirectory(currentTemplatePath) +}) + +var _ = AfterEach(func() { + os.RemoveAll(currentTemplatePath + "/test-gin-templates") }) var _ = Describe("Create template", func() { Context("given the project directory", func() { It("contains project name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + dir, err := os.Getwd() if err != nil { Fail("Failed to get current directory: " + err.Error()) @@ -29,6 +39,9 @@ var _ = Describe("Create template", func() { Context("given .env.example", func() { It("contains project name at DATABASE_URL", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile(".env.example") expectedContent := "DATABASE_URL=postgres://postgres:postgres@0.0.0.0:5432/test-gin-templates_development?sslmode=disable" @@ -39,6 +52,9 @@ var _ = Describe("Create template", func() { Context("given .env.test", func() { It("contains project name at DATABASE_URL", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile(".env.test") expectedContent := "DATABASE_URL=postgres://postgres:postgres@0.0.0.0:5433/test-gin-templates_test?sslmode=disable" @@ -49,6 +65,9 @@ var _ = Describe("Create template", func() { Context("given docker-compose.dev.yml", func() { It("contains project name at container_name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("docker-compose.dev.yml") expectedContent := "container_name: test-gin-templates_db" @@ -57,6 +76,9 @@ var _ = Describe("Create template", func() { }) It("contains project name at postgres db env", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("docker-compose.dev.yml") expectedContent := "- POSTGRES_DB=test-gin-templates_development" @@ -67,6 +89,9 @@ var _ = Describe("Create template", func() { Context("given docker-compose.test.yml", func() { It("contains project name at container_name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("docker-compose.test.yml") expectedContent := "container_name: test-gin-templates_db_test" @@ -75,6 +100,9 @@ var _ = Describe("Create template", func() { }) It("contains project name at postgres db env", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("docker-compose.test.yml") expectedContent := "- POSTGRES_DB=test-gin-templates_test" @@ -85,6 +113,9 @@ var _ = Describe("Create template", func() { Context("given go.mod", func() { It("contains project name at module name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("go.mod") expectedContent := "module github.com/nimblehq/test-gin-templates" @@ -95,6 +126,9 @@ var _ = Describe("Create template", func() { Context("given bootstrap/database.go", func() { It("contains project name at helpers import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/database.go") expectedContent := `"github.com/nimblehq/test-gin-templates/helpers"` @@ -105,6 +139,9 @@ var _ = Describe("Create template", func() { Context("given bootstrap/router.go", func() { It("contains project name at api v1 routers import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/router.go") expectedContent := `apiv1router "github.com/nimblehq/test-gin-templates/lib/api/v1/routers"` @@ -115,6 +152,9 @@ var _ = Describe("Create template", func() { Context("given cmd/api/main.go", func() { It("contains project name at bootstrap import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("cmd/api/main.go") expectedContent := `"github.com/nimblehq/test-gin-templates/bootstrap"` @@ -125,6 +165,9 @@ var _ = Describe("Create template", func() { Context("given config/app.toml", func() { It("contains project name at app_name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("config/app.toml") expectedContent := `app_name = "test-gin-templates"` @@ -133,6 +176,9 @@ var _ = Describe("Create template", func() { }) It("contains project name at debug db name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("config/app.toml") expectedContent := `db_name = "test-gin-templates_development"` @@ -141,6 +187,9 @@ var _ = Describe("Create template", func() { }) It("contains project name at test db name", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("config/app.toml") expectedContent := `db_name = "test-gin-templates_test"` @@ -151,6 +200,9 @@ var _ = Describe("Create template", func() { Context("given helpers/config_test.go", func() { It("contains project name at helpers import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("helpers/config_test.go") expectedContent := `"github.com/nimblehq/test-gin-templates/helpers"` @@ -161,6 +213,9 @@ var _ = Describe("Create template", func() { Context("given helpers/helpers_suite_test.go", func() { It("contains project name at test import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("helpers/helpers_suite_test.go") expectedContent := `"github.com/nimblehq/test-gin-templates/test"` @@ -171,6 +226,9 @@ var _ = Describe("Create template", func() { Context("given lib/api/v1/controllers/controllers_suite_test.go", func() { It("contains project name at test import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/api/v1/controllers/controllers_suite_test.go") expectedContent := `"github.com/nimblehq/test-gin-templates/test"` @@ -181,6 +239,9 @@ var _ = Describe("Create template", func() { Context("given lib/api/v1/controllers/health_test.go", func() { It("contains project name at test import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/api/v1/controllers/health_test.go") expectedContent := `"github.com/nimblehq/test-gin-templates/test"` @@ -191,6 +252,9 @@ var _ = Describe("Create template", func() { Context("given lib/api/v1/routers/router.go", func() { It("contains project name at api v1 controllers import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/api/v1/routers/router.go") expectedContent := `"github.com/nimblehq/test-gin-templates/lib/api/v1/controllers"` @@ -201,6 +265,9 @@ var _ = Describe("Create template", func() { Context("given test/test.go", func() { It("contains project name at bootstrap import", func() { + cookiecutter := tests.Cookiecutter{AppName: "test-gin-templates"} + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("test/test.go") expectedContent := `"github.com/nimblehq/test-gin-templates/bootstrap"` @@ -208,4 +275,729 @@ var _ = Describe("Create template", func() { Expect(content).To(ContainSubstring(expectedContent)) }) }) + + Context("given logrus add-on", func() { + It("contains helpers/log folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("helpers/log") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains logrus package in go.mod", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("go.mod") + + expectedContent := "github.com/sirupsen/logrus v1.8.1" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains logrus package import in bootstrap/config.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/config.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains logrus package import in bootstrap/database.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/database.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains logrus package import in cmd/api/main.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("cmd/api/main.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains logrus package import in test/test.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("test/test.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + }) + + Context("given NO logrus add-on", func() { + It("does NOT contain helpers/log folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("helpers/log") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain logrus package in go.mod", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("go.mod") + + expectedContent := "github.com/sirupsen/logrus v1.8.1" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain logrus package import in bootstrap/config.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/config.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain logrus package import in bootstrap/database.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/database.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain logrus package import in cmd/api/main.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("cmd/api/main.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain logrus package import in test/test.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseLogrus: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("test/test.go") + + expectedContent := "github.com/nimblehq/test-gin-templates/helpers/log" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + }) + + Context("given heroku add-on", func() { + It("contains deploy/heroku folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("deploy/heroku") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains valid files in deploy/heroku folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + files, err := ioutil.ReadDir("deploy/heroku") + if err != nil { + Fail("Failed to read directory: " + err.Error()) + } + + expectedFiles := []string{ + "config.tf", + "main.tf", + "terraform.tfvars.sample", + "variables.tf", + } + + Expect(len(files)).To(Equal(len(expectedFiles))) + + for k, f := range files { + Expect(f.Name()).To(Equal(expectedFiles[k])) + } + }) + + It("contains heroku instruction in README", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("README.md") + + expectedContent := "Deploy to Heroku with Terraform" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains heroku files in .gitignore", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.Yes, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile(".gitignore") + + expectedContent := "deploy/**/.terraform/" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + }) + + Context("given NO heroku add-on", func() { + It("does NOT contains deploy/heroku folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("deploy/heroku") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contains heroku instruction in README", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("README.md") + + expectedContent := "Deploy to Heroku with Terraform" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contains heroku files in .gitignore", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + UseHeroku: tests.No, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile(".gitignore") + + expectedContent := "deploy/**/.terraform/" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + }) + + Context("given Web variant", func() { + It("contains lib/web folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains .eslintrc.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat(".eslintrc.json") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains .npmrc file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat(".npmrc") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains package.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("package.json") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains snowpack.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("snowpack.config.js") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains postcss.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("postcss.config.js") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains tsconfig.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("tsconfig.json") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains snowpack: npm run dev in Procfile.dev", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("Procfile.dev") + + expectedContent := "snowpack: npm run dev" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains the webrouter import in bootstrap/router.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/router.go") + + expectedContent := "webrouter \"github.com/nimblehq/test-gin-templates/lib/web/routers\"" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains npm install in Makefile", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("Makefile") + + expectedContent := "npm install" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains Node 14 in README.md", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.Web, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("README.md") + + expectedContent := "[Node - 14](https://nodejs.org/en/)" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + }) + + Context("given NO Web variant", func() { + It("does NOT contain lib/web folder", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain .eslintrc.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat(".eslintrc.json") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain .npmrc file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat(".npmrc") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain package.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("package.json") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain snowpack.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("snowpack.config.js") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain postcss.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("postcss.config.js") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain tsconfig.json file", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("tsconfig.json") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain snowpack: npm run dev in Procfile.dev", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("Procfile.dev") + + expectedContent := "snowpack: npm run dev" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain the webrouter import in bootstrap/router.go", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("bootstrap/router.go") + + expectedContent := "webrouter \"github.com/nimblehq/test-gin-templates/lib/web/routers\"" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain npm install in Makefile", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("Makefile") + + expectedContent := "npm install" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain Node 14 in README.md", func() { + cookiecutter := tests.Cookiecutter{ + AppName: "test-gin-templates", + Variant: tests.API, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("README.md") + + expectedContent := "[Node - 14](https://nodejs.org/en/)" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + }) + + Context("given bootstrap add-on", func() { + It("contains lib/web/assets/stylesheets/vendors/bootstrap folder", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Bootstrap, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web/assets/stylesheets/vendors/bootstrap") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains bootstrap package in package.json", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Bootstrap, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("package.json") + + expectedContent := "\"bootstrap\": \"5.0.2\"" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains bootstrap scss import in lib/web/assets/stylesheets/application.scss", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Bootstrap, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/web/assets/stylesheets/application.scss") + + expectedContent := "@import \"./vendors/bootstrap\";" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + }) + + Context("given NO bootstrap add-on", func() { + It("does NOT contain lib/web/assets/stylesheets/vendors/bootstrap folder", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web/assets/stylesheets/vendors/bootstrap") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain bootstrap package in package.json", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("package.json") + + expectedContent := "\"bootstrap\":" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain bootstrap scss import in lib/web/assets/stylesheets/application.scss", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/web/assets/stylesheets/application.scss") + + expectedContent := "@import \"./vendors/bootstrap\";" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + }) + + Context("given tailwind add-on", func() { + It("contains lib/web/assets/stylesheets/vendors/tailwind folder", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Tailwind, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web/assets/stylesheets/vendors/tailwind") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains tailwind.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Tailwind, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("tailwind.config.js") + + Expect(os.IsNotExist(err)).To(BeFalse()) + }) + + It("contains tailwind package in package.json", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Tailwind, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("package.json") + + expectedContent := "\"tailwindcss\": \"2.2.7\"" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains tailwind scss import in lib/web/assets/stylesheets/application.scss", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Tailwind, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/web/assets/stylesheets/application.scss") + + expectedContent := "@import \"./vendors/tailwind\";" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + + It("contains tailwind requirement in postcss.config.js", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.Tailwind, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("postcss.config.js") + + expectedContent := "require(\"tailwindcss\")" + + Expect(content).To(ContainSubstring(expectedContent)) + }) + }) + + Context("given NO tailwind add-on", func() { + It("does NOT contain lib/web/assets/stylesheets/vendors/tailwind folder", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("lib/web/assets/stylesheets/vendors/tailwind") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain tailwind.config.js file", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + _, err := os.Stat("tailwind.config.js") + + Expect(os.IsNotExist(err)).To(BeTrue()) + }) + + It("does NOT contain tailwind package in package.json", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("package.json") + + expectedContent := "\"tailwindcss\":" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain tailwind scss import in lib/web/assets/stylesheets/application.scss", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("lib/web/assets/stylesheets/application.scss") + + expectedContent := "@import \"./vendors/tailwind\";" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + + It("does NOT contain tailwind requirement in postcss.config.js", func() { + cookiecutter := tests.Cookiecutter{ + Variant: tests.Web, + CssAddon: tests.None, + } + cookiecutter.CreateProjectFromGinTemplate(currentTemplatePath) + content := tests.ReadFile("postcss.config.js") + + expectedContent := "require(\"tailwindcss\")" + + Expect(content).NotTo(ContainSubstring(expectedContent)) + }) + }) }) diff --git a/cookiecutter.json b/cookiecutter.json index a4b4429..39c6878 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -1,3 +1,12 @@ { - "app_name": "default-app-name" + "app_name": "default-app-name", + "variant": ["API only", "Web only", "Both"], + "css_addon": ["Bootstrap", "Tailwind", "None"], + "use_logrus": ["yes", "no"], + "use_heroku": ["yes", "no"], + + "_api_variant": "no", + "_web_variant": "no", + "_bootstrap_addon": "no", + "_tailwind_addon": "no" } diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py new file mode 100644 index 0000000..a4c1c70 --- /dev/null +++ b/hooks/post_gen_project.py @@ -0,0 +1,92 @@ +import os +import shutil + +# Get the root project directory +PROJECT_DIRECTORY = os.path.realpath(os.path.curdir) + +def remove_files(path): + """ + Removes files in path + """ + shutil.rmtree(os.path.join( + PROJECT_DIRECTORY, path + )) + +def remove_file(path): + """ + Removes file with path + """ + os.remove(os.path.join( + PROJECT_DIRECTORY, path + )) + +# Print log with color +def print_log(message): + """ + Print log with color + """ + CYELLOW = '\33[33m' # YELLOW color + CEND = '\033[0m' # END color + print(CYELLOW + message + CEND) + +def remove_empty_folders(): + """ + List all empty folders and remove them + """ + for root, dirs, files in os.walk(PROJECT_DIRECTORY, topdown=False): + for dir in dirs: + if os.path.isdir(os.path.join(root, dir)): + if (len(os.listdir(os.path.join(root, dir))) == 0): + print_log(f'Removing {dir} folder') + os.rmdir(os.path.join(root, dir)) + + +# Remove logrus add-on if not seleted +if '{{ cookiecutter.use_logrus }}'.lower() == 'no': + print_log('Removing logrus add-on') + + remove_files("helpers/log") + +# Remove heroku add-on if not seleted +if '{{ cookiecutter.use_heroku }}'.lower() == 'no': + print_log('Removing heroku add-on') + + remove_files("deploy/heroku") + remove_file(".github/workflows/deploy.yml") + +# Remove bootstrap add-on if not seleted +if '{{ cookiecutter._bootstrap_addon }}' == 'no': + print_log('Removing bootstrap add-on') + remove_files("lib/web/assets/stylesheets/vendors/bootstrap") + +# Remove tailwind add-on if not seleted +if '{{ cookiecutter._tailwind_addon }}' == 'no': + print_log('Removing tailwind add-on') + remove_files("lib/web/assets/stylesheets/vendors/tailwind") + remove_file("tailwind.config.js") + +# Remove web variant if not selected +if '{{ cookiecutter._web_variant }}' == 'no': + print_log('Removing web variant related files') + + # Web folder + remove_files('lib/web') + + # Config files + remove_file('.eslintrc.json') + remove_file('.npmrc') + remove_file('package.json') + remove_file('snowpack.config.js') + remove_file('postcss.config.js') + remove_file('tsconfig.json') + +# Download the missing dependencies +print_log('Downloading dependencies') +os.system("go mod tidy") + +# Format code +print_log('Formating code') +os.system("go fmt ./...") + +# Remove empty folders +remove_empty_folders() diff --git a/hooks/pre_gen_project.py b/hooks/pre_gen_project.py new file mode 100644 index 0000000..679ccaa --- /dev/null +++ b/hooks/pre_gen_project.py @@ -0,0 +1,31 @@ +''' +Setting easy to read/maintain cookiecutter variables: + +----------- +Web/API Variant +cookiecutter._web_variant +cookiecutter._api_variant +----------- +{% if cookiecutter.variant in ['Web only', 'Both'] %} + {{ cookiecutter.update({ '_web_variant': 'yes' }) }} +{% endif %} + +API Variant +{% if cookiecutter.variant in ['API only', 'Both'] %} + {{ cookiecutter.update({ '_api_variant': 'yes' }) }} +{% endif %} + +----------- +CSS Addons +cookiecutter._bootstrap_addon +cookiecutter._tailwind_addon +----------- +Only project with web: +{% if cookiecutter._web_variant == 'yes' %} + {% if cookiecutter.css_addon == 'Bootstrap' %} + {{ cookiecutter.update({ '_bootstrap_addon': 'yes' }) }} + {% elif cookiecutter.css_addon == 'Tailwind' %} + {{ cookiecutter.update({ '_tailwind_addon': 'yes' }) }} + {% endif %} +{% endif %} +''' diff --git a/tests/cookiecutter.go b/tests/cookiecutter.go new file mode 100644 index 0000000..eead37e --- /dev/null +++ b/tests/cookiecutter.go @@ -0,0 +1,68 @@ +package tests + +import ( + "fmt" + "reflect" + "strings" +) + +type Choices string +type Variants string +type CssAddons string + +const ( + Yes Choices = "1" + No Choices = "2" + + API Variants = "1" + Web Variants = "2" + Both Variants = "3" + + Bootstrap CssAddons = "1" + Tailwind CssAddons = "2" + None CssAddons = "3" +) + +// Field and order MUST be the same as cookiecutter.json +type Cookiecutter struct { + AppName string + Variant Variants + CssAddon CssAddons + UseLogrus Choices + UseHeroku Choices +} + +func (c *Cookiecutter) fillDefaultValue() { + if len(c.AppName) == 0 { + c.AppName = "test-gin-templates" + } + + if c.UseLogrus != Yes && c.UseLogrus != No { + c.UseLogrus = No + } + + if c.UseHeroku != Yes && c.UseHeroku != No { + c.UseHeroku = No + } + + if c.CssAddon != Bootstrap && c.CssAddon != Tailwind && c.CssAddon != None { + c.CssAddon = None + } + + if c.Variant != API && c.Variant != Web && c.Variant != Both { + c.Variant = API + } +} + +func (c *Cookiecutter) structToString() string { + var structString strings.Builder + + c.fillDefaultValue() + + v := reflect.ValueOf(*c) + for i := 0; i < v.NumField(); i++ { + structString.WriteString(fmt.Sprintf("%v\n", v.Field(i))) + } + + return structString.String() +} diff --git a/tests/path.go b/tests/path.go index 2ebb2d2..ddb30bb 100644 --- a/tests/path.go +++ b/tests/path.go @@ -6,6 +6,15 @@ import ( . "github.com/onsi/ginkgo" ) +func GetCurrentDirectory() string { + currentPath, err := os.Getwd() + if err != nil { + Fail("Failed to get current directory: " + err.Error()) + } + + return currentPath +} + func ChangeDirectory(dir string) { err := os.Chdir(dir) if err != nil { diff --git a/tests/template.go b/tests/template.go index 4cc1774..0880a43 100644 --- a/tests/template.go +++ b/tests/template.go @@ -1,82 +1,32 @@ package tests import ( - "log" - "os" + "io" "os/exec" . "github.com/onsi/ginkgo" ) -func DownloadGinTemplate() { - shCmd := exec.Command("go", "get", "github.com/nimblehq/gin-templates") - shCmd.Stdout = os.Stdout - err := shCmd.Run() - if err != nil { - Fail("Failed to get gin-templates: " + err.Error()) - } else { - log.Println("Gin-templates downloaded successfully.") - } -} +func (c Cookiecutter) CreateProjectFromGinTemplate(currentTemplatePath string) { + shCmd := exec.Command("cookiecutter", "../") -func BuildGinTemplate() { - shCmd := exec.Command("go", "build", "-o", os.Getenv("GOPATH")+"/bin/nimble-gin", "github.com/nimblehq/gin-templates") - shCmd.Stdout = os.Stdout - err := shCmd.Run() + stdin, err := shCmd.StdinPipe() if err != nil { - Fail("Failed to build gin-templates: " + err.Error()) - } else { - log.Println("Gin-templates built successfully.") + Fail("Failed to get stdin pipe: " + err.Error()) } -} - -func RemoveCookiecuttersCache() { - shCmd := exec.Command("rm", "-rf", os.Getenv("HOME")+"/.cookiecutters/gin-templates") - shCmd.Stdout = os.Stdout - err := shCmd.Run() - if err != nil { - Fail("Failed to remove cookiecutters cache: " + err.Error()) - } else { - log.Println("Cookiecutters cache removed successfully.") - } -} - -func CreateProjectFromGinTemplate() string { - input := []byte("test-gin-templates") - - reader, writer, err := os.Pipe() - if err != nil { - Fail("Failed to create file to store stdin value: " + err.Error()) - } - - _, err = writer.Write(input) - if err != nil { - Fail("Failed to write stdin value to file: " + err.Error()) - } - writer.Close() - - var shCmd *exec.Cmd - if os.Getenv("BRANCH") == "" { - shCmd = exec.Command("nimble-gin", "create") - } else { - shCmd = exec.Command("nimble-gin", "create", "-b", os.Getenv("BRANCH")) - } - - shCmd.Stdout = os.Stdout - shCmd.Stdin = reader - - err = shCmd.Run() - if err != nil { - Fail("Failed to create template: " + err.Error()) - } else { - log.Println("Template created successfully.") - } + go func() { + defer stdin.Close() + _, err = io.WriteString(stdin, c.structToString()) + if err != nil { + Fail("Failed to write std value to file: " + err.Error()) + } + }() - currentPath, err := os.Getwd() + output, err := shCmd.CombinedOutput() if err != nil { - Fail("Failed to get current directory: " + err.Error()) + Fail("Failed to create template: " + err.Error() + "\n" + string(output)) } - return currentPath + ChangeDirectory(currentTemplatePath + "/" + c.AppName) } diff --git a/{{cookiecutter.app_name}}/.eslintrc.json b/{{cookiecutter.app_name}}/.eslintrc.json new file mode 100644 index 0000000..e66bffa --- /dev/null +++ b/{{cookiecutter.app_name}}/.eslintrc.json @@ -0,0 +1,20 @@ +{ + "rules": {}, + "env": { + "es6": true, + "browser": true, + "node": true + }, + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module" + }, + "extends": [ + "eslint:recommended", + "plugin:prettier/recommended" + ], + "globals": { + "Atomics": "readonly", + "SharedArrayBuffer": "readonly" + } +} diff --git a/{{cookiecutter.app_name}}/.github/workflows/test.yml b/{{cookiecutter.app_name}}/.github/workflows/test.yml index d6d7de5..b099589 100644 --- a/{{cookiecutter.app_name}}/.github/workflows/test.yml +++ b/{{cookiecutter.app_name}}/.github/workflows/test.yml @@ -6,18 +6,18 @@ jobs: test: runs-on: ubuntu-latest steps: - - name: Checkout + - name: Check out Git repository uses: actions/checkout@v2.3.4 - - name: Setup Go environment + - name: Setup Go uses: actions/setup-go@v2.1.3 with: go-version: 1.16.x - - name: Create ENV file + - name: Create .env file run: cp ".env.example" ".env" - - name: Linters + - name: Run linters uses: golangci/golangci-lint-action@v2 with: version: v1.29 @@ -25,5 +25,5 @@ jobs: - name: Install dependencies run: make install-dependencies - - name: Test + - name: Run tests run: make test diff --git a/{{cookiecutter.app_name}}/.gitignore b/{{cookiecutter.app_name}}/.gitignore index 47760cd..e1097ed 100644 --- a/{{cookiecutter.app_name}}/.gitignore +++ b/{{cookiecutter.app_name}}/.gitignore @@ -1,2 +1,11 @@ -tmp/ +{% if cookiecutter._web_variant == "yes" %}/node_modules +{% endif %}tmp/ .env + +{%- if cookiecutter.use_heroku == "yes" %} +# Terraform generated files +deploy/**/.terraform/ +deploy/**/terraform.tfstate +deploy/**/terraform.tfstate.backup +deploy/**/*.tfvars +{%- endif %} diff --git a/{{cookiecutter.app_name}}/.npmrc b/{{cookiecutter.app_name}}/.npmrc new file mode 100644 index 0000000..cffe8cd --- /dev/null +++ b/{{cookiecutter.app_name}}/.npmrc @@ -0,0 +1 @@ +save-exact=true diff --git a/{{cookiecutter.app_name}}/Makefile b/{{cookiecutter.app_name}}/Makefile index fe744e0..cb0ae14 100644 --- a/{{cookiecutter.app_name}}/Makefile +++ b/{{cookiecutter.app_name}}/Makefile @@ -28,15 +28,17 @@ endif migration/status: goose -dir database/migrations -table "migration_versions" postgres "$(DATABASE_URL)" status -dev: +dev: make env-setup make db/migrate - air -c cmd/api/.air.toml + forego start -f Procfile.dev install-dependencies: go get github.com/cosmtrek/air@v1.15.1 go get github.com/pressly/goose/cmd/goose + go get github.com/ddollar/forego go mod tidy + {% if cookiecutter._web_variant == "yes" %}npm install{% endif %} test: docker-compose -f docker-compose.test.yml up -d diff --git a/{{cookiecutter.app_name}}/Procfile.dev b/{{cookiecutter.app_name}}/Procfile.dev new file mode 100644 index 0000000..7081c8a --- /dev/null +++ b/{{cookiecutter.app_name}}/Procfile.dev @@ -0,0 +1,2 @@ +web: air -c cmd/api/.air.toml{% if cookiecutter._web_variant == "yes" %} +snowpack: npm run dev{% endif %} diff --git a/{{cookiecutter.app_name}}/README.md b/{{cookiecutter.app_name}}/README.md index 2ddd44c..09748c7 100644 --- a/{{cookiecutter.app_name}}/README.md +++ b/{{cookiecutter.app_name}}/README.md @@ -10,6 +10,8 @@ - [Go - 1.16](https://golang.org/doc/go1.16) or newer +{% if cookiecutter._web_variant == "yes" %}- [Node - 14](https://nodejs.org/en/){% endif %} + ### Development #### Create an ENV file @@ -22,7 +24,9 @@ To start the development server, `.env` file must be created. - [`air`](https://github.com/cosmtrek/air) is used for live reloading -- [`goose`](https://github.com/pressly/goose) is used for database migration. +- [`goose`](https://github.com/pressly/goose) is used for database migration. + +- [`forego`](https://github.com/ddollar/forego) manages Procfile-based applications. They need to be built as a binary file in `$GOPATH`. @@ -72,3 +76,60 @@ make db/migrate ```make make db/rollback ``` + +{%- if cookiecutter.use_heroku == "yes" %} +### Deploy to Heroku with Terraform + +#### Prerequisites + +- [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) latest version +- [Terraform](https://www.terraform.io/downloads.html) + +To deploy the application to Heroku with Terraform, we need to create the Heroku API Key first: + +```bash +$ heroku login +$ heroku authorizations:create --description +``` + +And then, move to the `deploy/heroku` folder and run the following steps: + +_Step 1:_ Copy the variable file and update the variables + +```sh +$ cp terraform.tfvars.sample terraform.tfvars +``` + +*You can get the `tfvars` files from 1Password* + +_Step 2:_ Initialize Terraform + +```sh +$ terraform init +``` + +_Step 3:_ Generate an execution plan + +```sh +$ terraform plan -var-file="terraform.tfvars" +``` + +_Step 5:_ Execute the generated plan + +```sh +$ terraform apply -var-file="terraform.tfvars" +``` + +_Step 6:_ Build the application and push to heroku + +You can check `.github/workflows/deploy.yml` workflow for more details + +_Make sure you set the following Github secrets before deploying the application:_ + +``` +HEROKU_ACCOUNT_EMAIL # Heroku email +HEROKU_API_KEY # Heroku OAuth token +HEROKU_APP_NAME_PRODUCTION # Heroku app name for production +HEROKU_APP_NAME_STAGING # Heroku app name for staging +``` +{%- endif %} diff --git a/{{cookiecutter.app_name}}/bootstrap/config.go b/{{cookiecutter.app_name}}/bootstrap/config.go index f00a4c6..af9aa40 100644 --- a/{{cookiecutter.app_name}}/bootstrap/config.go +++ b/{{cookiecutter.app_name}}/bootstrap/config.go @@ -1,8 +1,10 @@ package bootstrap import ( - "log" - + {% if cookiecutter.use_logrus == "no" %}"log" + {% endif %} + {% if cookiecutter.use_logrus == "yes" %}"github.com/nimblehq/{{cookiecutter.app_name}}/helpers/log" + {% endif %} "github.com/spf13/viper" ) diff --git a/{{cookiecutter.app_name}}/bootstrap/database.go b/{{cookiecutter.app_name}}/bootstrap/database.go index b79172d..91943e0 100644 --- a/{{cookiecutter.app_name}}/bootstrap/database.go +++ b/{{cookiecutter.app_name}}/bootstrap/database.go @@ -2,11 +2,12 @@ package bootstrap import ( "fmt" - "log" "strings" - + {% if cookiecutter.use_logrus == "no" %}"log" + {% endif %} "github.com/nimblehq/{{cookiecutter.app_name}}/helpers" - + {% if cookiecutter.use_logrus == "yes" %}"github.com/nimblehq/{{cookiecutter.app_name}}/helpers/log" + {% endif %} "github.com/gin-gonic/gin" "github.com/spf13/viper" "gorm.io/driver/postgres" diff --git a/{{cookiecutter.app_name}}/bootstrap/router.go b/{{cookiecutter.app_name}}/bootstrap/router.go index 87b3e2b..72ac012 100644 --- a/{{cookiecutter.app_name}}/bootstrap/router.go +++ b/{{cookiecutter.app_name}}/bootstrap/router.go @@ -2,7 +2,8 @@ package bootstrap import ( apiv1router "github.com/nimblehq/{{cookiecutter.app_name}}/lib/api/v1/routers" - + {% if cookiecutter._web_variant == "yes" %}webrouter "github.com/nimblehq/{{cookiecutter.app_name}}/lib/web/routers" + {% endif %} "github.com/gin-gonic/gin" ) @@ -10,6 +11,7 @@ func SetupRouter() *gin.Engine { r := gin.Default() apiv1router.ComebineRoutes(r) - + {% if cookiecutter._web_variant == "yes" %}webrouter.ComebineRoutes(r) + {% endif %} return r } diff --git a/{{cookiecutter.app_name}}/cmd/api/main.go b/{{cookiecutter.app_name}}/cmd/api/main.go index b45f623..40a2d47 100644 --- a/{{cookiecutter.app_name}}/cmd/api/main.go +++ b/{{cookiecutter.app_name}}/cmd/api/main.go @@ -2,9 +2,10 @@ package main import ( "fmt" - "log" + {% if cookiecutter.use_logrus == "no" %}"log"{% endif %} "github.com/nimblehq/{{cookiecutter.app_name}}/bootstrap" + {% if cookiecutter.use_logrus == "yes" %}"github.com/nimblehq/{{cookiecutter.app_name}}/helpers/log"{% endif %} "github.com/gin-gonic/gin" "github.com/spf13/viper" diff --git a/{{cookiecutter.app_name}}/deploy/heroku/config.tf b/{{cookiecutter.app_name}}/deploy/heroku/config.tf new file mode 100644 index 0000000..a58ed4c --- /dev/null +++ b/{{cookiecutter.app_name}}/deploy/heroku/config.tf @@ -0,0 +1,12 @@ +resource "heroku_config" "common" { + # Environment variables + vars = { + GIN_MODE = "release" + } +} + +resource "heroku_app_config_association" "default" { + app_id = heroku_app.default.id + + vars = heroku_config.common.vars +} diff --git a/{{cookiecutter.app_name}}/deploy/heroku/main.tf b/{{cookiecutter.app_name}}/deploy/heroku/main.tf new file mode 100644 index 0000000..7ef6a83 --- /dev/null +++ b/{{cookiecutter.app_name}}/deploy/heroku/main.tf @@ -0,0 +1,28 @@ +terraform { + required_providers { + heroku = { + source = "heroku/heroku" + version = "~> 4.1" + } + } +} + +provider "heroku" { + email = var.heroku_email + api_key = var.heroku_api_key +} + +resource "heroku_app" "default" { + name = var.app_name + region = var.app_region + stack = var.app_stack + + organization { + name = var.heroku_organization + } +} + +resource "heroku_addon" "postgresql" { + app = heroku_app.default.name + plan = "heroku-postgresql:${var.postgresql_plan}" +} diff --git a/{{cookiecutter.app_name}}/deploy/heroku/terraform.tfvars.sample b/{{cookiecutter.app_name}}/deploy/heroku/terraform.tfvars.sample new file mode 100644 index 0000000..d710fbb --- /dev/null +++ b/{{cookiecutter.app_name}}/deploy/heroku/terraform.tfvars.sample @@ -0,0 +1,7 @@ +heroku_email = "" +heroku_api_key = "" +heroku_organization = "nimblehq" +app_name = "{{cookiecutter.app_name}}" +app_region = "us" +postgresql_plan = "hobby-dev" +dyno_size = "Free" diff --git a/{{cookiecutter.app_name}}/deploy/heroku/variables.tf b/{{cookiecutter.app_name}}/deploy/heroku/variables.tf new file mode 100644 index 0000000..dd42efb --- /dev/null +++ b/{{cookiecutter.app_name}}/deploy/heroku/variables.tf @@ -0,0 +1,41 @@ +variable "heroku_email" { + description = "The email of Heroku account" +} + +variable "heroku_api_key" { + description = "The API key of Heroku account" +} + +variable "heroku_organization" { + description = "The team name of Heroku account" +} + +variable "app_name" { + description = "Heroku application name" + default = "{{cookiecutter.app_name}}" +} + +variable "app_region" { + description = "Heroku region" + default = "us" +} + +variable "app_stack" { + description = "Heroku stack" + default = "container" +} + +variable "postgresql_plan" { + description = "Heroku PostgreSQL addon plan" + default = "hobby-dev" +} + +variable "dyno_size" { + description = "Heroku Formation dyno size" + default = "Free" +} + +variable "dyno_quantity" { + description = "Heroku Formation dyno quantity" + default = 1 +} diff --git a/{{cookiecutter.app_name}}/go.mod b/{{cookiecutter.app_name}}/go.mod index 99ea971..55551de 100644 --- a/{{cookiecutter.app_name}}/go.mod +++ b/{{cookiecutter.app_name}}/go.mod @@ -10,4 +10,5 @@ require ( github.com/spf13/viper v1.7.1 gorm.io/driver/postgres v1.0.8 gorm.io/gorm v1.20.12 + {% if cookiecutter.use_logrus == "yes" -%}github.com/sirupsen/logrus v1.8.1{%- endif %} ) diff --git a/{{cookiecutter.app_name}}/go.sum b/{{cookiecutter.app_name}}/go.sum deleted file mode 100644 index df128a8..0000000 --- a/{{cookiecutter.app_name}}/go.sum +++ /dev/null @@ -1,507 +0,0 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= -cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= -cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= -cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= -cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= -cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= -github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= -github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14= -github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY= -github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= -github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= -github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= -github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= -github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= -github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= -github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= -github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= -github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= -github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= -github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= -github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= -github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= -github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= -github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8= -github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= -github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= -github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= -github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= -github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= -github.com/jackc/pgconn v1.8.0 h1:FmjZ0rOyXTr1wfWs45i4a9vjnjWUAGpMuQLD9OSs+lw= -github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= -github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= -github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= -github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA= -github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= -github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.0.6 h1:b1105ZGEMFe7aCvrT1Cca3VoVb4ZFMaFJLJcg/3zD+8= -github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= -github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= -github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= -github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= -github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= -github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= -github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= -github.com/jackc/pgtype v1.6.2 h1:b3pDeuhbbzBYcg5kwNmNDun4pFUD/0AAr1kLXZLeNt8= -github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= -github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= -github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= -github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= -github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= -github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= -github.com/jackc/pgx/v4 v4.10.1 h1:/6Q3ye4myIj6AaplUm+eRcz4OhK9HAvFf4ePsG40LJY= -github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA= -github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.1.1 h1:g39TucaRWyV3dwDO++eEc6qf8TVIQ/Da48WmqjZ3i7E= -github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0 h1:/qkRGz8zljWiDcFvgpwUpwIAPu3r07TDvs3Rws+o/pU= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= -github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= -github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= -github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= -github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc h1:jUIKcSPO9MoMJBbEoyE/RJoE8vz7Mb8AjvifMMwSyvY= -github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= -github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= -github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= -github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= -github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= -go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= -go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= -golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= -golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= -golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= -golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb h1:eBmm0M9fYhWpKZLjQUUKka/LtIxf46G4fxeEz5KJr9U= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091 h1:DMyOG0U+gKfu8JZzg2UQe9MeaC1X+xQWlAKcRnjxjCw= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= -google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= -google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= -google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= -google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= -google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= -google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= -google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= -google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= -google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gorm.io/driver/postgres v1.0.8 h1:PAgM+PaHOSAeroTjHkCHCBIHHoBIf9RgPWGo8dF2DA8= -gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg= -gorm.io/gorm v1.20.12 h1:ebZ5KrSHzet+sqOCVdH9mTjW91L298nX3v5lVxAzSUY= -gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/{{cookiecutter.app_name}}/helpers/log/log.go b/{{cookiecutter.app_name}}/helpers/log/log.go new file mode 100644 index 0000000..430ed83 --- /dev/null +++ b/{{cookiecutter.app_name}}/helpers/log/log.go @@ -0,0 +1,178 @@ +package log + +import "github.com/sirupsen/logrus" + +type Logger interface { + Debug(args ...interface{}) + Debugf(format string, args ...interface{}) + Debugln(args ...interface{}) + Error(args ...interface{}) + Errorf(format string, args ...interface{}) + Errorln(args ...interface{}) + Fatal(args ...interface{}) + Fatalf(format string, args ...interface{}) + Fatalln(args ...interface{}) + Info(args ...interface{}) + Infof(format string, args ...interface{}) + Infoln(args ...interface{}) + Panic(args ...interface{}) + Panicf(format string, args ...interface{}) + Panicln(args ...interface{}) + Print(args ...interface{}) + Printf(format string, args ...interface{}) + Println(args ...interface{}) + Warn(args ...interface{}) + Warnf(format string, args ...interface{}) + Warning(args ...interface{}) + Warningf(format string, args ...interface{}) + Warningln(args ...interface{}) + Warnln(args ...interface{}) +} + +var defaultLogger *logrus.Logger + +func init() { + defaultLogger = logrus.New() +} + +// Fields is a map string interface to define fields in the structured log +type Fields map[string]interface{} + +// With allow us to define fields in out structured logs +func (f Fields) With(key string, value interface{}) Fields { + f[key] = value + return f +} + +// WithFields allow us to define fields in out structured logs +func (f Fields) WithFields(fields Fields) Fields { + for k, v := range fields { + f[k] = v + } + return f +} + +// WithFields allow us to define fields in out structured logs +func WithFields(fields Fields) Logger { + return defaultLogger.WithFields(logrus.Fields(fields)) +} + +// Debug package-level convenience method. +func Debug(args ...interface{}) { + defaultLogger.Debug(args...) +} + +// Debugf package-level convenience method. +func Debugf(format string, args ...interface{}) { + defaultLogger.Debugf(format, args...) +} + +// Debugln package-level convenience method. +func Debugln(args ...interface{}) { + defaultLogger.Debugln(args...) +} + +// Error package-level convenience method. +func Error(args ...interface{}) { + defaultLogger.Error(args...) +} + +// Errorf package-level convenience method. +func Errorf(format string, args ...interface{}) { + defaultLogger.Errorf(format, args...) +} + +// Errorln package-level convenience method. +func Errorln(args ...interface{}) { + defaultLogger.Errorln(args...) +} + +// Fatal package-level convenience method. +func Fatal(args ...interface{}) { + defaultLogger.Fatal(args...) +} + +// Fatalf package-level convenience method. +func Fatalf(format string, args ...interface{}) { + defaultLogger.Fatalf(format, args...) +} + +// Fatalln package-level convenience method. +func Fatalln(args ...interface{}) { + defaultLogger.Fatalln(args...) +} + +// Info package-level convenience method. +func Info(args ...interface{}) { + defaultLogger.Info(args...) +} + +// Infof package-level convenience method. +func Infof(format string, args ...interface{}) { + defaultLogger.Infof(format, args...) +} + +// Infoln package-level convenience method. +func Infoln(args ...interface{}) { + defaultLogger.Infoln(args...) +} + +// Panic package-level convenience method. +func Panic(args ...interface{}) { + defaultLogger.Panic(args...) +} + +// Panicf package-level convenience method. +func Panicf(format string, args ...interface{}) { + defaultLogger.Panicf(format, args...) +} + +// Panicln package-level convenience method. +func Panicln(args ...interface{}) { + defaultLogger.Panicln(args...) +} + +// Print package-level convenience method. +func Print(args ...interface{}) { + defaultLogger.Print(args...) +} + +// Printf package-level convenience method. +func Printf(format string, args ...interface{}) { + defaultLogger.Printf(format, args...) +} + +// Println package-level convenience method. +func Println(args ...interface{}) { + defaultLogger.Println(args...) +} + +// Warn package-level convenience method. +func Warn(args ...interface{}) { + defaultLogger.Warn(args...) +} + +// Warnf package-level convenience method. +func Warnf(format string, args ...interface{}) { + defaultLogger.Warnf(format, args...) +} + +// Warning package-level convenience method. +func Warning(args ...interface{}) { + defaultLogger.Warning(args...) +} + +// Warningf package-level convenience method. +func Warningf(format string, args ...interface{}) { + defaultLogger.Warningf(format, args...) +} + +// Warningln package-level convenience method. +func Warningln(args ...interface{}) { + defaultLogger.Warningln(args...) +} + +// Warnln package-level convenience method. +func Warnln(args ...interface{}) { + defaultLogger.Warnln(args...) +} diff --git a/{{cookiecutter.app_name}}/lib/api/v1/controllers/health_test.go b/{{cookiecutter.app_name}}/lib/api/v1/controllers/health_test.go index 5094314..490175f 100644 --- a/{{cookiecutter.app_name}}/lib/api/v1/controllers/health_test.go +++ b/{{cookiecutter.app_name}}/lib/api/v1/controllers/health_test.go @@ -3,6 +3,7 @@ package controllers_test import ( "net/http" + "github.com/nimblehq/{{cookiecutter.app_name}}/lib/api/v1/controllers" "github.com/nimblehq/{{cookiecutter.app_name}}/test" . "github.com/onsi/ginkgo" @@ -12,13 +13,19 @@ import ( var _ = Describe("HealthController", func() { Describe("GET /health", func() { It("returns status OK", func() { - resp := test.MakeRequest("GET", "/api/v1/health", nil) + c, resp := test.CreateGinTestContext() + healthController := controllers.HealthController{} + + healthController.HealthStatus(c) Expect(resp.Code).To(Equal(http.StatusOK)) }) It("returns correct response body", func() { - resp := test.MakeRequest("GET", "/api/v1/health", nil) + c, resp := test.CreateGinTestContext() + healthController := controllers.HealthController{} + + healthController.HealthStatus(c) Expect(resp.Body.String()).To(Equal("{\"status\":\"alive\"}")) }) diff --git a/{{cookiecutter.app_name}}/lib/web/assets/images/logo.svg b/{{cookiecutter.app_name}}/lib/web/assets/images/logo.svg new file mode 100644 index 0000000..2677c69 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/images/logo.svg @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/{{cookiecutter.app_name}}/lib/web/assets/javascripts/application.ts b/{{cookiecutter.app_name}}/lib/web/assets/javascripts/application.ts new file mode 100644 index 0000000..940a3ff --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/javascripts/application.ts @@ -0,0 +1 @@ +console.log("Hello world!"); diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/_variables.scss b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/_variables.scss new file mode 100644 index 0000000..e0e9083 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/_variables.scss @@ -0,0 +1 @@ +// Variables diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/application.scss b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/application.scss new file mode 100644 index 0000000..f03a71b --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/application.scss @@ -0,0 +1,18 @@ +// Variables +@import './variables'; + +// Vendors +{% if cookiecutter._bootstrap_addon == "yes" %}@import "./vendors/bootstrap";{% endif %}{% if cookiecutter._tailwind_addon == "yes" %}@import "./vendors/tailwind";{% endif %} + +// Functions +@import './functions/sizing'; + +// Mixins + +// Base + +// Layouts + +// Components + +// Screens diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/base/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/base/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/components/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/components/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/functions/_sizing.scss b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/functions/_sizing.scss new file mode 100644 index 0000000..6f98a4e --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/functions/_sizing.scss @@ -0,0 +1,33 @@ +@function em($values, $base-font-size: 16px) { + $list: (); + + @each $value in $values { + @if ($value == 0 or $value == auto) { + $list: append($list, $value); + } + + @else { + $em-value: ($value / $base-font-size) + em; + $list: append($list, $em-value); + } + } + + @return $list; +} + +@function rem($values, $base-font-size: 16px) { + $list: (); + + @each $value in $values { + @if ($value == 0 or $value == auto) { + $list: append($list, $value); + } + + @else { + $rem-value: ($value / $base-font-size) + rem; + $list: append($list, $rem-value); + } + } + + @return $list; +} diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/layouts/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/layouts/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/mixins/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/mixins/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/screens/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/screens/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/.keep b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/.keep new file mode 100644 index 0000000..e69de29 diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/bootstrap/index.scss b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/bootstrap/index.scss new file mode 100644 index 0000000..44ec4ca --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/bootstrap/index.scss @@ -0,0 +1,43 @@ +// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc) +@import "./bootstrap/scss/functions"; + +// 2. Include remainder of required Bootstrap stylesheets +@import "./node_modules/bootstrap/scss/variables"; +@import "./node_modules/bootstrap/scss/mixins"; + +// 3. Include any optional Bootstrap components as you like +// Uncomment only the needed components + +@import "./node_modules/bootstrap/scss/root"; +@import "./node_modules/bootstrap/scss/reboot"; +@import "./node_modules/bootstrap/scss/type"; +@import "./node_modules/bootstrap/scss/containers"; +@import "./node_modules/bootstrap/scss/grid"; + +// @import "./node_modules/bootstrap/scss/accordion"; +// @import "./node_modules/bootstrap/scss/alert"; +// @import "./node_modules/bootstrap/scss/badge"; +// @import "./node_modules/bootstrap/scss/breadcrumb"; +// @import "./node_modules/bootstrap/scss/buttons"; +// @import "./node_modules/bootstrap/scss/button-group"; +// @import "./node_modules/bootstrap/scss/card"; +// @import "./node_modules/bootstrap/scss/carousel"; +// @import "./node_modules/bootstrap/scss/close"; +// @import "./node_modules/bootstrap/scss/dropdown"; +// @import "./node_modules/bootstrap/scss/forms"; +// @import "./node_modules/bootstrap/scss/helpers"; +// @import "./node_modules/bootstrap/scss/images"; +// @import "./node_modules/bootstrap/scss/list-group"; +// @import "./node_modules/bootstrap/scss/modal"; +// @import "./node_modules/bootstrap/scss/nav"; +// @import "./node_modules/bootstrap/scss/navbar"; +// @import "./node_modules/bootstrap/scss/offcanvas"; +// @import "./node_modules/bootstrap/scss/pagination"; +// @import "./node_modules/bootstrap/scss/popover"; +// @import "./node_modules/bootstrap/scss/progress"; +// @import "./node_modules/bootstrap/scss/spinners"; +// @import "./node_modules/bootstrap/scss/tables"; +// @import "./node_modules/bootstrap/scss/toasts"; +// @import "./node_modules/bootstrap/scss/tooltip"; +// @import "./node_modules/bootstrap/scss/transitions"; +// @import "./node_modules/bootstrap/scss/utilities"; diff --git a/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/tailwind/index.scss b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/tailwind/index.scss new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/assets/stylesheets/vendors/tailwind/index.scss @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/{{cookiecutter.app_name}}/lib/web/controllers/base.go b/{{cookiecutter.app_name}}/lib/web/controllers/base.go new file mode 100644 index 0000000..1ba0708 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/controllers/base.go @@ -0,0 +1,13 @@ +package controllers + +import ( + "github.com/gin-gonic/gin" +) + +type BaseController struct{} + +func (BaseController) Data(c *gin.Context, data gin.H) gin.H { + data["CurrentPath"] = c.Request.URL + + return data +} diff --git a/{{cookiecutter.app_name}}/lib/web/controllers/home.go b/{{cookiecutter.app_name}}/lib/web/controllers/home.go new file mode 100644 index 0000000..bbf9655 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/controllers/home.go @@ -0,0 +1,17 @@ +package controllers + +import ( + "net/http" + + "github.com/gin-gonic/gin" +) + +type HomeController struct { + BaseController +} + +func (hc HomeController) Index(c *gin.Context) { + c.HTML(http.StatusOK, "home/index", hc.Data(c, gin.H{ + "BodyClass": "home index", + })) +} diff --git a/{{cookiecutter.app_name}}/lib/web/routers/router.go b/{{cookiecutter.app_name}}/lib/web/routers/router.go new file mode 100644 index 0000000..f9bb78f --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/routers/router.go @@ -0,0 +1,35 @@ +package routers + +import ( + "html/template" + "net/url" + + "github.com/nimblehq/{{cookiecutter.app_name}}/lib/web/controllers" + + "github.com/gin-gonic/gin" + eztemplate "github.com/michelloworld/ez-gin-template" +) + +func ComebineRoutes(engine *gin.Engine) { + // Register HTML renderer + htmlRender := eztemplate.New() + htmlRender.Debug = gin.IsDebugging() + htmlRender.TemplatesDir = "lib/web/views/" + htmlRender.Layout = "layouts/application" + htmlRender.TemplateFuncMap = template.FuncMap{ + "isActive": isActive, + } + engine.HTMLRender = htmlRender.Init() + + // Assets + router := engine.Group("/") + router.Static("/static", "./static") + router.Static("/assets/images", "./lib/web/assets/images") + + // Routes + router.GET("/", controllers.HomeController{}.Index) +} + +func isActive(currentPath *url.URL, path string) bool { + return currentPath.String() == path +} diff --git a/{{cookiecutter.app_name}}/lib/web/views/home/index.html b/{{cookiecutter.app_name}}/lib/web/views/home/index.html new file mode 100644 index 0000000..708460a --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/views/home/index.html @@ -0,0 +1,5 @@ +{% raw -%} +{{ define "content" }} +
This is a sample of home page
+{{ end }} +{% endraw -%} diff --git a/{{cookiecutter.app_name}}/lib/web/views/layouts/application.html b/{{cookiecutter.app_name}}/lib/web/views/layouts/application.html new file mode 100644 index 0000000..441da81 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/views/layouts/application.html @@ -0,0 +1,28 @@ + + + + + {{cookiecutter.app_name}} + + + + + + + + {{ '{{' }} template "appHeader" . {{ '}}' }} +
+

{{ '{{' }} .Title {{ '}}' }}

+
{{ '{{' }} template "content" . {{ '}}' }}
+
+ + + + diff --git a/{{cookiecutter.app_name}}/lib/web/views/partials/_app_header.html b/{{cookiecutter.app_name}}/lib/web/views/partials/_app_header.html new file mode 100644 index 0000000..17addb0 --- /dev/null +++ b/{{cookiecutter.app_name}}/lib/web/views/partials/_app_header.html @@ -0,0 +1,9 @@ +{% raw -%} +{{ define "appHeader" }} +
+ + Logo + +
+{{ end }} +{% endraw -%} diff --git a/{{cookiecutter.app_name}}/package.json b/{{cookiecutter.app_name}}/package.json new file mode 100644 index 0000000..c3d848f --- /dev/null +++ b/{{cookiecutter.app_name}}/package.json @@ -0,0 +1,27 @@ +{ + "name": "{{cookiecutter.app_name}}", + "version": "0.1.0", + "description": "", + "keywords": [], + "author": "NimbleHQ", + "license": "MIT", + "scripts": { + "dev": "NODE_ENV=development MODE=development snowpack build --watch --no-minify --no-bundle", + "build": "snowpack build", + "clean": "rm -rf static" + }, + "devDependencies": { + "@snowpack/plugin-postcss": "1.4.3", + "@snowpack/plugin-sass": "1.4.0", + "@types/node": "15.12.5", + "autoprefixer": "10.2.6",{% if cookiecutter._bootstrap_addon == "yes" %} + "bootstrap": "5.0.2",{% endif %} + "eslint": "7.29.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "3.4.0", + "postcss": "8.3.5", + "prettier": "2.3.2", + "snowpack": "3.7.1"{% if cookiecutter._tailwind_addon == "yes" %}, + "tailwindcss": "2.2.7"{% endif %} + } +} diff --git a/{{cookiecutter.app_name}}/postcss.config.js b/{{cookiecutter.app_name}}/postcss.config.js new file mode 100644 index 0000000..7fdf91f --- /dev/null +++ b/{{cookiecutter.app_name}}/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: [ + require("autoprefixer"){% if cookiecutter._tailwind_addon == "yes" %}, + require("tailwindcss"){% endif %} + ], +}; diff --git a/{{cookiecutter.app_name}}/snowpack.config.js b/{{cookiecutter.app_name}}/snowpack.config.js new file mode 100644 index 0000000..7e15896 --- /dev/null +++ b/{{cookiecutter.app_name}}/snowpack.config.js @@ -0,0 +1,20 @@ +// Snowpack Configuration File +// See all supported options: https://www.snowpack.dev/reference/configuration + +/** @type {import("snowpack").SnowpackUserConfig } */ +module.exports = { + mount: { + "lib/web/assets": "/", + }, + plugins: ["@snowpack/plugin-postcss", "@snowpack/plugin-sass"], + packageOptions: { + /* ... */ + }, + devOptions: { + /* ... */ + }, + buildOptions: { + out: "static", + watch: process.env.NODE_ENV === "development", + }, +}; diff --git a/{{cookiecutter.app_name}}/tailwind.config.js b/{{cookiecutter.app_name}}/tailwind.config.js new file mode 100644 index 0000000..62dfdaf --- /dev/null +++ b/{{cookiecutter.app_name}}/tailwind.config.js @@ -0,0 +1,11 @@ +module.exports = { + purge: [], + darkMode: false, // or 'media' or 'class' + theme: { + extend: {}, + }, + variants: { + extend: {}, + }, + plugins: [], +} diff --git a/{{cookiecutter.app_name}}/test/http.go b/{{cookiecutter.app_name}}/test/http.go index 24c1543..c3fe973 100644 --- a/{{cookiecutter.app_name}}/test/http.go +++ b/{{cookiecutter.app_name}}/test/http.go @@ -1,22 +1,14 @@ package test import ( - "io" - "net/http" "net/http/httptest" - . "github.com/onsi/ginkgo" + "github.com/gin-gonic/gin" ) -func MakeRequest(method string, path string, body io.Reader) *httptest.ResponseRecorder { - req, err := http.NewRequest(method, path, body) - if err != nil { - Fail("Failed to make a request: " + err.Error()) - } - +func CreateGinTestContext() (*gin.Context, *httptest.ResponseRecorder) { resp := httptest.NewRecorder() + c, _ := gin.CreateTestContext(resp) - Router.ServeHTTP(resp, req) - - return resp + return c, resp } diff --git a/{{cookiecutter.app_name}}/test/test.go b/{{cookiecutter.app_name}}/test/test.go index 4476ba9..b17a49e 100644 --- a/{{cookiecutter.app_name}}/test/test.go +++ b/{{cookiecutter.app_name}}/test/test.go @@ -1,12 +1,13 @@ package test import ( - "log" "os" "path/filepath" "runtime" + {% if cookiecutter.use_logrus == "no" %}"log"{% endif %} "github.com/nimblehq/{{cookiecutter.app_name}}/bootstrap" + {% if cookiecutter.use_logrus == "yes" %}"github.com/nimblehq/{{cookiecutter.app_name}}/helpers/log"{% endif %} "github.com/gin-gonic/gin" ) @@ -21,8 +22,6 @@ func SetupTestEnvironment() { bootstrap.LoadConfig() bootstrap.InitDatabase() - - Router = bootstrap.SetupRouter() } func setRootDir() { diff --git a/{{cookiecutter.app_name}}/tsconfig.json b/{{cookiecutter.app_name}}/tsconfig.json new file mode 100644 index 0000000..e324855 --- /dev/null +++ b/{{cookiecutter.app_name}}/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "outDir": "./dist/", + "sourceMap": true, + "strict": true, + "noImplicitReturns": true, + "noImplicitAny": true, + "module": "es6", + "moduleResolution": "node", + "target": "es5", + "allowJs": true, + }, + "include": [ + "lib/web/**/*" + ] +}