moov-io / paygate

A RESTful API enabling electronic payments to be submitted and received without a deep understanding payment file specification
http://moov.io
Apache License 2.0
129 stars 31 forks source link

all: replace x-user-id with namespace to separate models #562

Closed adamdecaf closed 4 years ago

adamdecaf commented 4 years ago

We've replaced X-User-ID with X-Namespace as the value that allows isolation of each created Transfer. This is to better reflect that authentication does not have to be the method by which objects are kept separate from each other. The underlying database has changed as well and is not compatible. We've modified the create table statements to use tenant_id instead of namespace.

Fixes: https://github.com/moov-io/paygate/issues/561

codecov-commenter commented 4 years ago

Codecov Report

Merging #562 into master will increase coverage by 1.09%. The diff coverage is 77.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #562      +/-   ##
==========================================
+ Coverage   53.10%   54.20%   +1.09%     
==========================================
  Files         102       95       -7     
  Lines        3843     3614     -229     
==========================================
- Hits         2041     1959      -82     
+ Misses       1434     1306     -128     
+ Partials      368      349      -19     
Impacted Files Coverage Δ
cmd/server/main.go 10.52% <0.00%> (+0.30%) :arrow_up:
pkg/achx/entry_detail.go 100.00% <ø> (ø)
pkg/achx/files.go 78.57% <ø> (ø)
pkg/customers/status.go 100.00% <ø> (ø)
pkg/database/mysql.go 60.00% <ø> (ø)
pkg/database/sqlite.go 56.25% <ø> (ø)
pkg/namespace/mock_repository.go 0.00% <0.00%> (ø)
pkg/transfers/fundflow/first_party.go 87.87% <ø> (ø)
pkg/transfers/limiter/limiter.go 0.00% <0.00%> (ø)
pkg/validation/microdeposits/micro_deposits.go 71.23% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1d41820...c00bef7. Read the comment docs.