Commit Graph
12 Commits
Author SHA1 Message Date
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
Michael GaffneyandJeff Mitchell 94cb79bbdd See how Boundary would look with gofumpt applied (#853)
* See how Boundary would look with https://github.com/mvdan/gofumpt applied

Results of running `gofumpt -w -s .`

* Update tools file and Makefile for gofumpt

Co-authored-by: Jeff Mitchell <jeffrey.mitchell@gmail.com>
2021-01-07 10:02:32 -05:00
Jim 96e4b1cdba add option db.WithSkipVetForWrite(true) so the db tests don't get intercepted by app validation (#332) 2020-09-07 13:20:49 -04:00
Jeff Mitchell 8f579c75c3 paum -> ampw (#303) 2020-08-25 00:21:08 -04:00
Michael Gaffney b24fc185a7 Export TestSets helper function (#292) 2020-08-20 15:13:12 -04:00
Michael Gaffney 3a3cdd7219 Static host set repository methods (#289)
* Implement CreateSet

* Implement UpdateSet

* Implement LookupSet

* Implement ListSets

* Implement DeleteSet

* Remove unused parameter from test helper function

* Update to use new kms structure

* Remove unused parameter for test helper function

* Fix resource-type string for host set
2020-08-20 13:56:52 -04:00
Todd Knight d5678c4f80 Handler for Host CRUDL actions (#287) 2020-08-20 08:20:26 -07:00
Jim 9570897032 basic keys mgmt repo (#264) 2020-08-19 16:47:18 -04:00
Michael Gaffney e18cdc52b3 Create host (#276)
* Change testHostCatalog methods to be like other resource test methods

* Implement CreateHost

* Make allocHost return a pointer to a Host
2020-08-17 17:06:31 -04:00
Michael Gaffney 7d133878be Add base types for host catalog, host set, and host (#272)
* Move static host migrations to higher number

* Add wt_host_address domain type

* Add base tables for host catalog, host set, and host

* Reformat create trigger statements

* Add subtype triggers for host catalog, host set, and host

* Remove wt_host_address domain type

* Rename columns in host_set_member

* Add delete trigger functions for base types

* Add delete after triggers to static host subtypes

* Add protobufs for host base types
2020-08-17 11:00:41 -04:00
Jeff Mitchell 6661117d4c The name. The name. The name! 2020-08-10 17:15:02 -04:00
Jim cb89422d9d define immutable fields including PKs. (#205) 2020-07-30 16:04:15 -04:00