# orbiter **Repository Path**: unknwon/orbiter ## Basic Information - **Project Name**: orbiter - **Description**: Orbiter 是一个 Webhook 收集与再分发工具。 - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://github.com/Unknwon/orbiter - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2016-02-07 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![](public/img/orbiter-brand.png) Orbiter is a tool for collecting and redistributing webhooks over the network. ## NOTICES - **This project comes with absolutely NO warranty for break changes**, - ... but you can file bugs, feature requests and usage questions **if you have to**. ## Features - [x] Receive and save webhook by time, type (GitHub, etc) and tags (repository, owner, etc). - [x] Redistribute webhook by APIs whenever and whatever it gets requested. - [ ] Nice admin dashboard to config and do statistics. ## WTF? Oh well, it is just a tool to collect webhook history when you don't have time to process them at the moment. Or, maybe you want to study the history later to understand a basic user action flow. And nothing else, sorry! ## Installation First of all, you need to install MySQL (WHAT?!). Then, install Orbiter: ``` go get github.com/Unknwon/orbiter ``` Please add `-u` flag to update in the future. Now, go to directory `$GOPATH/src/github.com/Unknwon/orbiter`: ```sh $ go build ``` ### Configuration The default configuration is located at `conf/app.ini`, please create another file called `custom/app.ini` to adjust your own values. Finally, execute `./orbiter`. The server should start listening on `0.0.0.0:8085` by default, visit http://localhost:8085. ## Quick Start ### Config New Collector Collector defines what the type (currently only support GitHub) and secret token should be. **Secret token is auto-generated by Orbiter, you can ask to regenerate as many times as you prefer**. Normally, one collector is for an individual repository, but that's up to you. After creation, setup the webhook with secret token in corresponding hosting site. For example, in GitHub: - `Payload URL`: `https://orbiter.unknwon.io/hook?secret=mysecretweapon` - `Content type`: `application/json` - `Secret`: **REMAIN EMPTY** - Events: **ORBITER DOES NOT CARE** ### View Recent History You can go to `/webhooks` to view recent receive history of webhooks, and their payloads. Important tags such as **repository owner**, **repository name**, **event type** and **sender** are extracted for payload automatically and can be used as query conditions for applications. ### Add New Application Application is basically nothing but contains a **access token** which is needed for calling APIs. ## APIs **All parameters and access token is passed by URL query parameters.** ### List Webhooks ``` GET /api/v1/webhooks ``` ##### Parameters Following parameters are all optional, and combine with condition **AND**. |Name|Description| |----|-----------| |collector_id|List webhooks that were received by certain collector| |owner|List webhooks that belongs to certain repository owner| |repo_name|List webhooks that belongs to certain repository| |event_type|List webhooks that have certain event type| |sender|List webhooks that were triggered by someone| |after|List webhooks that received after certain time point, this value is Unix nanoseconds| |limit|Maximum number of webhooks to response| ##### Example ``` GET /api/v1/webhooks?token=mysecretdefense&event_type=issue_comment&after=1454740438165946316&limit=10 ``` ## Acknowledgments - [AdminLTE](https://almsaeedstudio.com/): Open source Bootstrap 3 admin template - [Font Awesome](http://fontawesome.io/): The iconic font and CSS toolkit ## License This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text.