Commit Graph
85 Commits
Author SHA1 Message Date
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jim 1c836c430b support for associating/disassociating an auth account with a user (#233) 2020-08-10 15:17:15 -04:00
Michael Gaffney 5e8179c6fb Allow lookupAfterWrite for resources with Private Ids (#229) 2020-07-30 13:44:14 -04:00
Michael Gaffney ebf69bbd27 Fix error string for lookupAfterWrite (#208)
The following error string was the end result of an error in lookupAfterWrite:
  `set password configuration: update: lookup error lookup after write: failed record not found`

The error string with this change applied would be:
  `set password configuration: update: lookup after write: record not found`
2020-07-20 17:20:22 -04:00
Jim 1bebe7a261 Convert option db.WithVersion to *uint32 (#195) 2020-07-15 13:12:15 -04:00
bcdcaffa6f Port over 162 and 165 to master (#176)
Co-authored-by: Jim Lambert <jlambert@hashicorp.com>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2020-07-10 15:46:26 -04:00
Jim 6c1b45f7f5 add principal roles (users and groups) to iam (#163) 2020-07-08 17:02:01 -04:00
Jim d0a846823a support for NewOplogMsgs() option when calling CreateItems and DeleteItems (#158) 2020-07-01 05:40:02 -04:00
Jim 8d8bb42418 add CreateItems and DeleteItems to writer interface (#156) 2020-06-29 19:28:15 -04:00
Jim 3e3144117e iam and auth integration (#144) 2020-06-29 08:18:57 -04:00
Jim 9a87df38c7 add CreateItems() and DeleteItems() (#146) 2020-06-29 06:31:23 -04:00
Michael Gaffney d69588131c Fix for panic in db.setFieldsToNil (#155) 2020-06-28 16:55:57 -04:00
Jim 6641244734 add support for WithVersion option to updates (#126) 2020-06-24 12:33:49 -04:00
Todd Knight 0c8385b423 Updating TxHandler to accept a reader as well in order to support reads inside the same transactions as writes. (#139) 2020-06-22 13:27:26 -07:00
Jim c413e013bd get oplog Ticket before writing data (#127) 2020-06-18 21:24:55 -04:00
Jim d9073a03d5 listing users (#118) 2020-06-16 18:59:30 -04:00
Jim 2d18177c9d oplog support for null field updates (#107) 2020-06-10 06:56:46 -04:00
Jim c70847fbac refactor delete test to be table driven. (#102) 2020-06-09 21:22:15 -04:00
Jim 7d4993fb61 iam users (#96) 2020-06-04 20:05:08 -04:00
JimandJim Lambert e3fdb493b8 prevent primary key updates (#95)
* prevent primary key updates

* better error to return

Co-authored-by: Jim Lambert <jimlambrt@Jims-MBP-3.home>
2020-06-03 09:51:34 -04:00
Jim ef6edbd515 Null updates (#78) 2020-05-31 19:55:56 -04:00
Jim Lambert a7d8bda7c0 add missing parameter 2020-05-21 09:30:52 -04:00
Jim b75feb957d require fieldMaskPaths in Update and refactor errors (#71) 2020-05-21 09:24:37 -04:00
Jim ee46266893 ErrRecordNotFound from LookupWhere() when no rows found (#59) 2020-05-18 12:57:45 -04:00
2aca5fff03 fix transaction rollbacks in DoTx (#55)
* fix transaction rollbacks in DoTx

* better assertion

* Update internal/db/read_writer_test.go

Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>

Co-authored-by: Jim Lambert <jimlambrt@Jims-MBP-3.home>
Co-authored-by: Michael Gaffney <mgaffney@users.noreply.github.com>
2020-05-15 08:38:36 -04:00
Jim c04c73453f refactor Update/Delete to return the number of rows affected. (#46) 2020-05-12 11:57:28 -04:00
Jim 61ca88dac9 refactor to use db.New() and clean up error msgs (#45) 2020-05-12 06:51:02 -04:00
Jeff Mitchell ad8d4e9c80 Rename Db's Tx to underlying 2020-05-11 21:05:11 -04:00
Jeff Mitchell 670abaed88 Rename GormReadWriter -> Db 2020-05-11 16:54:05 -04:00
Jim ee4a0d3f45 refactor lookups so we can easily check for not found and do the "right" thing in the repos (#42) 2020-05-11 16:21:09 -04:00
Jim bd5ddea6e4 refactor clonable to not rely on the resource interface (#36) 2020-05-11 10:31:15 -04:00
Jim 0676ea51f1 refactor oplog to use db/internal migrations, remove InitTicket() for more reliability and simplify test step up and tear down (#37) 2020-05-11 10:30:44 -04:00
Jim 8a5197e39e implement schema, store and repository for IAM scopes of organization and project 2020-05-08 11:36:28 -04:00
Jim 725a777baf refactor friendly name to just be name (#29) 2020-05-05 16:35:24 -04:00
Jim 27b4d7a034 basic internal db interfaces and Gorm implementation
* db reader and writer interfaces which should allow us to encapsulate the vast majority of database code in this package.

* GormReadWriter implementation of the Reader and Writer interfaces
2020-05-05 13:29:47 -04:00