diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ebd692 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +vulture +vulture.exe +*.out diff --git a/.hgignore b/.hgignore deleted file mode 100644 index e500613..0000000 --- a/.hgignore +++ /dev/null @@ -1,8 +0,0 @@ -syntax: glob -re:^client/bower_components/ -re:^client/node_modules/ -re:^client/js/ -re:^client/lib/ -re:^vulture$ -*.komodoproject -*.out diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2627664 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 didier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 1139058..bc71e28 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ project is inspired by [mongs](http://whit537.org/mongs/) but has additional fea ### run vulture 1. Download your binaries - * [windows](https://bitbucket.org/damyot/vulture/downloads/vulture_1.0.0-vulture_windows_amd64.zip) - * [mac](https://bitbucket.org/damyot/vulture/downloads/vulture_1.0.0-vulture_darwin_amd64.zip) - * [linux](https://bitbucket.org/damyot/vulture/downloads/vulture_1.0.0-vulture_linux_amd64.tar.gz) + * [windows](https://bitbucket.org/damyot/vulture/downloads/vulture_1.1.0-vulture_windows_amd64.zip) + * [mac](https://bitbucket.org/damyot/vulture/downloads/vulture_1.1.0-vulture_darwin_amd64.zip) + * [linux](https://bitbucket.org/damyot/vulture/downloads/vulture_1.1.0-vulture_linux_amd64.tar.gz) 2. Unzip the file @@ -21,8 +21,8 @@ project is inspired by [mongs](http://whit537.org/mongs/) but has additional fea ### params -You can add mongodb servers or change the vulture listening port in the params.yml -file. +You can add mongodb servers or change the vulture listening port in the +*params.yml* file. ### screenshots @@ -34,13 +34,13 @@ file. +[general_view]: https://raw.githubusercontent.com/didiercrunch/vulture/master/screenshots/general.png +[geojson_view]: https://raw.githubusercontent.com/didiercrunch/vulture/master/screenshots/geo.png +[stats_view]: https://raw.githubusercontent.com/didiercrunch/vulture/master/screenshots/stats.png +[key_view]: https://raw.githubusercontent.com/didiercrunch/vulture/master/screenshots/key.png +### coding style - - - -[general_view]: https://bytebucket.org/damyot/vulture/raw/default/screenshots/general.png -[geojson_view]: https://bytebucket.org/damyot/vulture/raw/default/screenshots/geo.png -[stats_view]: https://bytebucket.org/damyot/vulture/raw/default/screenshots/stats.png -[key_view]: https://bytebucket.org/damyot/vulture/raw/default/screenshots/key.png \ No newline at end of file +The coding standard is very low. Unfortunatly. there are very few tests. If the project +triggers enough enthusiasm, I'll make more tests. \ No newline at end of file diff --git a/api.go b/api.go index bd6814f..0050067 100644 --- a/api.go +++ b/api.go @@ -1,16 +1,18 @@ package main import ( - "bitbucket.org/damyot/vulture/shared" "encoding/json" "errors" "fmt" - "github.com/gorilla/mux" - "gopkg.in/mgo.v2" - "gopkg.in/mgo.v2/bson" "net/http" "net/url" "strconv" + + "github.com/gorilla/mux" + "gopkg.in/mgo.v2" + "gopkg.in/mgo.v2/bson" + + "github.com/didiercrunch/vulture/shared" ) type VultureBackend struct { diff --git a/client/.gitignore b/client/.gitignore new file mode 100644 index 0000000..6df1b74 --- /dev/null +++ b/client/.gitignore @@ -0,0 +1,7 @@ +node_modules/** +bower_components/** +js/** +lib/** + +npm-debug.log + diff --git a/main.go b/main.go index f23e551..8976bf5 100644 --- a/main.go +++ b/main.go @@ -2,13 +2,14 @@ package main import ( "fmt" - "github.com/gorilla/mux" - goyaml "gopkg.in/yaml.v2" "io/ioutil" "log" "net/http" "path" "strconv" + + "github.com/gorilla/mux" + goyaml "gopkg.in/yaml.v2" ) const PARAM_FILE string = "params.yml" diff --git a/shared/mongo.go b/shared/mongo.go index efb4048..c11fa18 100644 --- a/shared/mongo.go +++ b/shared/mongo.go @@ -3,9 +3,10 @@ package shared import ( "errors" "fmt" - "gopkg.in/mgo.v2" "net/url" "strings" + + "gopkg.in/mgo.v2" ) var mongoClients = make(map[string]*mgo.Session)