multihook-0.3.0 is not a library.
Multihook is an easy to configure webhook server.
Installation
With cargo:
cargo install multihook
Usage
Just run it via systemd or smth.
multihook
Config
The config allows you to configure actions for each endpoint. The config is most likely
stored in ~/.config/multihook and on Windows maybe in the APPDATA directory (?).
After running the program for the first time the config directory and config file should be created.
[]
= '127.0.0.1:8080'
# the name needs to be unique
[]
# the path needs to be unique
= "path/on/the/server"
# a command or a path to the script
= "ls {{$.filepath}}"
# allows multiple instances of this action to run concurrently
= true
[]
= "error"
= "echo '{{$.books.*.title}}'"
# Validate secrets according to different parsing rules
# Currently only GitHub secrets are supported
= { = "my secret", = "GitHub"}
[]
= "script"
= "/home/trivernis/.local/share/multihook/test-script.sh"
= false
# doesn't wait for the command to finish and returns a http response directly
# This setting can be useful if your action takes a very long time to run and would
# cause a timeout
= true
The configured action is either a script file or a command.
In both cases placeholders with the syntax {{query}} can be used. The query
is the path to required values in the json body of the request. The request body
will also be provided in the environment variable HOOK_BODY.
License
GPL-3