0.6
New: Formatting Module
Do you need to (re)format the received data before storing it? IT'S NOW POSSIBLE ! 🎉
One of the most useful bricks of Webhooked is perhaps this one. Formatting allows you to define the entire format of the data you will send to your storage. Globally or by storage.
Formatting use internally the go-template.
⚠ This is an advanced feature ⚠
Be careful when using this feature, the slightest error in format can result in DEFINITIVE loss of the collected data. Make sure your template is correct before applying it in production.
Beautiful example
apiVersion: v1alpha1
specs:
- name: demo
entrypointUrl: /demo
formatting:
templateString: |
{
"specName": "{{ .Spec.Name }}",
"metadata": {
"contentType": "{{ .Request.Header | getHeader "Content-Type" }}",
"deliveryID": "{{ .Request.Header | getHeader "X-Delivery" | default "unknown" }}"
},
"payload": {{ .Payload }}
}
storage: # { ... } Define your storage
Information is always available here: https://github.com/42Atomys/webhooked/wiki/Formatting
What's Changed
-
fix(storage): Possible CWE-89 on Postgres storage by @42atomys in #73
-
chore(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 by @dependabot in #55
-
chore(deps): bump github.com/go-redis/redis/v8 from 8.11.4 to 8.11.5 by @dependabot in #56
-
chore(deps): bump github.com/lib/pq from 1.10.4 to 1.10.5 by @dependabot in #59
-
chore(deps): bump github.com/spf13/viper from 1.10.1 to 1.11.0 by @dependabot in #61
-
chore(deps): bump github.com/mitchellh/mapstructure from 1.4.3 to 1.5.0 by @dependabot in #62
-
chore(deps): bump github.com/prometheus/client_golang from 1.12.1 to 1.12.2 by @dependabot in #68
Full Changelog: v0.5...0.6