Repository: moov-io/customers
Pull request #142 (2020-09-09 23:25:13)

admin,client: convet to openapitools docker image for codegen


Patch:
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index c222c31..84e9090 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -27,9 +27,6 @@ jobs:
       if: runner.os == 'Windows'
       run: choco install -y make mingw
 
-    - name: Generate Code
-      run: make admin && make client
-
     - name: Check
       run: make check
 
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
new file mode 100644
index 0000000..d99e716
--- /dev/null
+++ b/.openapi-generator/VERSION
@@ -0,0 +1,1 @@
+5.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/.openapi-generator/admin-generator-config.yml b/.openapi-generator/admin-generator-config.yml
new file mode 100644
index 0000000..091d6b0
--- /dev/null
+++ b/.openapi-generator/admin-generator-config.yml
@@ -0,0 +1,9 @@
+inputSpec: /local/api/admin.yaml
+outputDir: /local/pkg/admin
+generatorName: go
+artifactId: "customers-admin"
+gitUserId: moov-io
+gitRepoId: "customers"
+additionalProperties:
+  isGoSubmodule: true
+  packageName: admin
diff --git a/.openapi-generator/client-generator-config.yml b/.openapi-generator/client-generator-config.yml
new file mode 100644
index 0000000..2f94a43
--- /dev/null
+++ b/.openapi-generator/client-generator-config.yml
@@ -0,0 +1,9 @@
+inputSpec: /local/api/client.yaml
+outputDir: /local/pkg/client
+generatorName: go
+artifactId: "customers-client"
+gitUserId: moov-io
+gitRepoId: "customers"
+additionalProperties:
+  isGoSubmodule: true
+  packageName: client
diff --git a/admin/.openapi-generator/VERSION b/admin/.openapi-generator/VERSION
deleted file mode 100644
index 8191138..0000000
--- a/admin/.openapi-generator/VERSION
+++ /dev/null
@@ -1,1 +0,0 @@
-4.3.0
\ No newline at end of file
diff --git a/openapi-admin.yaml b/api/admin.yaml
similarity index 100%
rename from openapi-admin.yaml
rename to api/admin.yaml
diff --git a/openapi.yaml b/api/client.yaml
similarity index 100%
rename from openapi.yaml
rename to api/client.yaml
diff --git a/client/.openapi-generator/VERSION b/client/.openapi-generator/VERSION
deleted file mode 100644
index 8191138..0000000
--- a/client/.openapi-generator/VERSION
+++ /dev/null
@@ -1,1 +0,0 @@
-4.3.0
\ No newline at end of file
diff --git a/cmd/server/accounts/micro_deposits.go b/cmd/server/accounts/micro_deposits.go
index 11a932c..48b1833 100644
--- a/cmd/server/accounts/micro_deposits.go
+++ b/cmd/server/accounts/micro_deposits.go
@@ -10,8 +10,8 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/moov-io/customers/admin"
 	"github.com/moov-io/customers/cmd/server/paygate"
+	"github.com/moov-io/customers/pkg/admin"
 	"github.com/moov-io/paygate/pkg/client"
 )
 
