Commit Graph
12 Commits
Author SHA1 Message Date
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Johan Brandhorst-Satzkorn f57454b6b9 Rewrite interface{} to any (#2535)
* chore: Rewrite interface{} to any

* Add ignore revs
2022-10-25 19:29:38 -04:00
Jim 591ec476e7 refactor: Update internal/db and oplog to use go-dbw package for database operations. (#1785)
* chore: Add new dbw dependency

* refactor: Convert to use dbw.DB

* refactor (db): Change GetTicket(...) signature

* feature (db tests): Added TestDeleteWhere(...)
Adding this allows us to eliminate a leak of the gorm library

* refactor: Add ctx to ScanRows(...) signature
This is required to refactor all the deprecated errors pkg calls.
This refactor required adding a context to quite a few call chains
and in particular the job scheduler bits

* feature (db/tests): Add support for test opt: WithTestLogLevel(...)
This test only option allows callers to specify a log level for the
underlying db package (where supported/applicable) when calling
TestSetup(...)

* refactor (db): Simplify Db type
Only store the underlying *DB and create the *RW on demand when
needed.

* refactor (oplog): Port to using dbw pkg for db operations

* refactor (db): Remove gormDB(...) func

* tests (db): Add unit tests for TestDeleteWhere(...)

* chore: make fmt changes to formatting
2022-01-05 14:38:38 -05:00
Jim 136ac00b49 refact: Changes required for gorm v2 (#1528) 2021-09-30 08:47:34 -04:00
s-christoffandJim 6b78108ecf Update primary error functions to take a context, deprecate old functions (#1358)
* add new error funcs which take a ctx and deprecate existing funcs

* use context where available when writing error events

* remove circular internal/errors pkg dep

* suppress some chatty errors using errors.WithoutEvent()

* convert auth oidc funcs to take context where needed to write events

Co-authored-by: Jim <jlambert@hashicorp.com>
2021-07-29 20:52:56 -04:00
Louis Ruch 7387cec475 Remove sentinel errors (#968)
* Remove sentinal errors
2021-03-05 06:34:06 -08:00
Louis Ruch bfbb179741 ICU-738/Refactor internal/db to domain errors (#815)
* Refactor internal/db to domain errors
2020-12-21 10:07:34 -08:00
Louis Ruch ec0020de90 Refactor host_repo -> domain errors (#786)
* Refactor domain errors: New -> E, create helper New and Wrap
* Update host repo to use domain errors
2020-12-09 10:11:38 -08:00
Louis Ruch aa655f6991 Revert errorid (#797)
* Revert "Refactor domain error to use errorId (#790)"

This reverts commit d30dd0ff64.

* Revert "Create common errorID generation (#788)"

This reverts commit b8a5b9adf1.
2020-11-19 12:46:15 -08:00
Louis Ruch d30dd0ff64 Refactor domain error to use errorId (#790)
* Refactor domain error to use errorId

* Wrap accepts options and uses New internally
2020-11-17 18:54:23 -08:00
Jim af6ef1b687 Refactor existing sentinel errors (#774) 2020-11-05 16:54:03 -05:00
Jim fb3f11997e New domain errors based on the ICU-019 RFC (#760) 2020-11-04 14:42:20 -05:00