storj/satellite
Cameron 240b70b828 satellite/console: use new type UpdateUserRequest as arg to db users.Update
The users.Update method in the satellitedb package takes a console.User
as an argument. It reads some of the fields on this struct and assigns
the value to dbx.User_Update_Fields. However, you cannot optionally
update only some of the fields. They all will always be updated. This means
that if you only want to update FullName, you still need to read the
user info from the DB to avoid updating the rest of the fields to zero.
This is not good because concurrent updates can overwrite each other.

This change introduces a new struct type, UpdateUserRequest, which
contains pointers for all the fields that are updated by satellite db
users.Update. Now the update method will check if a field is nil before
assigning the value to be updated in the db, so you only need to set the
field you want updated. For nullable columns, the respective field is a
double pointer. This allows us to update a column to NULL if the outer
pointer is not nil, but the inner pointer is.

Change-Id: I27f842d283c2711e24d51dcab622e57eeb9157f1
2022-06-14 09:28:03 -04:00
..
accounting satellite/accounting: don't use testplanet in rollup_test if not necessary 2022-06-09 13:11:45 +00:00
admin satellite/console: use new type UpdateUserRequest as arg to db users.Update 2022-06-14 09:28:03 -04:00
analytics satellite/analytics: Added segment.io page calls to track all the pages (#4880) 2022-06-09 11:54:23 -07:00
attribution {cmd/satellite/reports, satellite/attribution}: type and variable name adjustments 2022-04-26 20:12:38 +00:00
audit satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
buckets satellite/metainfo: propagate geofencing between buckets and stream id 2021-11-24 08:05:05 +00:00
compensation satellite/compensation: add a code that crypthopper-go now uses 2022-04-25 10:46:51 +00:00
console satellite/console: use new type UpdateUserRequest as arg to db users.Update 2022-06-14 09:28:03 -04:00
contact satellite/contact: swap net.IP.IsPrivateIP with isPrivateIP 2022-06-13 01:01:44 +02:00
gc satellite: use more optimal monkit call for loop observers methods 2022-05-20 11:03:41 +00:00
geoip satellite/geoip: update node check-in to associate a country code 2021-11-10 16:44:41 +01:00
gracefulexit satellite: use more optimal monkit call for loop observers methods 2022-05-20 11:03:41 +00:00
inspector satellite/metabase: drop GetObjectLatestVersion method 2022-02-02 09:40:53 +00:00
internalpb satellite/reputation: don't need 3 identical AuditHistory types 2022-05-24 05:48:46 +00:00
mailservice satellite/{mailservice,oidc}: improvements to debugging 2022-05-11 19:59:42 +00:00
metabase satellite/metabase: fix move transaction 2022-06-14 11:04:44 +02:00
metainfo satellite/console: integrate sessions into satellite UI 2022-06-13 08:02:02 +00:00
metrics satellite/{audit,metrics}: optimize loop methods 2022-05-05 15:10:56 +00:00
nodeapiversion satellite/nodeapiversion: new table for tracking node api usage 2020-07-09 15:02:25 +00:00
nodeselection/uploadselection satellite/repairer: handle excluded countries 2022-03-14 10:59:36 -04:00
nodestats satellite/reputation: don't need 3 identical AuditHistory types 2022-05-24 05:48:46 +00:00
oidc satellite/console: integrate sessions into satellite UI 2022-06-13 08:02:02 +00:00
orders satellite: use PieceIDDeriver for derivation 2022-05-19 06:31:42 +00:00
overlay satellite/contact: reject privateIPs in PingMe and CheckIn endpoints 2022-06-07 08:09:14 +00:00
payments satellite/payments/storjscan: add payments DB 2022-06-10 13:44:27 +01:00
repair satellite: use more optimal monkit call for loop observers methods 2022-05-20 11:03:41 +00:00
reputation satellite/reputation: new ApplyUpdates() method 2022-06-07 15:22:25 +00:00
revocation satellite/satellitedb: move tests to their domains 2021-02-19 17:29:15 +02:00
rewards satellite/rewards: adding SeaweedFS to partners list (#4230) 2021-10-19 21:30:31 +02:00
satellitedb satellite/console: use new type UpdateUserRequest as arg to db users.Update 2022-06-14 09:28:03 -04:00
snopayouts all: fix error naming 2021-04-29 15:38:21 +03:00
admin.go satellite/admin: fix console config handling 2022-05-27 22:26:06 +00:00
api.go satellite/payments/storjscan: update config and wrap service errors 2022-06-07 14:21:42 +00:00
configlock_test.go all: fix linter complaints 2020-10-13 15:59:01 +03:00
core.go satellite/core.go: hook up flag to enable email reminders 2022-05-27 13:16:14 -04:00
gc.go satellite: more detailed goroutine labels 2022-05-11 17:50:55 +00:00
peer.go satellite/payments/storjscan: add payments DB 2022-06-10 13:44:27 +01:00
repairer.go satellite: more detailed goroutine labels 2022-05-11 17:50:55 +00:00