Code Monkey home page Code Monkey logo

rifling's Introduction

Rifling

license crates.io docs.rs Build Status

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:
  • Payload authentication (does not affect usage):
    • crypto-use-ring (default): Use ring as cryptography library. This MAY be faster but has some C code.
    • crypto-use-rustcrypto: Use libraries from RustCrypto team (hmac and sha-1). These libraries are pure Rust implementations of these algorithms, which can be linked with musl.
  • Payload content type:
    • content-type-urlencoded (enabled by default): Support for application/x-www-form-urlencoded typed content.
  • Payload parsing:
    • parse (default): Parse the payload. Parsed payload will be present in Delivery.payload as Option<Value>.
  • Logging:
    • logging (default): Use the official log crate to log.
    • logging-print: Use println macro to print log. Will be ignored when logging 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 be push_hook while registering hooks.

License

MIT License. See LICENSE.

rifling's People

Contributors

redl0tus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rifling's Issues

Refactor with Hyper 1.0

This is the tracking issue for rifling's refactoring.

There is a plan for refactoring rifling, but due to Hyper's constantly-braking API and the lack of documentation, I decide to delay it to the release of Hyper 1.0.

I'm too lazy

To be continued...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.