9 unstable releases (3 breaking)
0.4.0 | Apr 24, 2019 |
---|---|
0.3.3 | Apr 23, 2019 |
0.2.1 | Apr 20, 2019 |
0.1.1 | Mar 31, 2019 |
#54 in #webhook
Used in 2 crates
30KB
561 lines
Rifling
Rifling is a library to create Github/GitLab Webhook listener, influenced by afterparty.
If you want a commandline tool rather than a library, please consult trigger.
Features
- Supports both GitHub and GitLab.
- Supports both
application/json
mode and (optionally)application/x-www-form-urlencoded
mode. - (Potentially) support for different web frameworks.
- Optional payload parsing support. Using
serde_json
's untyped parsing functionality. - Optional payload authentication support with
ring
or libraries from RustCrypto team. - Optional logging.
Optional features
- Web frameworks:
hyper-support
(default): Support of hyper. Example: hyper-simple.rs
- Payload authentication (does not affect usage):
- Payload content type:
content-type-urlencoded
(enabled by default): Support forapplication/x-www-form-urlencoded
typed content.
- Payload parsing:
parse
(default): Parse the payload. Parsed payload will be present inDelivery.payload
asOption<Value>
.
- Logging:
logging
(default): Use the officiallog
crate to log.logging-print
: Useprintln
macro to print log. Will be ignored whenlogging
is enabled.
Notes
- Debug logs are useful to find problems.
- Events received from GitLab will be patched by lower casing and replacing " "(whitespace) with "_"(underscore).
- e.g.
Push Hook
will bepush_hook
while registering hooks.
- e.g.
License
MIT License. See LICENSE.
Dependencies
~0–3MB
~80K SLoC