more documentation

This commit is contained in:
Michael Zhang 2018-09-01 16:48:37 -05:00
parent 6d9f9b178a
commit 0a677f2545
No known key found for this signature in database
GPG key ID: A1B65B603268116B
2 changed files with 35 additions and 15 deletions

View file

@ -106,5 +106,9 @@ pub fn main(config: &TomlValue, input: &JsonValue) -> Result<JsonValue, Error> {
.arg(&target_path) .arg(&target_path)
.output() .output()
.expect("Could not spawn process to clone"); .expect("Could not spawn process to clone");
Ok(json!(1)) Ok(json!(match target_path.to_str() {
// TODO: what
Some(s) => s,
None => "",
}))
} }

View file

@ -1,17 +1,33 @@
//! # Dip /*!
//! # Dip
//! The configurable webhook server. Latest stable binary releases for Linux are available on the [releases][1] page.
//! The configurable webhook server. Latest stable binary releases for Linux are available on the [releases][1] page.
//! ## Getting Started
//! ## Flow
//! 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: 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
//! ```text of one and passing it into the input of the next.
//!
//! ``` ## Getting Started
//!
//! [1]: https://github.com/acmumn/dip/releases 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)] #![deny(missing_docs)]