Commit Graph

9 Commits

Author SHA1 Message Date
Nicholas Wiersma
d932d50232 chore: lint code with golangci-lint (#1828)
* feat: add golangci-lint linting

* chore: fix linter issues

* feat: add linting into the workflow

* docs: update lint docs

* fix: cr suggestions

* fix: remove old formatting and vetting scripts

* fix: add docker make target

* fix: action go caching

* fix: depreciated actions checkout version

* fix: cr suggestion

* fix: cr suggestions

---------

Co-authored-by: Manu Gupta <manugupt1@gmail.com>
2023-02-24 20:39:17 -08:00
Nicholas Wiersma
ab64133949 feat: replace ioutil with io and os (#1816) 2023-01-27 20:42:47 +05:30
Marwan Sulaiman
f01c645305 pkg/middleware: add tracing to ValidationHook (#1627) 2020-06-15 16:34:24 -04:00
Mark Dodgson
f76ca00665 Display warning log message if validation fails (#1517)
* Display a warning log message if the validation response fails with a valid reason

* provide a reason and description for failed validation

* added unknown to description

* Allow a successful response to carry a message

* tidy up

* formatting

* Simplified the message response

* updated based on latest comments

* no need to export struct

* suggested method rename

Co-authored-by: Marwan Sulaiman <marwan.sameer@gmail.com>
2020-01-20 13:26:17 -05:00
Marwan Sulaiman
5870aeee8d Remove Buffalo (#1010)
* Remove Buffalo

* gofmt

* pr fixes

* fix subrouter

* bring back secure middleware + pr fixes

* better place for subrouter

* vendor
2018-12-22 20:24:25 -05:00
Brent Pendergraft
3c223dcfca add new log context middleware to store log entries in the context (#844)
* add new log context middleware to store log entries in the context

* replace LogEntryMiddleware and add NoOpLogger

* fix failing test

* move middleware to top level

* actually move middleware to top level
2018-11-06 08:46:51 -05:00
Don McNamara
3db7a667f0 Clean up error operation names to match function names. (#614) 2018-09-19 23:43:09 -04:00
Manu Gupta
bb250437da Instrumenting observability with opencensus (#604)
* Initial chanages for observability

* Fix some panics to start testing

* Export tracing properly

* First example of child spans using opencensus

* Add spans to download protocol

* Add url to traces

* Remove opentracing

* Remove gopkg.* files

* Start deprecating opentracing

* Resolve stupid build errors

* Use observability package

* Fix test errors

* Convert buffalo spans to observercontext

* change package name

* defer flush to the end of the app execution

* Change op names to the correct package

* Rename pkg/observability to pkg/observ

* Show traces for the package

* Keep tracing in the earlier way

* Add info from request headers

* Remove whitespace

* Move exporter url to env var

* Add to env file for documentation

* Remove opentracing stuff

* Use stdlib

* Shorten service name

* Add a service name to olympus as well

* Add test to test if there is a recursion or not

* Add Ops Suite

* Move around code

* Make sure the service is not instantiated if the exporter is not found
2018-09-11 10:31:20 -07:00
Federico Paolinelli
c8b64fd258 Proxy 'admission controller' (#492)
* The proxy middleware calls an hook if set to check if the module needs
to be filtered

* Fixed error handling

* Added a middleware func that passes the log entry down to other
middlewares

* Split the filter middleware in two

* Moved validation middleware in its own file

* Renamed filter to middleware, all the middleware stuff in a single file

* Moved default hook to empty string

* Split tests of filter middleware from validation middleware

* Installed the validation middleware only if the hook is set

* Moved filter test to middleware test

* Fixed gofmt issue caused by manual merge

* Fixed wrong logrus import

* Removed logger from filter middleware

* Moved middleware functions to own package

* Removed unused argument, fixed errors

* Fixed gofmt errors

* Made middleware func private

* Changed debuglevel from string to enum

* Added comments to now public functions

* Changed module alias to a shorter one

* Removed white space

* Split middleware in separate files, injected the hook as param

* Removed commented code
2018-08-21 22:51:26 +02:00