more documentation
This commit is contained in:
parent
6d9f9b178a
commit
0a677f2545
2 changed files with 35 additions and 15 deletions
|
@ -106,5 +106,9 @@ pub fn main(config: &TomlValue, input: &JsonValue) -> Result<JsonValue, Error> {
|
|||
.arg(&target_path)
|
||||
.output()
|
||||
.expect("Could not spawn process to clone");
|
||||
Ok(json!(1))
|
||||
Ok(json!(match target_path.to_str() {
|
||||
// TODO: what
|
||||
Some(s) => s,
|
||||
None => "",
|
||||
}))
|
||||
}
|
||||
|
|
44
src/lib.rs
44
src/lib.rs
|
@ -1,17 +1,33 @@
|
|||
//! # Dip
|
||||
//!
|
||||
//! The configurable webhook server. Latest stable binary releases for Linux are available on the [releases][1] page.
|
||||
//!
|
||||
//! ## Getting Started
|
||||
//!
|
||||
//! Setup is incredibly simple: first, obtain a copy of `dip` either through the binary releases page or by compiling from source.
|
||||
//! Then, create a directory that you'll use as your `DIP_ROOT` directory. It should look like this:
|
||||
//!
|
||||
//! ```text
|
||||
//!
|
||||
//! ```
|
||||
//!
|
||||
//! [1]: https://github.com/acmumn/dip/releases
|
||||
/*!
|
||||
# Dip
|
||||
|
||||
The configurable webhook server. Latest stable binary releases for Linux are available on the [releases][1] page.
|
||||
|
||||
## Flow
|
||||
|
||||
In your config file, you define **hooks**: endpoints that are listening for input. Each hook comprises of a series
|
||||
of handlers, which are building blocks of the hook. The hook will execute each handler in order, taking the output
|
||||
of one and passing it into the input of the next.
|
||||
|
||||
## Getting Started
|
||||
|
||||
Setup is incredibly simple: first, obtain a copy of `dip` either through the binary releases page or by compiling from source.
|
||||
Then, create a directory that you'll use as your `DIP_ROOT` directory. It should look like this:
|
||||
|
||||
```text
|
||||
root
|
||||
├─handlers
|
||||
│ ├─executable
|
||||
├─hooks
|
||||
│ ├─hookname
|
||||
```
|
||||
|
||||
Handlers exist in the form of executables that take a `--config` and an input via `stdin`. These inputs should
|
||||
take the form of JSON objects. Usually config is passed through the hook config, and stdin is the output of the
|
||||
previous handler.
|
||||
|
||||
[1]: https://github.com/acmumn/dip/releases
|
||||
*/
|
||||
|
||||
#![deny(missing_docs)]
|
||||
|
||||
|
|
Loading…
Reference in a new issue