Commit Graph
6 Commits
Author SHA1 Message Date
Jeff Mitchell 1987264bc3 Migrate storage to database repo (#2132) 2022-06-03 14:44:53 -04:00
Jeff Mitchell ea23737258 Port over API bits from #962 (#965) 2021-02-25 12:39:51 -05:00
Jeff Mitchell a00ee7a948 Add Result types to Go SDK and properly populate body/map fields (#358) 2020-09-15 01:08:21 -04:00
Todd Knight 44152ae63e Add API Error Handler (#74)
* Add error handler that converts from rpc.Status errors to Watchtower API errors.

* Better testing for ErrorHandler.

* Rename testcase and remove empty default switch case.

* Change the error status back to int64.

* Converting everything to int32s.

jsonpb wraps int64s as a string which we dont like.  We'll figure out how to use values larger than int64s when it comes up.

* Remove special casing for TraceId which isn't needed anymore.

* Removing wrappers from error details since we never need to know when they are set or unset from the end user.

* Using the helper error functions inside the project service.

* Correct usage of hclog, replace panic with Error log.

* Adding periods to all API returned errors, correct spelling, fix missed invalid argument error not using helper function.

* Change our logged errors to Error instead of Warn.

* Add TODO for defining and using our own defined API error codes.

* Add TODO to remove internal error messages.
2020-05-26 13:46:21 -07:00
Jeff Mitchell 17fffe7c23 Add Response type and decoding (#24)
This may not be the final interface for responses but it is fine to
start.

Fix some bugs, e.g. require an org and project to be set.
2020-05-04 23:02:18 -04:00
Jeff Mitchell 2926cc1000 Add initial API generation bits (#20)
* Add initial API generation bits

* Revert accidental changes to oplog
2020-05-04 10:58:20 -04:00