diff --git a/cmd/server/accounts/mock_repository.go b/cmd/server/accounts/mock_repository.go
index d357d9e..aebdab5 100644
--- a/cmd/server/accounts/mock_repository.go
+++ b/cmd/server/accounts/mock_repository.go
@@ -5,8 +5,8 @@
 package accounts
 
 import (
-	"github.com/moov-io/customers/admin"
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/admin"
+	"github.com/moov-io/customers/pkg/client"
 )
 
 type mockRepository struct {
diff --git a/cmd/server/accounts/repository.go b/cmd/server/accounts/repository.go
index bdcf5dd..518718b 100644
--- a/cmd/server/accounts/repository.go
+++ b/cmd/server/accounts/repository.go
@@ -10,8 +10,8 @@ import (
 	"time"
 
 	"github.com/moov-io/base"
-	"github.com/moov-io/customers/admin"
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/admin"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 )
diff --git a/cmd/server/accounts/router.go b/cmd/server/accounts/router.go
index d1c8f20..0a2dbbc 100644
--- a/cmd/server/accounts/router.go
+++ b/cmd/server/accounts/router.go
@@ -13,10 +13,10 @@ import (
 
 	"github.com/moov-io/ach"
 	moovhttp "github.com/moov-io/base/http"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/fed"
 	"github.com/moov-io/customers/cmd/server/paygate"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 	"github.com/moov-io/customers/pkg/secrets"
 	"github.com/moov-io/customers/pkg/secrets/hash"
 	"github.com/moov-io/customers/pkg/secrets/mask"
diff --git a/cmd/server/accounts/update.go b/cmd/server/accounts/update.go
index f5b38cb..957a3dc 100644
--- a/cmd/server/accounts/update.go
+++ b/cmd/server/accounts/update.go
@@ -10,8 +10,8 @@ import (
 	"net/http"
 
 	moovhttp "github.com/moov-io/base/http"
-	"github.com/moov-io/customers/admin"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/admin"
 
 	"github.com/go-kit/kit/log"
 )
diff --git a/cmd/server/accounts/validate.go b/cmd/server/accounts/validate.go
index 45d01b3..591021e 100644
--- a/cmd/server/accounts/validate.go
+++ b/cmd/server/accounts/validate.go
@@ -11,9 +11,9 @@ import (
 	"strings"
 
 	moovhttp "github.com/moov-io/base/http"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/paygate"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 )
diff --git a/cmd/server/approval.go b/cmd/server/approval.go
index 08fe80c..218bfef 100644
--- a/cmd/server/approval.go
+++ b/cmd/server/approval.go
@@ -15,8 +15,8 @@ import (
 
 	"github.com/moov-io/base/admin"
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/approval_ofac.go b/cmd/server/approval_ofac.go
index 4d4e54b..dc6ce7c 100644
--- a/cmd/server/approval_ofac.go
+++ b/cmd/server/approval_ofac.go
@@ -13,8 +13,8 @@ import (
 	"time"
 
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 	watchman "github.com/moov-io/watchman/client"
 
 	"github.com/go-kit/kit/log"
diff --git a/cmd/server/customer_search.go b/cmd/server/customer_search.go
index ae45af0..dbfc77b 100644
--- a/cmd/server/customer_search.go
+++ b/cmd/server/customer_search.go
@@ -12,8 +12,8 @@ import (
 
 	"github.com/go-kit/kit/log"
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 )
 
 func searchCustomers(logger log.Logger, repo customerRepository) http.HandlerFunc {
diff --git a/cmd/server/customers.go b/cmd/server/customers.go
index a0dc0e5..32ad8a3 100644
--- a/cmd/server/customers.go
+++ b/cmd/server/customers.go
@@ -16,9 +16,9 @@ import (
 
 	"github.com/moov-io/base"
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
 	"github.com/moov-io/customers/internal/usstates"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/disclaimers.go b/cmd/server/disclaimers.go
index 403c045..aa12bfa 100644
--- a/cmd/server/disclaimers.go
+++ b/cmd/server/disclaimers.go
@@ -15,8 +15,8 @@ import (
 	"github.com/moov-io/base"
 	"github.com/moov-io/base/admin"
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/documents.go b/cmd/server/documents.go
index 635fcd1..765a7d1 100644
--- a/cmd/server/documents.go
+++ b/cmd/server/documents.go
@@ -18,8 +18,8 @@ import (
 
 	"github.com/moov-io/base"
 	moovhttp "github.com/moov-io/base/http"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/route"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/fed/cache.go b/cmd/server/fed/cache.go
index 0e38815..877df51 100644
--- a/cmd/server/fed/cache.go
+++ b/cmd/server/fed/cache.go
@@ -7,7 +7,7 @@ package fed
 import (
 	"errors"
 
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 
 	hashlru "github.com/hashicorp/golang-lru"
 )
diff --git a/cmd/server/fed/client.go b/cmd/server/fed/client.go
index 329f3fb..f778487 100644
--- a/cmd/server/fed/client.go
+++ b/cmd/server/fed/client.go
@@ -13,7 +13,7 @@ import (
 
 	"github.com/moov-io/base/http/bind"
 	"github.com/moov-io/base/k8s"
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 	moovfed "github.com/moov-io/fed/client"
 
 	"github.com/antihax/optional"
diff --git a/cmd/server/fed/mock_client.go b/cmd/server/fed/mock_client.go
index 564645f..aa87436 100644
--- a/cmd/server/fed/mock_client.go
+++ b/cmd/server/fed/mock_client.go
@@ -5,7 +5,7 @@
 package fed
 
 import (
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 )
 
 type MockClient struct {
diff --git a/docs/README.md b/docs/README.md
index 8f21b06..5dae5e0 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -11,7 +11,7 @@ The Customers project focuses on solving authentic identification of humans who
 **Running Customers**
 
 1. [Configuration](../README.md#configuration)
-1. [API Endpoints](https://moov-io.github.io/customers/)
+1. [API Endpoints](https://moov-io.github.io/customers/api/)
 1. [Admin Endpoints](https://moov-io.github.io/customers/admin/)
 
 **Dependencies**
diff --git a/docs/admin/index.html b/docs/admin/index.html
index 309e0bf..06c08e8 100644
--- a/docs/admin/index.html
+++ b/docs/admin/index.html
@@ -9,7 +9,7 @@
   <rapi-doc
     heading-text="Moov Customers Admin"
     render-style="read"
-    spec-url="https://raw.githubusercontent.com/moov-io/customers/master/openapi-admin.yaml">
+    spec-url="https://raw.githubusercontent.com/moov-io/customers/master/api/admin.yaml">
   </rapi-doc>
 </body>
 </html>
diff --git a/docs/api/index.html b/docs/api/index.html
index 0353974..18be441 100644
--- a/docs/api/index.html
+++ b/docs/api/index.html
@@ -9,7 +9,7 @@
   <rapi-doc
     heading-text="Moov Customers"
     render-style="read"
-    spec-url="https://raw.githubusercontent.com/moov-io/customers/master/openapi.yaml">
+    spec-url="https://raw.githubusercontent.com/moov-io/customers/master/api/client.yaml">
   </rapi-doc>
 </body>
 </html>
diff --git a/makefile b/makefile
index f90a951..a28c332 100644
--- a/makefile
+++ b/makefile
@@ -1,6 +1,9 @@
 PLATFORM=$(shell uname -s | tr '[:upper:]' '[:lower:]')
 VERSION := $(shell grep -Eo '(v[0-9]+[\.][0-9]+[\.][0-9]+(-[a-zA-Z0-9]*)?)' version.go)
 
+USERID := $(shell id -u $$USER)
+GROUPID:= $(shell id -g $$USER)
+
 .PHONY: build build-server build-examples docker release check
 
 build: check build-server
@@ -20,32 +23,23 @@ endif
 
 .PHONY: admin
 admin:
-ifeq ($(OS),Windows_NT)
-	@echo "Please generate ./admin/ on macOS or Linux, currently unsupported on windows."
-else
-# Versions from https://github.com/OpenAPITools/openapi-generator/releases
-	@chmod +x ./openapi-generator
-	@rm -rf ./admin
-	OPENAPI_GENERATOR_VERSION=4.3.0 ./openapi-generator generate --package-name admin -i openapi-admin.yaml -g go -o ./admin
-	rm -f admin/go.mod admin/go.sum
-	go fmt ./...
-	go test ./admin
-endif
+	@rm -rf ./pkg/admin
+	docker run --rm \
+		-u $(USERID):$(GROUPID) \
+		-v ${PWD}:/local openapitools/openapi-generator-cli:v4.3.1 batch -- /local/.openapi-generator/admin-generator-config.yml
+	rm -f ./pkg/admin/go.mod ./pkg/admin/go.sum
+	gofmt -w ./pkg/admin/
+	go build github.com/moov-io/customers/pkg/admin
 
 .PHONY: client
 client:
-ifeq ($(OS),Windows_NT)
-	@echo "Please generate ./client/ on macOS or Linux, currently unsupported on windows."
-else
-# Versions from https://github.com/OpenAPITools/openapi-generator/releases
-	@chmod +x ./openapi-generator
-	@rm -rf ./client
-	OPENAPI_GENERATOR_VERSION=4.3.0 ./openapi-generator generate --package-name client -i openapi.yaml -g go -o ./client
-	rm -f client/go.mod client/go.sum
-	go fmt ./...
-	go build github.com/moov-io/customers/client
-	go test ./client
-endif
+	@rm -rf ./pkg/client
+	docker run --rm \
+		-u $(USERID):$(GROUPID) \
+		-v ${PWD}:/local openapitools/openapi-generator-cli:v4.3.1 batch -- /local/.openapi-generator/client-generator-config.yml
+	rm -f ./pkg/client/go.mod ./pkg/client/go.sum
+	gofmt -w ./pkg/client/
+	go build github.com/moov-io/customers/pkg/client
 
 .PHONY: clean
 clean:
diff --git a/openapi-generator b/openapi-generator
deleted file mode 100755
index 38327b1..0000000
--- a/openapi-generator
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/env bash
-#
-# From https://github.com/OpenAPITools/openapi-generator
-#
-####
-# Save as openapi-generator-cli on your PATH. chmod u+x. Enjoy.
-#
-# This script will query github on every invocation to pull the latest released version
-# of openapi-generator.
-#
-# If you want repeatable executions, you can explicitly set a version via
-#    OPENAPI_GENERATOR_VERSION
-# e.g. (in Bash)
-#    export OPENAPI_GENERATOR_VERSION=3.1.0
-#    openapi-generator-cli.sh
-# or
-#    OPENAPI_GENERATOR_VERSION=3.1.0 openapi-generator-cli.sh
-#
-# This is also helpful, for example, if you want want to evaluate a SNAPSHOT version.
-#
-# NOTE: Jars are downloaded on demand from maven into the same directory as this script
-# for every 'latest' version pulled from github. Consider putting this under its own directory.
-####
-set -o pipefail
-
-for cmd in {mvn,python,curl}; do
-  if ! command -v ${cmd} > /dev/null; then
-  >&2 echo "This script requires '${cmd}' to be installed."
-    exit 1
-  fi
-done
-
-function latest.tag {
-  local uri="https://api.github.com/repos/${1}/tags"
-  curl -s ${uri} | python -c "import sys, json; print json.load(sys.stdin)[0]['name'][1:]"
-}
-
-ghrepo=openapitools/openapi-generator
-groupid=org.openapitools
-artifactid=openapi-generator-cli
-ver=${OPENAPI_GENERATOR_VERSION:-$(latest.tag $ghrepo)}
-
-jar=${artifactid}-${ver}.jar
-DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
-if [ ! -f ${DIR}/${jar} ]; then
-  repo="central::default::https://repo1.maven.org/maven2/"
-  if [[ ${ver} =~ ^.*-SNAPSHOT$ ]]; then
-      repo="central::default::https://oss.sonatype.org/content/repositories/snapshots"
-  fi
-  mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:get \
-    -DremoteRepositories=${repo} \
-    -Dartifact=${groupid}:${artifactid}:${ver} \
-    -Dtransitive=false \
-    -Ddest=${DIR}/${jar}
-fi
-
-java -ea                          \
-  ${JAVA_OPTS}                    \
-  -Xms512M                        \
-  -Xmx1024M                       \
-  -server                         \
-  -jar ${DIR}/${jar} "$@"
diff --git a/admin/.gitignore b/pkg/admin/.gitignore
similarity index 100%
rename from admin/.gitignore
rename to pkg/admin/.gitignore
diff --git a/admin/.openapi-generator-ignore b/pkg/admin/.openapi-generator-ignore
similarity index 100%
rename from admin/.openapi-generator-ignore
rename to pkg/admin/.openapi-generator-ignore
diff --git a/pkg/admin/.openapi-generator/VERSION b/pkg/admin/.openapi-generator/VERSION
new file mode 100644
index 0000000..ecedc98
--- /dev/null
+++ b/pkg/admin/.openapi-generator/VERSION
@@ -0,0 +1,1 @@
+4.3.1
\ No newline at end of file
diff --git a/admin/.travis.yml b/pkg/admin/.travis.yml
similarity index 100%
rename from admin/.travis.yml
rename to pkg/admin/.travis.yml
diff --git a/admin/README.md b/pkg/admin/README.md
similarity index 100%
rename from admin/README.md
rename to pkg/admin/README.md
diff --git a/admin/api/openapi.yaml b/pkg/admin/api/openapi.yaml
similarity index 100%
rename from admin/api/openapi.yaml
rename to pkg/admin/api/openapi.yaml
diff --git a/admin/api_admin.go b/pkg/admin/api_admin.go
similarity index 90%
rename from admin/api_admin.go
rename to pkg/admin/api_admin.go
index d1db621..2367685 100644
--- a/admin/api_admin.go
+++ b/pkg/admin/api_admin.go
@@ -84,16 +84,6 @@ func (a *AdminApiService) GetLivenessProbes(ctx _context.Context) (LivenessProbe
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v LivenessProbes
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v LivenessProbes
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -178,15 +168,6 @@ func (a *AdminApiService) GetVersion(ctx _context.Context) (string, *_nethttp.Re
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v string
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-		}
 		return localVarReturnValue, localVarHTTPResponse, newErr
 	}
 
diff --git a/admin/api_customers.go b/pkg/admin/api_customers.go
similarity index 100%
rename from admin/api_customers.go
rename to pkg/admin/api_customers.go
diff --git a/admin/client.go b/pkg/admin/client.go
similarity index 98%
rename from admin/client.go
rename to pkg/admin/client.go
index 3f16fb4..a60640c 100644
--- a/admin/client.go
+++ b/pkg/admin/client.go
@@ -17,6 +17,7 @@ import (
 	"errors"
 	"fmt"
 	"io"
+	"io/ioutil"
 	"log"
 	"mime/multipart"
 	"net/http"
@@ -368,6 +369,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
 		*s = string(b)
 		return nil
 	}
+	if f, ok := v.(**os.File); ok {
+		*f, err = ioutil.TempFile("", "HttpClientFile")
+		if err != nil {
+			return
+		}
+		_, err = (*f).Write(b)
+		_, err = (*f).Seek(0, io.SeekStart)
+		return
+	}
 	if xmlCheck.MatchString(contentType) {
 		if err = xml.Unmarshal(b, v); err != nil {
 			return err
diff --git a/admin/configuration.go b/pkg/admin/configuration.go
similarity index 100%
rename from admin/configuration.go
rename to pkg/admin/configuration.go
diff --git a/admin/docs/AccountStatus.md b/pkg/admin/docs/AccountStatus.md
similarity index 100%
rename from admin/docs/AccountStatus.md
rename to pkg/admin/docs/AccountStatus.md
diff --git a/admin/docs/AdminApi.md b/pkg/admin/docs/AdminApi.md
similarity index 100%
rename from admin/docs/AdminApi.md
rename to pkg/admin/docs/AdminApi.md
diff --git a/admin/docs/CreateUserDisclaimer.md b/pkg/admin/docs/CreateUserDisclaimer.md
similarity index 100%
rename from admin/docs/CreateUserDisclaimer.md
rename to pkg/admin/docs/CreateUserDisclaimer.md
diff --git a/admin/docs/CustomerStatus.md b/pkg/admin/docs/CustomerStatus.md
similarity index 100%
rename from admin/docs/CustomerStatus.md
rename to pkg/admin/docs/CustomerStatus.md
diff --git a/admin/docs/CustomersApi.md b/pkg/admin/docs/CustomersApi.md
similarity index 100%
rename from admin/docs/CustomersApi.md
rename to pkg/admin/docs/CustomersApi.md
diff --git a/admin/docs/Error.md b/pkg/admin/docs/Error.md
similarity index 100%
rename from admin/docs/Error.md
rename to pkg/admin/docs/Error.md
diff --git a/admin/docs/LivenessProbes.md b/pkg/admin/docs/LivenessProbes.md
similarity index 100%
rename from admin/docs/LivenessProbes.md
rename to pkg/admin/docs/LivenessProbes.md
diff --git a/admin/docs/UpdateAccountStatus.md b/pkg/admin/docs/UpdateAccountStatus.md
similarity index 100%
rename from admin/docs/UpdateAccountStatus.md
rename to pkg/admin/docs/UpdateAccountStatus.md
diff --git a/admin/docs/UpdateCustomerAddress.md b/pkg/admin/docs/UpdateCustomerAddress.md
similarity index 100%
rename from admin/docs/UpdateCustomerAddress.md
rename to pkg/admin/docs/UpdateCustomerAddress.md
diff --git a/admin/docs/UpdateCustomerStatus.md b/pkg/admin/docs/UpdateCustomerStatus.md
similarity index 100%
rename from admin/docs/UpdateCustomerStatus.md
rename to pkg/admin/docs/UpdateCustomerStatus.md
diff --git a/client/git_push.sh b/pkg/admin/git_push.sh
similarity index 96%
rename from client/git_push.sh
rename to pkg/admin/git_push.sh
index ced3be2..18657f4 100644
--- a/client/git_push.sh
+++ b/pkg/admin/git_push.sh
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
 fi
 
 if [ "$git_user_id" = "" ]; then
-    git_user_id="GIT_USER_ID"
+    git_user_id="moov-io"
     echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
 fi
 
 if [ "$git_repo_id" = "" ]; then
-    git_repo_id="GIT_REPO_ID"
+    git_repo_id="customers"
     echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
 fi
 
diff --git a/admin/model_account_status.go b/pkg/admin/model_account_status.go
similarity index 100%
rename from admin/model_account_status.go
rename to pkg/admin/model_account_status.go
diff --git a/admin/model_create_user_disclaimer.go b/pkg/admin/model_create_user_disclaimer.go
similarity index 100%
rename from admin/model_create_user_disclaimer.go
rename to pkg/admin/model_create_user_disclaimer.go
diff --git a/admin/model_customer_status.go b/pkg/admin/model_customer_status.go
similarity index 100%
rename from admin/model_customer_status.go
rename to pkg/admin/model_customer_status.go
diff --git a/admin/model_error.go b/pkg/admin/model_error.go
similarity index 100%
rename from admin/model_error.go
rename to pkg/admin/model_error.go
diff --git a/admin/model_liveness_probes.go b/pkg/admin/model_liveness_probes.go
similarity index 100%
rename from admin/model_liveness_probes.go
rename to pkg/admin/model_liveness_probes.go
diff --git a/admin/model_update_account_status.go b/pkg/admin/model_update_account_status.go
similarity index 100%
rename from admin/model_update_account_status.go
rename to pkg/admin/model_update_account_status.go
diff --git a/admin/model_update_customer_address.go b/pkg/admin/model_update_customer_address.go
similarity index 100%
rename from admin/model_update_customer_address.go
rename to pkg/admin/model_update_customer_address.go
diff --git a/admin/model_update_customer_status.go b/pkg/admin/model_update_customer_status.go
similarity index 100%
rename from admin/model_update_customer_status.go
rename to pkg/admin/model_update_customer_status.go
diff --git a/admin/response.go b/pkg/admin/response.go
similarity index 100%
rename from admin/response.go
rename to pkg/admin/response.go
diff --git a/client/.gitignore b/pkg/client/.gitignore
similarity index 100%
rename from client/.gitignore
rename to pkg/client/.gitignore
diff --git a/client/.openapi-generator-ignore b/pkg/client/.openapi-generator-ignore
similarity index 100%
rename from client/.openapi-generator-ignore
rename to pkg/client/.openapi-generator-ignore
diff --git a/pkg/client/.openapi-generator/VERSION b/pkg/client/.openapi-generator/VERSION
new file mode 100644
index 0000000..ecedc98
--- /dev/null
+++ b/pkg/client/.openapi-generator/VERSION
@@ -0,0 +1,1 @@
+4.3.1
\ No newline at end of file
diff --git a/client/.travis.yml b/pkg/client/.travis.yml
similarity index 100%
rename from client/.travis.yml
rename to pkg/client/.travis.yml
diff --git a/client/README.md b/pkg/client/README.md
similarity index 100%
rename from client/README.md
rename to pkg/client/README.md
diff --git a/client/api/openapi.yaml b/pkg/client/api/openapi.yaml
similarity index 100%
rename from client/api/openapi.yaml
rename to pkg/client/api/openapi.yaml
diff --git a/client/api_customers.go b/pkg/client/api_customers.go
similarity index 93%
rename from client/api_customers.go
rename to pkg/client/api_customers.go
index 2456303..0ec6487 100644
--- a/client/api_customers.go
+++ b/pkg/client/api_customers.go
@@ -108,16 +108,6 @@ func (a *CustomersApiService) AcceptDisclaimer(ctx _context.Context, customerID
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Disclaimer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -223,16 +213,6 @@ func (a *CustomersApiService) AddCustomerAddress(ctx _context.Context, customerI
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -335,16 +315,6 @@ func (a *CustomersApiService) CreateCustomer(ctx _context.Context, createCustome
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -450,16 +420,6 @@ func (a *CustomersApiService) CreateCustomerAccount(ctx _context.Context, custom
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Account
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -565,16 +525,6 @@ func (a *CustomersApiService) DecryptAccountNumber(ctx _context.Context, custome
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v TransitAccountNumber
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -768,16 +718,6 @@ func (a *CustomersApiService) GetCustomer(ctx _context.Context, customerID strin
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -881,16 +821,6 @@ func (a *CustomersApiService) GetCustomerAccounts(ctx _context.Context, customer
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v []Account
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -993,16 +923,6 @@ func (a *CustomersApiService) GetCustomerDisclaimers(ctx _context.Context, custo
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v []Disclaimer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1108,16 +1028,6 @@ func (a *CustomersApiService) GetCustomerDocumentContents(ctx _context.Context,
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v *os.File
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1220,16 +1130,6 @@ func (a *CustomersApiService) GetCustomerDocuments(ctx _context.Context, custome
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v []Document
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1332,16 +1232,6 @@ func (a *CustomersApiService) GetLatestOFACSearch(ctx _context.Context, customer
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v OfacSearch
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1508,16 +1398,6 @@ func (a *CustomersApiService) RefreshOFACSearch(ctx _context.Context, customerID
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v OfacSearch
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1623,16 +1503,6 @@ func (a *CustomersApiService) ReplaceCustomerMetadata(ctx _context.Context, cust
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1732,16 +1602,6 @@ func (a *CustomersApiService) SearchCustomers(ctx _context.Context, query string
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v []Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1847,16 +1707,6 @@ func (a *CustomersApiService) UpdateCustomerStatus(ctx _context.Context, custome
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Customer
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
@@ -1970,16 +1820,6 @@ func (a *CustomersApiService) UploadCustomerDocument(ctx _context.Context, custo
 			body:  localVarBody,
 			error: localVarHTTPResponse.Status,
 		}
-		if localVarHTTPResponse.StatusCode == 200 {
-			var v Document
-			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
-			if err != nil {
-				newErr.error = err.Error()
-				return localVarReturnValue, localVarHTTPResponse, newErr
-			}
-			newErr.model = v
-			return localVarReturnValue, localVarHTTPResponse, newErr
-		}
 		if localVarHTTPResponse.StatusCode == 400 {
 			var v Error
 			err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
diff --git a/client/client.go b/pkg/client/client.go
similarity index 98%
rename from client/client.go
rename to pkg/client/client.go
index 8c83084..341469b 100644
--- a/client/client.go
+++ b/pkg/client/client.go
@@ -17,6 +17,7 @@ import (
 	"errors"
 	"fmt"
 	"io"
+	"io/ioutil"
 	"log"
 	"mime/multipart"
 	"net/http"
@@ -365,6 +366,15 @@ func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err err
 		*s = string(b)
 		return nil
 	}
+	if f, ok := v.(**os.File); ok {
+		*f, err = ioutil.TempFile("", "HttpClientFile")
+		if err != nil {
+			return
+		}
+		_, err = (*f).Write(b)
+		_, err = (*f).Seek(0, io.SeekStart)
+		return
+	}
 	if xmlCheck.MatchString(contentType) {
 		if err = xml.Unmarshal(b, v); err != nil {
 			return err
diff --git a/client/configuration.go b/pkg/client/configuration.go
similarity index 100%
rename from client/configuration.go
rename to pkg/client/configuration.go
diff --git a/client/docs/Account.md b/pkg/client/docs/Account.md
similarity index 100%
rename from client/docs/Account.md
rename to pkg/client/docs/Account.md
diff --git a/client/docs/AccountStatus.md b/pkg/client/docs/AccountStatus.md
similarity index 100%
rename from client/docs/AccountStatus.md
rename to pkg/client/docs/AccountStatus.md
diff --git a/client/docs/AccountType.md b/pkg/client/docs/AccountType.md
similarity index 100%
rename from client/docs/AccountType.md
rename to pkg/client/docs/AccountType.md
diff --git a/client/docs/CreateAccount.md b/pkg/client/docs/CreateAccount.md
similarity index 100%
rename from client/docs/CreateAccount.md
rename to pkg/client/docs/CreateAccount.md
diff --git a/client/docs/CreateCustomer.md b/pkg/client/docs/CreateCustomer.md
similarity index 100%
rename from client/docs/CreateCustomer.md
rename to pkg/client/docs/CreateCustomer.md
diff --git a/client/docs/CreateCustomerAddress.md b/pkg/client/docs/CreateCustomerAddress.md
similarity index 100%
rename from client/docs/CreateCustomerAddress.md
rename to pkg/client/docs/CreateCustomerAddress.md
diff --git a/client/docs/CreatePhone.md b/pkg/client/docs/CreatePhone.md
similarity index 100%
rename from client/docs/CreatePhone.md
rename to pkg/client/docs/CreatePhone.md
diff --git a/client/docs/Customer.md b/pkg/client/docs/Customer.md
similarity index 100%
rename from client/docs/Customer.md
rename to pkg/client/docs/Customer.md
diff --git a/client/docs/CustomerAddress.md b/pkg/client/docs/CustomerAddress.md
similarity index 100%
rename from client/docs/CustomerAddress.md
rename to pkg/client/docs/CustomerAddress.md
diff --git a/client/docs/CustomerMetadata.md b/pkg/client/docs/CustomerMetadata.md
similarity index 100%
rename from client/docs/CustomerMetadata.md
rename to pkg/client/docs/CustomerMetadata.md
diff --git a/client/docs/CustomerStatus.md b/pkg/client/docs/CustomerStatus.md
similarity index 100%
rename from client/docs/CustomerStatus.md
rename to pkg/client/docs/CustomerStatus.md
diff --git a/client/docs/CustomerType.md b/pkg/client/docs/CustomerType.md
similarity index 100%
rename from client/docs/CustomerType.md
rename to pkg/client/docs/CustomerType.md
diff --git a/client/docs/CustomersApi.md b/pkg/client/docs/CustomersApi.md
similarity index 100%
rename from client/docs/CustomersApi.md
rename to pkg/client/docs/CustomersApi.md
diff --git a/client/docs/Disclaimer.md b/pkg/client/docs/Disclaimer.md
similarity index 100%
rename from client/docs/Disclaimer.md
rename to pkg/client/docs/Disclaimer.md
diff --git a/client/docs/Document.md b/pkg/client/docs/Document.md
similarity index 100%
rename from client/docs/Document.md
rename to pkg/client/docs/Document.md
diff --git a/client/docs/Error.md b/pkg/client/docs/Error.md
similarity index 100%
rename from client/docs/Error.md
rename to pkg/client/docs/Error.md
diff --git a/client/docs/InstitutionAddress.md b/pkg/client/docs/InstitutionAddress.md
similarity index 100%
rename from client/docs/InstitutionAddress.md
rename to pkg/client/docs/InstitutionAddress.md
diff --git a/client/docs/InstitutionDetails.md b/pkg/client/docs/InstitutionDetails.md
similarity index 100%
rename from client/docs/InstitutionDetails.md
rename to pkg/client/docs/InstitutionDetails.md
diff --git a/client/docs/OfacSearch.md b/pkg/client/docs/OfacSearch.md
similarity index 100%
rename from client/docs/OfacSearch.md
rename to pkg/client/docs/OfacSearch.md
diff --git a/client/docs/Phone.md b/pkg/client/docs/Phone.md
similarity index 100%
rename from client/docs/Phone.md
rename to pkg/client/docs/Phone.md
diff --git a/client/docs/TransitAccountNumber.md b/pkg/client/docs/TransitAccountNumber.md
similarity index 100%
rename from client/docs/TransitAccountNumber.md
rename to pkg/client/docs/TransitAccountNumber.md
diff --git a/client/docs/UpdateCustomerStatus.md b/pkg/client/docs/UpdateCustomerStatus.md
similarity index 100%
rename from client/docs/UpdateCustomerStatus.md
rename to pkg/client/docs/UpdateCustomerStatus.md
diff --git a/client/docs/UpdateValidation.md b/pkg/client/docs/UpdateValidation.md
similarity index 100%
rename from client/docs/UpdateValidation.md
rename to pkg/client/docs/UpdateValidation.md
diff --git a/admin/git_push.sh b/pkg/client/git_push.sh
similarity index 96%
rename from admin/git_push.sh
rename to pkg/client/git_push.sh
index ced3be2..18657f4 100644
--- a/admin/git_push.sh
+++ b/pkg/client/git_push.sh
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
 fi
 
 if [ "$git_user_id" = "" ]; then
-    git_user_id="GIT_USER_ID"
+    git_user_id="moov-io"
     echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
 fi
 
 if [ "$git_repo_id" = "" ]; then
-    git_repo_id="GIT_REPO_ID"
+    git_repo_id="customers"
     echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
 fi
 


Test patch:
diff --git a/cmd/server/accounts/repository_test.go b/cmd/server/accounts/repository_test.go
index 58c91e6..adc4bde 100644
--- a/cmd/server/accounts/repository_test.go
+++ b/cmd/server/accounts/repository_test.go
@@ -8,9 +8,9 @@ import (
 	"testing"
 
 	"github.com/moov-io/base"
-	"github.com/moov-io/customers/admin"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/internal/database"
+	"github.com/moov-io/customers/pkg/admin"
+	"github.com/moov-io/customers/pkg/client"
 	"github.com/moov-io/customers/pkg/secrets"
 
 	"github.com/go-kit/kit/log"
diff --git a/cmd/server/accounts/router_test.go b/cmd/server/accounts/router_test.go
index 38486ab..3ab5bcf 100644
--- a/cmd/server/accounts/router_test.go
+++ b/cmd/server/accounts/router_test.go
@@ -14,10 +14,10 @@ import (
 	"testing"
 
 	"github.com/moov-io/base"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/fed"
 	"github.com/moov-io/customers/cmd/server/paygate"
 	"github.com/moov-io/customers/internal/testclient"
+	"github.com/moov-io/customers/pkg/client"
 	"github.com/moov-io/customers/pkg/secrets"
 
 	"github.com/go-kit/kit/log"
diff --git a/cmd/server/accounts/update_test.go b/cmd/server/accounts/update_test.go
index e52289c..1e5a7c1 100644
--- a/cmd/server/accounts/update_test.go
+++ b/cmd/server/accounts/update_test.go
@@ -11,9 +11,9 @@ import (
 	"testing"
 
 	"github.com/moov-io/base"
-	"github.com/moov-io/customers/admin"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/internal/testclient"
+	"github.com/moov-io/customers/pkg/admin"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 )
diff --git a/cmd/server/accounts/validate_test.go b/cmd/server/accounts/validate_test.go
index c8605da..9e2ada9 100644
--- a/cmd/server/accounts/validate_test.go
+++ b/cmd/server/accounts/validate_test.go
@@ -13,8 +13,8 @@ import (
 	"testing"
 
 	"github.com/moov-io/base"
-	"github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/cmd/server/paygate"
+	"github.com/moov-io/customers/pkg/client"
 	"github.com/moov-io/customers/pkg/secrets"
 	payclient "github.com/moov-io/paygate/pkg/client"
 
diff --git a/cmd/server/approval_ofac_test.go b/cmd/server/approval_ofac_test.go
index cc34291..b2e1906 100644
--- a/cmd/server/approval_ofac_test.go
+++ b/cmd/server/approval_ofac_test.go
@@ -15,7 +15,7 @@ import (
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
 	"github.com/moov-io/base"
-	client "github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 	watchman "github.com/moov-io/watchman/client"
 )
 
diff --git a/cmd/server/approval_test.go b/cmd/server/approval_test.go
index 82c06b3..3818c3b 100644
--- a/cmd/server/approval_test.go
+++ b/cmd/server/approval_test.go
@@ -15,7 +15,7 @@ import (
 
 	"github.com/moov-io/base"
 	"github.com/moov-io/base/admin"
-	client "github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/customer_search_scope_test.go b/cmd/server/customer_search_scope_test.go
index 2656905..1968ed9 100644
--- a/cmd/server/customer_search_scope_test.go
+++ b/cmd/server/customer_search_scope_test.go
@@ -2,13 +2,14 @@ package main
 
 import (
 	"encoding/json"
+	"net/http/httptest"
+	"testing"
+
 	"github.com/go-kit/kit/log"
 	fuzz "github.com/google/gofuzz"
 	"github.com/gorilla/mux"
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 	"github.com/stretchr/testify/require"
-	"net/http/httptest"
-	"testing"
 )
 
 type Scope struct {
diff --git a/cmd/server/customer_search_test.go b/cmd/server/customer_search_test.go
index ea74198..a86332b 100644
--- a/cmd/server/customer_search_test.go
+++ b/cmd/server/customer_search_test.go
@@ -7,13 +7,14 @@ package main
 import (
 	"database/sql"
 	"encoding/json"
-	"github.com/go-kit/kit/log"
-	"github.com/gorilla/mux"
-	client "github.com/moov-io/customers/client"
-	"github.com/moov-io/customers/internal/database"
 	"net/http"
 	"net/http/httptest"
 	"testing"
+
+	"github.com/go-kit/kit/log"
+	"github.com/gorilla/mux"
+	"github.com/moov-io/customers/internal/database"
+	"github.com/moov-io/customers/pkg/client"
 )
 
 func TestCustomersSearchRouter(t *testing.T) {
diff --git a/cmd/server/customers_test.go b/cmd/server/customers_test.go
index af26a28..99d133c 100644
--- a/cmd/server/customers_test.go
+++ b/cmd/server/customers_test.go
@@ -18,7 +18,7 @@ import (
 	"github.com/moov-io/customers/internal/database"
 
 	"github.com/moov-io/base"
-	client "github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/disclaimers_test.go b/cmd/server/disclaimers_test.go
index c40c2a4..3dac307 100644
--- a/cmd/server/disclaimers_test.go
+++ b/cmd/server/disclaimers_test.go
@@ -17,8 +17,8 @@ import (
 
 	"github.com/moov-io/base"
 	"github.com/moov-io/base/admin"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/internal/database"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/documents_test.go b/cmd/server/documents_test.go
index 7d36745..14e42b0 100644
--- a/cmd/server/documents_test.go
+++ b/cmd/server/documents_test.go
@@ -20,8 +20,8 @@ import (
 	"testing"
 
 	"github.com/moov-io/base"
-	client "github.com/moov-io/customers/client"
 	"github.com/moov-io/customers/internal/database"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/go-kit/kit/log"
 	"github.com/gorilla/mux"
diff --git a/cmd/server/fed/cache_test.go b/cmd/server/fed/cache_test.go
index 9bc0de9..4d62aeb 100644
--- a/cmd/server/fed/cache_test.go
+++ b/cmd/server/fed/cache_test.go
@@ -8,7 +8,7 @@ import (
 	"errors"
 	"testing"
 
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/client"
 )
 
 func TestCache(t *testing.T) {
diff --git a/internal/testclient/client.go b/internal/testclient/client.go
index a8c7794..76f405a 100644
--- a/internal/testclient/client.go
+++ b/internal/testclient/client.go
@@ -9,8 +9,8 @@ import (
 	"testing"
 
 	moovadmin "github.com/moov-io/base/admin"
-	"github.com/moov-io/customers/admin"
-	"github.com/moov-io/customers/client"
+	"github.com/moov-io/customers/pkg/admin"
+	"github.com/moov-io/customers/pkg/client"
 
 	"github.com/gorilla/mux"
 )