Ver código fonte

Initial commit

Alexey Kim 2 anos atrás
commit
7ea2216233
17 arquivos alterados com 2524 adições e 0 exclusões
  1. 121 0
      .gitignore
  2. 8 0
      .idea/.gitignore
  3. 11 0
      .idea/customer.iml
  4. 8 0
      .idea/modules.xml
  5. 6 0
      .idea/vcs.xml
  6. 14 0
      .idea/webResources.xml
  7. 38 0
      cmd/main.go
  8. 22 0
      cmd/preset.go
  9. 52 0
      cmd/server.go
  10. 50 0
      go.mod
  11. 359 0
      go.sum
  12. 23 0
      graphql/errors.go
  13. 0 0
      graphql/generated/.gitkeep
  14. 22 0
      graphql/gqlgen.yml
  15. 192 0
      graphql/resolver_impl.go
  16. 1589 0
      graphql/schema.graphql
  17. 9 0
      tools.go

+ 121 - 0
.gitignore

@@ -0,0 +1,121 @@
+resources
+graphql/generated/*.go
+
+### JetBrains template
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn.  Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+
+### Go template
+# Binaries for programs and plugins
+*.exe
+*.exe~
+*.dll
+*.so
+*.dylib
+
+# Test binary, built with `go test -c`
+*.test
+
+# Output of the go coverage tool, specifically when used with LiteIDE
+*.out
+
+# Dependency directories (remove the comment below to include it)
+vendor/
+
+### macOS template
+# General
+.DS_Store
+.AppleDouble
+.LSOverride
+
+# Icon must end with two \r
+Icon
+
+# Thumbnails
+._*
+
+# Files that might appear in the root of a volume
+.DocumentRevisions-V100
+.fseventsd
+.Spotlight-V100
+.TemporaryItems
+.Trashes
+.VolumeIcon.icns
+.com.apple.timemachine.donotpresent
+
+# Directories potentially created on remote AFP share
+.AppleDB
+.AppleDesktop
+Network Trash Folder
+Temporary Items
+.apdisk
+

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 11 - 0
.idea/customer.iml

@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="Go" enabled="true" />
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$">
+      <excludeFolder url="file://$MODULE_DIR$/resources" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/customer.iml" filepath="$PROJECT_DIR$/.idea/customer.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 14 - 0
.idea/webResources.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WebResourcesPaths">
+    <contentEntries>
+      <entry url="file://$PROJECT_DIR$">
+        <entryData>
+          <resourceRoots>
+            <path value="file://$PROJECT_DIR$/resources" />
+          </resourceRoots>
+        </entryData>
+      </entry>
+    </contentEntries>
+  </component>
+</project>

+ 38 - 0
cmd/main.go

@@ -0,0 +1,38 @@
+package main
+
+import (
+	"github.com/gshopify/service-wrapper/config"
+	"github.com/spf13/pflag"
+	"os"
+	"time"
+)
+
+var (
+	fPort    = pflag.IntP("port", "p", 80, "exposing port")
+	fTimeout = pflag.DurationP("timeout", "t", 15*time.Second, "timeout duration")
+
+	fPreset = pflag.Bool("preset", false, "config preset mode")
+	fConfig = pflag.String("config", "", "config file path")
+)
+
+func init() {
+	pflag.Parse()
+	config.Instance()
+}
+
+func main() {
+	var err error
+
+	if *fPreset {
+		err = preset()
+	} else {
+		config.PrintBanner()
+		err = serve()
+	}
+
+	if err != nil {
+		panic(err)
+	}
+
+	os.Exit(0)
+}

+ 22 - 0
cmd/preset.go

@@ -0,0 +1,22 @@
+package main
+
+import (
+	"context"
+	"fmt"
+	"github.com/gshopify/service-wrapper/auth"
+	"github.com/gshopify/service-wrapper/config"
+	"os"
+)
+
+func preset() error {
+	if *fConfig == "" {
+		return fmt.Errorf("config file path must be provided")
+	}
+
+	f, err := os.Open(*fConfig)
+	if err != nil {
+		return err
+	}
+
+	return config.Instance().Set(context.Background(), auth.New(), f)
+}

+ 52 - 0
cmd/server.go

@@ -0,0 +1,52 @@
+package main
+
+import (
+	"context"
+	"github.com/99designs/gqlgen/graphql/handler"
+	"github.com/gshopify/service-wrapper/server"
+	"gshopper.com/gshopify/customer/graphql"
+	"gshopper.com/gshopify/customer/graphql/generated"
+	"log"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+)
+
+var (
+	signals = make(chan os.Signal, 1)
+)
+
+func serve() error {
+	opts, err := server.NewDefaultOpts(*fPort, *fTimeout)
+	if err != nil {
+		return err
+	}
+
+	resolver, err := graphql.NewResolver()
+	if err != nil {
+		return err
+	}
+
+	srv := server.NewServer(
+		handler.NewDefaultServer(
+			generated.NewExecutableSchema(generated.Config{Resolvers: resolver})),
+		opts)
+
+	go func() {
+		if err := srv.ListenAndServe(); err != nil {
+			log.Println(err)
+		}
+	}()
+
+	signal.Notify(signals, os.Interrupt, syscall.SIGTERM, syscall.SIGINT)
+	<-signals
+
+	ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
+	defer cancel()
+
+	_ = srv.Shutdown(ctx)
+
+	log.Println("shutting down")
+	return nil
+}

+ 50 - 0
go.mod

@@ -0,0 +1,50 @@
+module gshopper.com/gshopify/customer
+
+go 1.18
+
+require (
+	github.com/99designs/gqlgen v0.17.20
+	github.com/Nerzal/gocloak/v11 v11.2.0
+	github.com/golang-jwt/jwt/v4 v4.4.1
+	github.com/gshopify/service-wrapper v0.0.1-alpha
+	github.com/spf13/pflag v1.0.5
+	github.com/vektah/gqlparser/v2 v2.5.1
+)
+
+require (
+	filippo.io/age v1.0.0 // indirect
+	filippo.io/edwards25519 v1.0.0-rc.1 // indirect
+	github.com/agnivade/levenshtein v1.1.1 // indirect
+	github.com/coreos/go-semver v0.3.0 // indirect
+	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
+	github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
+	github.com/go-resty/resty/v2 v2.7.0 // indirect
+	github.com/gogo/protobuf v1.3.2 // indirect
+	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/gorilla/mux v1.8.0 // indirect
+	github.com/gorilla/websocket v1.5.0 // indirect
+	github.com/hashicorp/golang-lru v0.5.4 // indirect
+	github.com/mitchellh/mapstructure v1.3.1 // indirect
+	github.com/opentracing/opentracing-go v1.2.0 // indirect
+	github.com/pkg/errors v0.9.1 // indirect
+	github.com/russross/blackfriday/v2 v2.1.0 // indirect
+	github.com/segmentio/ksuid v1.0.4 // indirect
+	github.com/urfave/cli/v2 v2.8.1 // indirect
+	github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.5 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.5 // indirect
+	go.uber.org/atomic v1.7.0 // indirect
+	go.uber.org/multierr v1.6.0 // indirect
+	go.uber.org/zap v1.17.0 // indirect
+	golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f // indirect
+	golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
+	golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
+	golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
+	golang.org/x/text v0.3.7 // indirect
+	golang.org/x/tools v0.1.12 // indirect
+	google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
+	google.golang.org/grpc v1.41.0 // indirect
+	google.golang.org/protobuf v1.28.0 // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
+)

+ 359 - 0
go.sum

@@ -0,0 +1,359 @@
+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=
+filippo.io/age v1.0.0 h1:V6q14n0mqYU3qKFkZ6oOaF9oXneOviS3ubXsSVBRSzc=
+filippo.io/age v1.0.0/go.mod h1:PaX+Si/Sd5G8LgfCwldsSba3H1DDQZhIhFGkhbHaBq8=
+filippo.io/edwards25519 v1.0.0-rc.1 h1:m0VOOB23frXZvAOK44usCgLWvtsxIoMCTBGJZlpmGfU=
+filippo.io/edwards25519 v1.0.0-rc.1/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns=
+github.com/99designs/gqlgen v0.17.20 h1:O7WzccIhKB1dm+7g6dhQcULINftfiLSBg2l/mwbpJMw=
+github.com/99designs/gqlgen v0.17.20/go.mod h1:Mja2HI23kWT1VRH09hvWshFgOzKswpO20o4ScpJIES4=
+github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
+github.com/Nerzal/gocloak/v11 v11.2.0 h1:i67+hsEhSaolpJi1YKgwqH4dtSd8IdfHiEluxSEMm/U=
+github.com/Nerzal/gocloak/v11 v11.2.0/go.mod h1:vz59u7bBDKWoCdeTpY8i4LELtdwrLrIynAgPvO5ogQA=
+github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
+github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
+github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
+github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
+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/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
+github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
+github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
+github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM=
+github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
+github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+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/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
+github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
+github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
+github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
+github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
+github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+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-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPrFY=
+github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
+github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
+github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
+github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
+github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
+github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ=
+github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
+github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
+github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
+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.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
+github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
+github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+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/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
+github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
+github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/gshopify/service-wrapper v0.0.1-alpha h1:e3l4/7nL2oQwyrR9jHveVmrYdJF5Z5B9t6aNYS84cTI=
+github.com/gshopify/service-wrapper v0.0.1-alpha/go.mod h1:HInjHGe6WdK6KWtRZGgX6VfNJIE3yu9ncgLnGWi5oDI=
+github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
+github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
+github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
+github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM=
+github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
+github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
+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.3/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/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
+github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk=
+github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
+github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
+github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
+github.com/mitchellh/mapstructure v1.3.1 h1:cCBH2gTD2K0OtLlv/Y5H01VQCqmlDxz30kS5Y5bqfLA=
+github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
+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/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
+github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
+github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
+github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
+github.com/pkg/errors v0.9.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/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
+github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
+github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
+github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
+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/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
+github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
+github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
+github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
+github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
+github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
+github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/segmentio/ksuid v1.0.4 h1:sBo2BdShXjmcugAMwjugoGUdUV0pcxY5mW4xKRn3v4c=
+github.com/segmentio/ksuid v1.0.4/go.mod h1:/XUiZBD3kVx5SmUOl55voK5yeAbBNNIed+2O73XgrPE=
+github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
+github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
+github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
+github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
+github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
+github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+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/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/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
+github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4=
+github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
+github.com/vektah/gqlparser/v2 v2.5.1 h1:ZGu+bquAY23jsxDRcYpWjttRZrUz07LbiY77gUOHcr4=
+github.com/vektah/gqlparser/v2 v2.5.1/go.mod h1:mPgqFBu/woKTVYWyNk8cO3kh4S/f4aRFZrvOnp3hmCs=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
+github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
+github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
+go.etcd.io/etcd/api/v3 v3.5.5 h1:BX4JIbQ7hl7+jL+g+2j5UAr0o1bctCm6/Ct+ArBGkf0=
+go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.5 h1:9S0JUVvmrVl7wCF39iTQthdaaNIiAaQbmK75ogO6GU8=
+go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ=
+go.etcd.io/etcd/client/v3 v3.5.5 h1:q++2WTJbUgpQu4B6hCuT7VkdwaTP7Qz6Daak3WzbrlI=
+go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
+go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
+go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
+go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
+go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo=
+golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/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-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc=
+golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
+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-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
+golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
+golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+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-20181114220301-adae6a3d119a/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-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
+golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
+golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
+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-20200107190931-bf48bf16ab8d/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-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+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-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-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-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
+golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
+golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/text v0.3.0/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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
+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-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
+golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
+golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
+golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+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/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/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
+google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
+google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
+google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
+google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.41.0 h1:f+PlOh7QV4iIJkPrx5NQ7qaNGFQ3OTse67yaDHfju4E=
+google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k=
+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.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+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-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
+gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+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.3/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.5/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/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
+sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=

+ 23 - 0
graphql/errors.go

@@ -0,0 +1,23 @@
+package graphql
+
+import "gshopper.com/gshopify/customer/graphql/generated"
+
+var (
+	ErrTokenNotExists = ErrToken("access token does not exist")
+	ErrTokenExpired   = ErrToken("access token has been expired")
+	ErrToken          = func(s string) *generated.UserError {
+		return &generated.UserError{
+			Field:   []string{"customerAccessToken"},
+			Message: s,
+		}
+	}
+)
+
+func CustomerError(code generated.CustomerErrorCode, err error, fields ...string) *generated.CustomerUserError {
+	k := code
+	return &generated.CustomerUserError{
+		Code:    &k,
+		Field:   fields,
+		Message: err.Error(),
+	}
+}

+ 0 - 0
graphql/generated/.gitkeep


+ 22 - 0
graphql/gqlgen.yml

@@ -0,0 +1,22 @@
+federation:
+  filename: generated/federation.go
+  package: generated
+  version: 2
+schema:
+  - schema.graphql
+exec:
+  filename: generated/generated.go
+model:
+  filename: generated/models_gen.go
+resolver:
+  filename: generated/resolver.go
+  type: Resolver
+autobind: []
+omit_getters: true
+models:
+  LanguageCode:
+    model: github.com/gshopify/service-wrapper/model.LanguageCode
+  CountryCode:
+    model: github.com/gshopify/service-wrapper/model.CountryCode
+  UnsignedInt64:
+    model: github.com/gshopify/service-wrapper/model.UInt

+ 192 - 0
graphql/resolver_impl.go

@@ -0,0 +1,192 @@
+package graphql
+
+import (
+	"context"
+	"fmt"
+	"github.com/Nerzal/gocloak/v11"
+	"github.com/golang-jwt/jwt/v4"
+	"github.com/gshopify/service-wrapper/auth"
+	"github.com/gshopify/service-wrapper/config"
+	"github.com/gshopify/service-wrapper/model"
+	"github.com/gshopify/service-wrapper/scalar"
+	"gshopper.com/gshopify/customer/graphql/generated"
+	"strings"
+	"time"
+)
+
+type Resolver struct {
+	conf   *auth.Config
+	client gocloak.GoCloak
+}
+
+func NewResolver() (*Resolver, error) {
+	r := &Resolver{
+		conf: auth.New(),
+	}
+
+	if err := config.Instance().Load(context.Background(), r.conf); err != nil {
+		return nil, err
+	}
+
+	r.client = gocloak.NewClient(r.conf.Endpoint)
+	return r, nil
+}
+
+func (r *Resolver) decodeAccessToken(ctx context.Context, t string) (*jwt.Token, string, error) {
+	t = strings.TrimSpace(t)
+	if t == "" {
+		return nil, "", fmt.Errorf("could not decode accessToken: Token is empty")
+	}
+
+	token, claim, err := r.client.DecodeAccessToken(ctx, t, r.conf.Realm)
+	if err != nil {
+		return nil, "", err
+	}
+
+	if !token.Valid {
+		return nil, "", fmt.Errorf("could not decode accessToken: Token is NOT valid")
+	}
+
+	var sessionId string
+	if claimed, ok := (*claim)["sid"]; ok {
+		if s, ok := claimed.(string); ok {
+			sessionId = s
+		}
+	}
+
+	if sessionId == "" {
+		return nil, "", fmt.Errorf("could not claim session id")
+	}
+
+	return token, sessionId, nil
+}
+
+func (r *mutationResolver) CustomerAccessTokenCreate(
+	ctx context.Context,
+	input generated.CustomerAccessTokenCreateInput) (*generated.CustomerAccessTokenCreatePayload, error) {
+
+	var (
+		token *gocloak.JWT
+		err   error
+
+		session  = auth.SessionManager()
+		response = &generated.CustomerAccessTokenCreatePayload{}
+	)
+
+	if token, err = r.client.Login(ctx, r.conf.ClientId, r.conf.ClientSecret, r.conf.Realm, input.Email, input.Password); err != nil {
+		response.CustomerUserErrors = append(response.CustomerUserErrors,
+			CustomerError(generated.CustomerErrorCodeUnidentifiedCustomer, err))
+		return response, nil
+	}
+
+	if err = session.PutToken(ctx, token.SessionState, token.RefreshToken, time.Duration(token.RefreshExpiresIn)*time.Second); err != nil {
+		response.CustomerUserErrors = append(response.CustomerUserErrors,
+			CustomerError(generated.CustomerErrorCodeTokenInvalid, err))
+		return response, nil
+	}
+
+	response.CustomerAccessToken = &generated.CustomerAccessToken{
+		AccessToken: token.AccessToken,
+		ExpiresAt:   scalar.NewDateTimeIn(token.RefreshExpiresIn).String(),
+	}
+
+	return response, nil
+}
+
+func (r *mutationResolver) CustomerAccessTokenRenew(ctx context.Context, t string) (*generated.CustomerAccessTokenRenewPayload, error) {
+	var (
+		session  = auth.SessionManager()
+		response = &generated.CustomerAccessTokenRenewPayload{}
+	)
+
+	_, sid, err := r.decodeAccessToken(ctx, t)
+	if err != nil {
+		response.UserErrors = append(response.UserErrors, ErrTokenNotExists)
+		return response, nil
+	}
+
+	refresh, err := session.Token(ctx, sid)
+	if err != nil {
+		response.UserErrors = append(response.UserErrors, ErrToken(err.Error()))
+		return response, nil
+	}
+
+	token, err := r.client.RefreshToken(ctx, refresh, r.conf.ClientId, r.conf.ClientSecret, r.conf.Realm)
+	if err != nil {
+		response.UserErrors = append(response.UserErrors, ErrTokenExpired)
+		return response, nil
+	}
+
+	if err = session.PutToken(ctx, token.SessionState, token.RefreshToken, time.Duration(token.RefreshExpiresIn)*time.Second); err != nil {
+		response.UserErrors = append(response.UserErrors, ErrToken(err.Error()))
+		return response, nil
+	}
+
+	response.CustomerAccessToken = &generated.CustomerAccessToken{
+		AccessToken: token.AccessToken,
+		ExpiresAt:   scalar.NewDateTimeIn(token.RefreshExpiresIn).String(),
+	}
+	return response, nil
+}
+
+func (r *mutationResolver) CustomerAccessTokenDelete(ctx context.Context, t string) (*generated.CustomerAccessTokenDeletePayload, error) {
+	var (
+		response = &generated.CustomerAccessTokenDeletePayload{}
+		session  = auth.SessionManager()
+	)
+
+	_, sid, err := r.decodeAccessToken(ctx, t)
+	if err != nil {
+		response.UserErrors = append(response.UserErrors, ErrToken(err.Error()))
+		return response, nil
+	}
+
+	refresh, err := session.Token(ctx, sid)
+	if err != nil {
+		response.UserErrors = append(response.UserErrors, ErrToken(err.Error()))
+		return response, nil
+	}
+
+	if err = r.client.Logout(ctx, r.conf.ClientId, r.conf.ClientSecret, r.conf.Realm, refresh); err != nil {
+		response.UserErrors = append(response.UserErrors, ErrToken(err.Error()))
+		return response, nil
+	}
+
+	response.DeletedAccessToken = &t
+	response.DeletedCustomerAccessTokenID = &sid
+	return response, nil
+}
+
+func (r *queryResolver) Customer(ctx context.Context, t string) (*generated.Customer, error) {
+	if _, _, err := r.decodeAccessToken(ctx, t); err != nil {
+		return nil, err
+	}
+
+	userinfo, err := r.client.GetUserInfo(ctx, t, r.conf.Realm)
+	if err != nil {
+		return nil, err
+	}
+
+	return &generated.Customer{
+		AcceptsMarketing: false, //TODO:
+		Addresses:        nil,   //TODO:
+		DefaultAddress:   nil,   //TODO:
+		DisplayName:      *userinfo.PreferredUsername,
+		Email:            userinfo.Email,
+		FirstName:        userinfo.Name,
+		ID:               *userinfo.Sub,
+		LastName:         userinfo.FamilyName,
+		NumberOfOrders:   model.UInt(0), //TODO:
+		Phone:            userinfo.PhoneNumber,
+		Tags:             nil, //TODO:
+	}, nil
+}
+
+// Mutation returns generated.MutationResolver implementation.
+func (r *Resolver) Mutation() generated.MutationResolver { return &mutationResolver{r} }
+
+// Query returns generated.QueryResolver implementation.
+func (r *Resolver) Query() generated.QueryResolver { return &queryResolver{r} }
+
+type mutationResolver struct{ *Resolver }
+type queryResolver struct{ *Resolver }

+ 1589 - 0
graphql/schema.graphql

@@ -0,0 +1,1589 @@
+scalar DateTime
+scalar UnsignedInt64
+scalar URL
+scalar HTML
+
+union MetafieldParentResource = Customer
+union MetafieldReference = Page
+
+type Query {
+  # Find a customer by its access token.
+  customer(customerAccessToken: String!): Customer
+}
+
+type Mutation {
+  # Creates a customer access token.
+  # The customer access token is required to modify the customer object in any way.
+  customerAccessTokenCreate(input: CustomerAccessTokenCreateInput!): CustomerAccessTokenCreatePayload
+
+  # Renews a customer access token.
+  #
+  # Access token renewal must happen before a token expires.
+  # If a token has already expired, a new one should be created instead via `customerAccessTokenCreate`.
+  customerAccessTokenRenew(customerAccessToken: String!): CustomerAccessTokenRenewPayload
+
+  # Permanently destroys a customer access token.
+  customerAccessTokenDelete(customerAccessToken: String!): CustomerAccessTokenDeletePayload
+}
+
+type Page implements Node&HasMetafields&OnlineStorePublishable{
+  # The description of the page, complete with HTML formatting.
+  body: HTML!
+
+  # Summary of the page body.
+  bodySummary: String!
+
+  # The timestamp of the page creation.
+  createdAt: DateTime!
+
+  # A human-friendly unique string for the page automatically generated from its title.
+  handle: String!
+
+  # A globally-unique identifier.
+  id: ID!
+
+  # Returns a metafield found by namespace and key.
+  metafield(namespace: String!key: String!): Metafield
+
+  # The metafields associated with the resource matching the supplied list of namespaces and keys.
+  metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]!
+
+  # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel.
+  onlineStoreUrl: URL
+
+  # The page's SEO information.
+  seo: SEO
+
+  # The title of the page.
+  title: String!
+
+  # The timestamp of the latest page update.
+  updatedAt: DateTime!
+}
+
+# SEO information.
+type SEO {
+  # The meta description.
+  description: String
+
+  # The SEO title.
+  title: String
+}
+
+# Represents a resource that can be published to the Online Store sales channel.
+interface OnlineStorePublishable {
+  # The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel.
+  onlineStoreUrl: URL
+}
+
+# Represents information about the metafields associated to the specified resource.
+interface HasMetafields {
+  # Returns a metafield found by namespace and key.
+  metafield(namespace: String!key: String!): Metafield
+
+  # The metafields associated with the resource matching the supplied list of namespaces and keys.
+  metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]!
+}
+
+type MetafieldReferenceEdge {
+  # A cursor for use in pagination.
+  cursor: String!
+
+  # The item at the end of MetafieldReferenceEdge.
+  node: MetafieldReference!
+}
+
+# An object with an ID field to support global identification, in accordance with the
+# Relay specification.
+# This interface is used by the node
+# and nodes queries.
+interface Node {
+  # A globally-unique identifier.
+  id: ID!
+}
+
+# Metafields represent custom metadata attached to a resource.
+# Metafields can be sorted into namespaces and are comprised of keys, values, and value types.
+type Metafield implements Node {
+  # The date and time when the storefront metafield was created.
+  createdAt: DateTime!
+
+  # The description of a metafield.
+  description: String
+
+  # A globally-unique identifier.
+  id: ID!
+
+  # The key name for a metafield.
+  key: String!
+
+  # The namespace for a metafield.
+  namespace: String!
+
+  # The parent object that the metafield belongs to.
+  parentResource: MetafieldParentResource!
+
+  # Returns a reference object if the metafield definition's type is a resource reference.
+  reference: MetafieldReference
+
+  # A list of reference objects if the metafield's type is a resource reference list.
+  references(
+    first: Int
+    after: String
+    last: Int
+    before: String
+  ): MetafieldReferenceConnection
+
+  # The type name of the metafield. See the list of supported types.
+  type: String!
+
+  # The date and time when the storefront metafield was updated.
+  updatedAt: DateTime!
+
+  # The value of a metafield.
+  value: String!
+}
+
+# An auto-generated type for paginating through multiple MetafieldReferences.
+type MetafieldReferenceConnection {
+  # A list of edges.
+  edges: [MetafieldReferenceEdge!]!
+
+  # A list of the nodes contained in MetafieldReferenceEdge.
+  nodes: [MetafieldReference!]!
+
+  # Information to aid in pagination.
+  pageInfo: PageInfo!
+}
+
+# Identifies a metafield on an owner resource by namespace and key.
+input HasMetafieldsIdentifier {
+  # A container for a set of metafields.
+  namespace: String!
+
+  # The identifier for the metafield.
+  key: String!
+}
+
+# Returns information about pagination in a connection, in accordance with the Relay specification.
+type PageInfo {
+  # The cursor corresponding to the last node in edges.
+  endCursor: String
+
+  # Whether there are more pages to fetch following the current page.
+  hasNextPage: Boolean!
+
+  # Whether there are any pages prior to the current page.
+  hasPreviousPage: Boolean!
+
+  # The cursor corresponding to the first node in edges.
+  startCursor: String
+}
+
+# A customer represents a customer account with the shop.
+# Customer accounts store contact information for the customer,
+# saving logged-in customers the trouble of having to provide it at every checkout.
+type Customer implements HasMetafields {
+  # Indicates whether the customer has consented to be sent marketing material via email.
+  acceptsMarketing: Boolean!
+
+  # A list of addresses for the customer.
+  addresses(
+    after: String
+    before: String
+    first: Int
+    last: Int
+    reverse: Boolean = false
+  ): MailingAddressConnection!
+
+  # The date and time when the customer was created.
+  createdAt: DateTime!
+
+  # The customer’s default address.
+  defaultAddress: MailingAddress
+
+  # The customer’s name, email or phone number.
+  displayName: String!
+
+  # The customer’s email address.
+  email: String
+
+  # The customer’s first name.
+  firstName: String
+
+  # A unique identifier for the customer.
+  id: ID!
+
+  # The customer's most recently updated, incomplete checkout.
+  # lastIncompleteCheckout: Checkout
+
+  # The customer’s last name.
+  lastName: String
+
+  # Returns a metafield found by namespace and key.
+  metafield(key: String!namespace: String!): Metafield
+
+  # The metafields associated with the resource matching the supplied list of namespaces and keys.
+  metafields(identifiers: [HasMetafieldsIdentifier!]!): [Metafield]!
+
+  # The number of orders that the customer has made at the store in their lifetime.
+  numberOfOrders: UnsignedInt64!
+
+  # The orders associated with the customer.
+#  orders(
+#    after: String
+#    before: String
+#    first: Int
+#    last: Int
+#    query: String
+#    reverse: Boolean = false
+#    sortKey: OrderSortKeys = ID
+#  ): OrderConnection!
+
+  # The customer’s phone number.
+  phone: String
+
+  # A comma separated list of tags that have been added to the customer.
+  # Additional access scope required: unauthenticated_read_customer_tags.
+  tags: [String!]!
+
+  # The date and time when the customer information was updated.
+  updatedAt: DateTime!
+}
+
+# An auto-generated type for paginating through multiple MailingAddresses.
+type MailingAddressConnection {
+  # A list of edges.
+  edges: [MailingAddressEdge!]!
+
+  # A list of the nodes contained in MailingAddressEdge.
+  nodes: [MailingAddress!]!
+
+  # Information to aid in pagination.
+  pageInfo: PageInfo!
+}
+
+# An auto-generated type which holds one MailingAddress and a cursor during pagination.
+type MailingAddressEdge {
+  # A cursor for use in pagination.
+  cursor: String!
+
+  # The item at the end of MailingAddressEdge.
+  node: MailingAddress!
+}
+
+# Represents a mailing address for customers and shipping.
+type MailingAddress implements Node {
+  # The first line of the address. Typically the street address or PO Box number.
+  address1: String
+
+  # The second line of the address. Typically the number of the apartment, suite, or unit.
+  address2: String
+
+  # The name of the city, district, village, or town.
+  city: String
+
+  # The name of the customer's company or organization.
+  company: String
+
+  # The name of the country.
+  country: String
+
+  # The two-letter code for the country of the address.
+  #
+  # For example, US.
+  countryCodeV2: CountryCode
+
+  # The first name of the customer.
+  firstName: String
+
+  # A formatted version of the address, customized by the provided arguments.
+  formatted(withName: Boolean = false, withCompany: Boolean = true): [String!]!
+
+  # A comma-separated list of the values for city, province, and country.
+  formattedArea: String
+
+  # A globally-unique identifier.
+  id: ID!
+
+  # The last name of the customer.
+  lastName: String
+
+  # The latitude coordinate of the customer address.
+  latitude: Float
+
+  # The longitude coordinate of the customer address.
+  longitude: Float
+
+  # The full name of the customer, based on firstName and lastName.
+  name: String
+
+  # A unique phone number for the customer.
+  #
+  # Formatted using E.164 standard. For example, +16135551111.
+  phone: String
+
+  # The region of the address, such as the province, state, or district.
+  province: String
+
+  # The two-letter code for the region.
+  #
+  # For example, ON.
+  provinceCode: String
+
+  # The zip or postal code of the address.
+  zip: String
+
+  # The two-letter code for the country of the address.
+  countryCode: String @deprecated(reason: "Use `countryCodeV2` instead.")
+}
+
+type CustomerAccessTokenCreatePayload {
+  customerAccessToken:  CustomerAccessToken
+  customerUserErrors: [CustomerUserError!]!
+}
+
+type CustomerAccessTokenRenewPayload {
+  customerAccessToken: CustomerAccessToken
+  userErrors: [UserError!]!
+}
+
+input CustomerAccessTokenCreateInput {
+  email: String!
+  password: String!
+}
+
+type CustomerAccessToken {
+  accessToken: String!
+  expiresAt: DateTime!
+}
+
+interface DisplayableError {
+  field: [String!]
+  message: String!
+}
+
+type UserError implements DisplayableError {
+  field: [String!]
+  message: String!
+}
+
+type CustomerUserError implements DisplayableError {
+  code: CustomerErrorCode
+  field: [String!]
+  message: String!
+}
+
+enum CustomerErrorCode {
+  # The input value is blank.
+  BLANK
+
+  # The input value is invalid.
+  INVALID
+
+  # The input value is already taken.
+  TAKEN
+
+  # The input value is too long.
+  TOO_LONG
+
+  # The input value is too short.
+  TOO_SHORT
+
+  # Unidentified customer.
+  UNIDENTIFIED_CUSTOMER
+
+  # Customer is disabled.
+  CUSTOMER_DISABLED
+
+  # Input password starts or ends with whitespace.
+  PASSWORD_STARTS_OR_ENDS_WITH_WHITESPACE
+
+  # Input contains HTML tags.
+  CONTAINS_HTML_TAGS
+
+  # Input contains URL.
+  CONTAINS_URL
+
+  # Invalid activation token.
+  TOKEN_INVALID
+
+  # Customer already enabled.
+  ALREADY_ENABLED
+
+  # Address does not exist.
+  NOT_FOUND
+
+  # Input email contains an invalid domain name.
+  BAD_DOMAIN
+
+  # Multipass token is not valid.
+  INVALID_MULTIPASS_REQUEST
+}
+
+# Return type for `customerAccessTokenDelete` mutation.
+type CustomerAccessTokenDeletePayload {
+  # The destroyed access token.
+  deletedAccessToken: String
+
+  # ID of the destroyed customer access token.
+  deletedCustomerAccessTokenId: String
+
+  # The list of errors that occurred from executing the mutation.
+  userErrors: [UserError!]!
+}
+
+# ISO 639-1 language codes supported by Shopify.
+enum LanguageCode {
+  # Afrikaans
+  AF
+
+  # Akan
+  AK
+
+  # Amharic
+  AM
+
+  # Arabic
+  AR
+
+  # Assamese
+  AS
+
+  # Azerbaijani
+  AZ
+
+  # Belarusian
+  BE
+
+  # Bulgarian
+  BG
+
+  # Bambara
+  BM
+
+  # Bangla
+  BN
+
+  # Tibetan
+  BO
+
+  # Breton
+  BR
+
+  # Bosnian
+  BS
+
+  # Catalan
+  CA
+
+  # Chechen
+  CE
+
+  # Czech
+  CS
+
+  # Church Slavic
+  CU
+
+  # Welsh
+  CY
+
+  # Danish
+  DA
+
+  # German
+  DE
+
+  # Dzongkha
+  DZ
+
+  # Ewe
+  EE
+
+  # Greek
+  EL
+
+  # English
+  EN
+
+  # Esperanto
+  EO
+
+  # Spanish
+  ES
+
+  # Estonian
+  ET
+
+  # Basque
+  EU
+
+  # Persian
+  FA
+
+  # Fulah
+  FF
+
+  # Finnish
+  FI
+
+  # Faroese
+  FO
+
+  # French
+  FR
+
+  # Western Frisian
+  FY
+
+  # Irish
+  GA
+
+  # Scottish Gaelic
+  GD
+
+  # Galician
+  GL
+
+  # Gujarati
+  GU
+
+  # Manx
+  GV
+
+  # Hausa
+  HA
+
+  # Hebrew
+  HE
+
+  # Hindi
+  HI
+
+  # Croatian
+  HR
+
+  # Hungarian
+  HU
+
+  # Armenian
+  HY
+
+  # Interlingua
+  IA
+
+  # Indonesian
+  ID
+
+  # Igbo
+  IG
+
+  # Sichuan Yi
+  II
+
+  # Icelandic
+  IS
+
+  # Italian
+  IT
+
+  # Japanese
+  JA
+
+  # Javanese
+  JV
+
+  # Georgian.
+  KA
+
+  # Kikuyu.
+  KI
+
+  # Kazakh.
+  KK
+
+  # Kalaallisut.
+  KL
+
+  # Khmer.
+  KM
+
+  # Kannada.
+  KN
+
+  # Korean.
+  KO
+
+  # Kashmiri.
+  KS
+
+  # Kurdish.
+  KU
+
+  # Cornish.
+  KW
+
+  # Kyrgyz.
+  KY
+
+  # Luxembourgish.
+  LB
+
+  # Ganda.
+  LG
+
+  # Lingala.
+  LN
+
+  # Lao.
+  LO
+
+  # Lithuanian.
+  LT
+
+  # Luba-Katanga.
+  LU
+
+  # Latvian.
+  LV
+
+  # Malagasy.
+  MG
+
+  # Māori.
+  MI
+
+  # Macedonian.
+  MK
+
+  # Malayalam.
+  ML
+
+  # Mongolian.
+  MN
+
+  # Marathi.
+  MR
+
+  # Malay.
+  MS
+
+  # Maltese.
+  MT
+
+  # Burmese.
+  MY
+
+  # Norwegian (Bokmål).
+  NB
+
+  # North Ndebele.
+  ND
+
+  # Nepali.
+  NE
+
+  # Dutch.
+  NL
+
+  # Norwegian Nynorsk.
+  NN
+
+  # Norwegian.
+  NO
+
+  # Oromo.
+  OM
+
+  # Odia.
+  OR
+
+  # Ossetic.
+  OS
+
+  # Punjabi.
+  PA
+
+  # Polish.
+  PL
+
+  # Pashto.
+  PS
+
+  # Portuguese (Brazil).
+  PT_BR
+
+  # Portuguese (Portugal).
+  PT_PT
+
+  QU
+  # Quechua.
+
+  # Romansh.
+  RM
+
+  # Rundi.
+  RN
+
+  # Romanian.
+  RO
+
+  # Russian.
+  RU
+
+  # Kinyarwanda.
+  RW
+
+  # Sindhi.
+  SD
+
+  # Northern Sami.
+  SE
+
+  # Sango.
+  SG
+
+  # Sinhala.
+  SI
+
+  # Slovak.
+  SK
+
+  # Slovenian.
+  SL
+
+  # Shona.
+  SN
+
+  # Somali.
+  SO
+
+  # Albanian.
+  SQ
+
+  # Serbian.
+  SR
+
+  # Sundanese.
+  SU
+
+  # Swedish.
+  SV
+
+  # Swahili.
+  SW
+
+  # Tamil.
+  TA
+
+  # Telugu.
+  TE
+
+  # Tajik.
+  TG
+
+  # Thai.
+  TH
+
+  # Tigrinya.
+  TI
+
+  # Turkmen.
+  TK
+
+  # Tongan.
+  TO
+
+  # Turkish.
+  TR
+
+  # Tatar.
+  TT
+
+  # Uyghur.
+  UG
+
+  # Ukrainian.
+  UK
+
+  # Urdu.
+  UR
+
+  # Uzbek.
+  UZ
+
+  # Vietnamese.
+  VI
+
+  # Wolof.
+  WO
+
+  # Xhosa.
+  XH
+
+  # Yiddish.
+  YI
+
+  # Yoruba.
+  YO
+
+  # Chinese (Simplified).
+  ZH_CN
+
+  # Chinese (Traditional).
+  ZH_TW
+
+  # Zulu.
+  ZU
+
+  # Chinese.
+  ZH
+
+  # Portuguese.
+  PT
+
+  # Volapük.
+  VO
+}
+
+# The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
+# If a territory doesn't have a country code value in the CountryCode enum, then it might be considered a subdivision
+# of another country. For example, the territories associated with Spain are represented by the country code ES,
+# and the territories associated with the United States of America are represented by the country code US.
+enum CountryCode {
+  # Afghanistan.
+  AF
+
+  # Åland Islands.
+  AX
+
+  # Albania.
+  AL
+
+  # Algeria.
+  DZ
+
+  # Andorra.
+  AD
+
+  # Angola.
+  AO
+
+  # Anguilla.
+  AI
+
+  # Antigua & Barbuda.
+  AG
+
+  # Argentina.
+  AR
+
+  # Armenia.
+  AM
+
+  # Aruba.
+  AW
+
+  # Ascension Island.
+  AC
+
+  # Australia.
+  AU
+
+  # Austria.
+  AT
+
+  # Azerbaijan.
+  AZ
+
+  # Bahamas.
+  BS
+
+  # Bahrain.
+  BH
+
+  # Bangladesh.
+  BD
+
+  # Barbados.
+  BB
+
+  # Belarus.
+  BY
+
+  # Belgium.
+  BE
+
+  # Belize.
+  BZ
+
+  # Benin.
+  BJ
+
+  # Bermuda.
+  BM
+
+  # Bhutan.
+  BT
+
+  # Bolivia.
+  BO
+
+  # Bosnia & Herzegovina.
+  BA
+
+  # Botswana.
+  BW
+
+  # Bouvet Island.
+  BV
+
+  # Brazil.
+  BR
+
+  # British Indian Ocean Territory.
+  IO
+
+  # Brunei.
+  BN
+
+  # Bulgaria.
+  BG
+
+  # Burkina Faso.
+  BF
+
+  # Burundi.
+  BI
+
+  # Cambodia.
+  KH
+
+  # Canada.
+  CA
+
+  # Cape Verde.
+  CV
+
+  # Caribbean Netherlands.
+  BQ
+
+  # Cayman Islands.
+  KY
+
+  # Central African Republic.
+  CF
+
+  # Chad.
+  TD
+
+  # Chile.
+  CL
+
+  # China.
+  CN
+
+  # Christmas Island.
+  CX
+
+  # Cocos (Keeling) Islands.
+  CC
+
+  # Colombia.
+  CO
+
+  # Comoros.
+  KM
+
+  # Congo - Brazzaville.
+  CG
+
+  # Congo - Kinshasa.
+  CD
+
+  # Cook Islands.
+  CK
+
+  # Costa Rica.
+  CR
+
+  # Croatia.
+  HR
+
+  # Cuba.
+  CU
+
+  # Curaçao.
+  CW
+
+  # Cyprus.
+  CY
+
+  # Czechia.
+  CZ
+
+  # Côte d’Ivoire.
+  CI
+
+  # Denmark.
+  DK
+
+  # Djibouti.
+  DJ
+
+  # Dominica.
+  DM
+
+  # Dominican Republic.
+  DO
+
+  # Ecuador.
+  EC
+
+  # Egypt.
+  EG
+
+  # El Salvador.
+  SV
+
+  # Equatorial Guinea.
+  GQ
+
+  # Eritrea.
+  ER
+
+  # Estonia.
+  EE
+
+  # Eswatini.
+  SZ
+
+  # Ethiopia.
+  ET
+
+  # Falkland Islands.
+  FK
+
+  # Faroe Islands.
+  FO
+
+  # Fiji.
+  FJ
+
+  # Finland.
+  FI
+
+  # France.
+  FR
+
+  # French Guiana.
+  GF
+
+  # French Polynesia.
+  PF
+
+  # French Southern Territories.
+  TF
+
+  # Gabon.
+  GA
+
+  # Gambia.
+  GM
+
+  # Georgia.
+  GE
+
+  # Germany.
+  DE
+
+  # Ghana.
+  GH
+
+  # Gibraltar.
+  GI
+
+  # Greece.
+  GR
+
+  # Greenland.
+  GL
+
+  # Grenada.
+  GD
+
+  # Guadeloupe.
+  GP
+
+  # Guatemala.
+  GT
+
+  # Guernsey.
+  GG
+
+  # Guinea.
+  GN
+
+  # Guinea-Bissau.
+  GW
+
+  # Guyana.
+  GY
+
+  # Haiti.
+  HT
+
+  # Heard & McDonald Islands.
+  HM
+
+  # Vatican City.
+  VA
+
+  # Honduras.
+  HN
+
+  # Hong Kong SAR.
+  HK
+
+  # Hungary.
+  HU
+
+  # Iceland.
+  IS
+
+  # India.
+  IN
+
+  # Indonesia.
+  ID
+
+  # Iran.
+  IR
+
+  # Iraq.
+  IQ
+
+  # Ireland.
+  IE
+
+  # Isle of Man.
+  IM
+
+  # Israel.
+  IL
+
+  # Italy.
+  IT
+
+  # Jamaica.
+  JM
+
+  # Japan.
+  JP
+
+  # Jersey.
+  JE
+
+  # Jordan.
+  JO
+
+  # Kazakhstan.
+  KZ
+
+  # Kenya.
+  KE
+
+  # Kiribati.
+  KI
+
+  # North Korea.
+  KP
+
+  # Kosovo.
+  XK
+
+  # Kuwait.
+  KW
+
+  # Kyrgyzstan.
+  KG
+
+  # Laos.
+  LA
+
+  # Latvia.
+  LV
+
+  # Lebanon.
+  LB
+
+  # Lesotho.
+  LS
+
+  # Liberia.
+  LR
+
+  # Libya.
+  LY
+
+  # Liechtenstein.
+  LI
+
+  # Lithuania.
+  LT
+
+  # Luxembourg.
+  LU
+
+  # Macao SAR.
+  MO
+
+  # Madagascar.
+  MG
+
+  # Malawi.
+  MW
+
+  # Malaysia.
+  MY
+
+  # Maldives.
+  MV
+
+  # Mali.
+  ML
+
+  # Malta.
+  MT
+
+  # Martinique.
+  MQ
+
+  # Mauritania.
+  MR
+
+  # Mauritius.
+  MU
+
+  # Mayotte.
+  YT
+
+  # Mexico.
+  MX
+
+  # Moldova.
+  MD
+
+  # Monaco.
+  MC
+
+  # Mongolia.
+  MN
+
+  # Montenegro.
+  ME
+
+  # Montserrat.
+  MS
+
+  # Morocco.
+  MA
+
+  # Mozambique.
+  MZ
+
+  # Myanmar (Burma).
+  MM
+
+  # Namibia.
+  NA
+
+  # Nauru.
+  NR
+
+  # Nepal.
+  NP
+
+  # Netherlands.
+  NL
+
+  # Netherlands Antilles.
+  AN
+
+  # New Caledonia.
+  NC
+
+  # New Zealand.
+  NZ
+
+  # Nicaragua.
+  NI
+
+  # Niger.
+  NE
+
+  # Nigeria.
+  NG
+
+  # Niue.
+  NU
+
+  # Norfolk Island.
+  NF
+
+  # North Macedonia.
+  MK
+
+  # Norway.
+  NO
+
+  # Oman.
+  OM
+
+  # Pakistan.
+  PK
+
+  # Palestinian Territories.
+  PS
+
+  # Panama.
+  PA
+
+  # Papua New Guinea.
+  PG
+
+  # Paraguay.
+  PY
+
+  # Peru.
+  PE
+
+  # Philippines.
+  PH
+
+  # Pitcairn Islands.
+  PN
+
+  # Poland.
+  PL
+
+  # Portugal.
+  PT
+
+  # Qatar.
+  QA
+
+  # Cameroon.
+  CM
+
+  # Réunion.
+  RE
+
+  # Romania.
+  RO
+
+  # Russia.
+  RU
+
+  # Rwanda.
+  RW
+
+  # St. Barthélemy.
+  BL
+
+  # St. Helena.
+  SH
+
+  # St. Kitts & Nevis.
+  KN
+
+  # St. Lucia.
+  LC
+
+  # St. Martin.
+  MF
+
+  # St. Pierre & Miquelon.
+  PM
+
+  # Samoa.
+  WS
+
+  # San Marino.
+  SM
+
+  # São Tomé & Príncipe.
+  ST
+
+  # Saudi Arabia.
+  SA
+
+  # Senegal.
+  SN
+
+  # Serbia.
+  RS
+
+  # Seychelles.
+  SC
+
+  # Sierra Leone.
+  SL
+
+  # Singapore.
+  SG
+
+  # Sint Maarten.
+  SX
+
+  # Slovakia.
+  SK
+
+  # Slovenia.
+  SI
+
+  # Solomon Islands.
+  SB
+
+  # Somalia.
+  SO
+
+  # South Africa.
+  ZA
+
+  # South Georgia & South Sandwich Islands.
+  GS
+
+  # South Korea.
+  KR
+
+  # South Sudan.
+  SS
+
+  # Spain.
+  ES
+
+  # Sri Lanka.
+  LK
+
+  # St. Vincent & Grenadines.
+  VC
+
+  # Sudan.
+  SD
+
+  # Suriname.
+  SR
+
+  # Svalbard & Jan Mayen.
+  SJ
+
+  # Sweden.
+  SE
+
+  # Switzerland.
+  CH
+
+  # Syria.
+  SY
+
+  # Taiwan.
+  TW
+
+  # Tajikistan.
+  TJ
+
+  # Tanzania.
+  TZ
+
+  # Thailand.
+  TH
+
+  # Timor-Leste.
+  TL
+
+  # Togo.
+  TG
+
+  # Tokelau.
+  TK
+
+  # Tonga.
+  TO
+
+  # Trinidad & Tobago.
+  TT
+
+  # Tristan da Cunha.
+  TA
+
+  # Tunisia.
+  TN
+
+  # Turkey.
+  TR
+
+  # Turkmenistan.
+  TM
+
+  # Turks & Caicos Islands.
+  TC
+
+  # Tuvalu.
+  TV
+
+  # Uganda.
+  UG
+
+  # Ukraine.
+  UA
+
+  # United Arab Emirates.
+  AE
+
+  # United Kingdom.
+  GB
+
+  # United States.
+  US
+
+  # U.S. Outlying Islands.
+  UM
+
+  # Uruguay.
+  UY
+
+  # Uzbekistan.
+  UZ
+
+  # Vanuatu.
+  VU
+
+  # Venezuela.
+  VE
+
+  # Vietnam.
+  VN
+
+  # British Virgin Islands.
+  VG
+
+  # Wallis & Futuna.
+  WF
+
+  # Western Sahara.
+  EH
+
+  # Yemen.
+  YE
+
+  # Zambia.
+  ZM
+
+  # Zimbabwe.
+  ZW
+
+  # Unknown Region.
+  ZZ
+}

+ 9 - 0
tools.go

@@ -0,0 +1,9 @@
+//go:build tools
+// +build tools
+
+package customer
+
+import (
+	_ "github.com/99designs/gqlgen"
+	_ "github.com/99designs/gqlgen/graphql/introspection"
+)