├── LICENSE ├── README.md ├── appengine ├── README.md ├── app.yaml ├── go.mod ├── go.sum ├── main.go └── main_test.go └── rocket ├── .dockerignore ├── .editorconfig ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Dockerfile ├── README.md ├── docker-compose.yml └── src └── main.rs /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018- Suyash 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flowy-servers 2 | 3 | A couple of implementations for storage servers for [Flowy](https://suy.io/flowy). 4 | 5 | - [rocket](/rocket): A simple dev server written in [rocket](https://rocket.rs) 6 | 7 | - [appengine](/appengine): A Go server that can be deployed to Google App Engine general environment. 8 | -------------------------------------------------------------------------------- /appengine/README.md: -------------------------------------------------------------------------------- 1 | - Install Google Cloud SDK 2 | 3 | - set API_KEY to something in app.yaml 4 | 5 | - To run locally 6 | 7 | ``` 8 | dev_appserver.py app.yaml 9 | ``` 10 | 11 | will bring up a local server on http://localhost:8080 12 | 13 | - To deploy 14 | 15 | ``` 16 | gcloud projects create PROJECT_ID --set-as-default 17 | ``` 18 | 19 | ``` 20 | gcloud app deploy 21 | ``` 22 | 23 | will deploy on https://PROJECT_ID.appspot.com 24 | 25 | - In flowy, set URL and API Key in set storage, and select resync remote storage, which will resync your local items on the web server. 26 | 27 | - To get the same items on any other device, open flowy and set storage and API key, and select resync local storage. 28 | -------------------------------------------------------------------------------- /appengine/app.yaml: -------------------------------------------------------------------------------- 1 | runtime: go 2 | api_version: go1 3 | 4 | handlers: 5 | 6 | # All URLs are handled by the Go application script 7 | - url: /.* 8 | script: _go_app 9 | 10 | env_variables: 11 | API_KEY: '' 12 | -------------------------------------------------------------------------------- /appengine/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/suyash/flowy-server/appengine 2 | 3 | require ( 4 | github.com/gorilla/mux v1.6.2 5 | google.golang.org/appengine v1.2.0 6 | ) 7 | -------------------------------------------------------------------------------- /appengine/go.sum: -------------------------------------------------------------------------------- 1 | github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= 2 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 3 | github.com/gorilla/mux v1.6.2 h1:Pgr17XVTNXAk3q/r4CpKzC5xBM/qW1uVLV+IhRZpIIk= 4 | github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 5 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225 h1:kNX+jCowfMYzvlSvJu5pQWEmyWFrBXJ3PBy10xKMXK8= 6 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 7 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 8 | google.golang.org/appengine v1.2.0 h1:S0iUepdCWODXRvtE+gcRDd15L+k+k1AiHlMiMjefH24= 9 | google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 10 | -------------------------------------------------------------------------------- /appengine/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "context" 5 | "encoding/json" 6 | "fmt" 7 | "io/ioutil" 8 | "net/http" 9 | "os" 10 | 11 | "github.com/gorilla/mux" 12 | "google.golang.org/appengine" 13 | "google.golang.org/appengine/datastore" 14 | "google.golang.org/appengine/log" 15 | ) 16 | 17 | var apiKey = os.Getenv("API_KEY") 18 | 19 | func main() { 20 | r := mux.NewRouter() 21 | 22 | r.HandleFunc("/set", func(res http.ResponseWriter, req *http.Request) { 23 | ctx := appengine.NewContext(req) 24 | set(ctx, res, req) 25 | }) 26 | 27 | r.HandleFunc("/{id}", func(res http.ResponseWriter, req *http.Request) { 28 | ctx := appengine.NewContext(req) 29 | 30 | vars := mux.Vars(req) 31 | id := vars["id"] 32 | 33 | getOrDelete(ctx, id, res, req) 34 | }) 35 | 36 | r.HandleFunc("/", index) 37 | 38 | http.Handle("/", r) 39 | appengine.Main() 40 | } 41 | 42 | func index(res http.ResponseWriter, req *http.Request) { 43 | fmt.Fprintln(res, "ok") 44 | } 45 | 46 | // Task is a single item. 47 | type Task struct { 48 | ID string `json:"id"` 49 | Text string `json:"text"` 50 | Checked bool `json:"checked"` 51 | Children []string `json:"children"` 52 | } 53 | 54 | func set(ctx context.Context, res http.ResponseWriter, req *http.Request) { 55 | if req.Method == http.MethodOptions { 56 | addCORSHeaders(res) 57 | res.WriteHeader(http.StatusOK) 58 | return 59 | } 60 | 61 | if req.Method != http.MethodPost { 62 | res.WriteHeader(http.StatusNotFound) 63 | return 64 | } 65 | 66 | if req.Header.Get("X-API-Key") != apiKey { 67 | res.WriteHeader(http.StatusUnauthorized) 68 | return 69 | } 70 | 71 | data, err := ioutil.ReadAll(req.Body) 72 | defer req.Body.Close() 73 | 74 | if err != nil { 75 | log.Errorf(ctx, "Could not read body") 76 | res.WriteHeader(http.StatusInternalServerError) 77 | return 78 | } 79 | 80 | var task Task 81 | if err := json.Unmarshal(data, &task); err != nil { 82 | log.Errorf(ctx, "Could not unmarshal, error: %v", err) 83 | res.WriteHeader(http.StatusBadRequest) 84 | return 85 | } 86 | 87 | key := datastore.NewKey(ctx, "Task", task.ID, 0, nil) 88 | 89 | if err := datastore.Get(ctx, key, &task); err != nil { 90 | if err := datastore.Delete(ctx, key); err != nil { 91 | log.Errorf(ctx, "Could not remove from datastore, error: %v", err) 92 | } 93 | } 94 | 95 | if _, err := datastore.Put(ctx, key, &task); err != nil { 96 | log.Errorf(ctx, "Could not add to datastore, error: %v", err) 97 | res.WriteHeader(http.StatusInternalServerError) 98 | return 99 | } 100 | 101 | addCORSHeaders(res) 102 | res.Header().Set("Content-Type", "application/json") 103 | fmt.Fprintln(res, "{ \"ok\": true }") 104 | } 105 | 106 | func getOrDelete(ctx context.Context, id string, res http.ResponseWriter, req *http.Request) { 107 | if req.Method == http.MethodOptions { 108 | addCORSHeaders(res) 109 | res.WriteHeader(http.StatusOK) 110 | return 111 | } 112 | 113 | if req.Method != http.MethodGet && req.Method != http.MethodDelete { 114 | res.WriteHeader(http.StatusNotFound) 115 | return 116 | } 117 | 118 | if req.Header.Get("X-API-Key") != apiKey { 119 | res.WriteHeader(http.StatusUnauthorized) 120 | return 121 | } 122 | 123 | addCORSHeaders(res) 124 | 125 | key := datastore.NewKey(ctx, "Task", id, 0, nil) 126 | 127 | res.Header().Set("Content-Type", "application/json") 128 | 129 | if req.Method == http.MethodDelete { 130 | if err := datastore.Delete(ctx, key); err != nil { 131 | log.Errorf(ctx, "Could not remove from datastore, error: %v", err) 132 | res.WriteHeader(http.StatusInternalServerError) 133 | return 134 | } 135 | 136 | fmt.Fprintln(res, "\"ok\": true") 137 | } else { 138 | var task Task 139 | if err := datastore.Get(ctx, key, &task); err != nil { 140 | log.Errorf(ctx, "Could not get from datastore, error: %v", err) 141 | res.WriteHeader(http.StatusInternalServerError) 142 | return 143 | } 144 | 145 | data, err := json.Marshal(task) 146 | if err != nil { 147 | log.Errorf(ctx, "Could not encode to json, error: %v", err) 148 | res.WriteHeader(http.StatusInternalServerError) 149 | return 150 | } 151 | 152 | res.Write(data) 153 | } 154 | } 155 | 156 | func addCORSHeaders(res http.ResponseWriter) { 157 | res.Header().Set("Access-Control-Allow-Origin", "https://suy.io") 158 | res.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE") 159 | res.Header().Set("Access-Control-Allow-Headers", "Content-Type, Accept, X-API-Key") 160 | res.Header().Set("Access-Control-Allow-Credentials", "true") 161 | } 162 | -------------------------------------------------------------------------------- /appengine/main_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "bytes" 5 | "context" 6 | "encoding/json" 7 | "io" 8 | "net/http" 9 | "net/http/httptest" 10 | "testing" 11 | 12 | "google.golang.org/appengine" 13 | "google.golang.org/appengine/aetest" 14 | ) 15 | 16 | func TestWorkflow(t *testing.T) { 17 | inst, err := aetest.NewInstance(nil) 18 | if err != nil { 19 | t.Fatal(err) 20 | } 21 | defer inst.Close() 22 | 23 | ctx1, res1, req1 := request(http.MethodGet, "/root", nil, inst, t) 24 | getOrDelete(ctx1, "root", res1, req1) 25 | 26 | if res1.Code != 500 { 27 | t.Errorf("Expected Response to be %v, got %v", 500, res1.Code) 28 | } 29 | 30 | task := Task{ID: "root", Text: "b", Checked: false, Children: []string{"d"}} 31 | data, err := json.Marshal(task) 32 | if err != nil { 33 | t.Fatal(err) 34 | } 35 | 36 | reader := bytes.NewReader(data) 37 | 38 | ctx2, res2, req2 := request(http.MethodPost, "/set", reader, inst, t) 39 | set(ctx2, res2, req2) 40 | 41 | if res2.Code != 200 { 42 | t.Errorf("Expected Response to be %v, got %v", 200, res2.Code) 43 | } 44 | 45 | ctx3, res3, req3 := request(http.MethodGet, "/root", nil, inst, t) 46 | getOrDelete(ctx3, "root", res3, req3) 47 | 48 | if res3.Code != 200 { 49 | t.Errorf("Expected Response to be %v, got %v", 200, res3.Code) 50 | } 51 | 52 | ctx4, res4, req4 := request(http.MethodDelete, "/root", nil, inst, t) 53 | getOrDelete(ctx4, "root", res4, req4) 54 | 55 | if res4.Code != 200 { 56 | t.Errorf("Expected Response to be %v, got %v", 200, res4.Code) 57 | } 58 | 59 | ctx5, res5, req5 := request(http.MethodGet, "/root", nil, inst, t) 60 | getOrDelete(ctx5, "root", res5, req5) 61 | 62 | if res5.Code != 500 { 63 | t.Errorf("Expected Response to be %v, got %v", 500, res5.Code) 64 | } 65 | } 66 | 67 | func request( 68 | method string, 69 | path string, 70 | body io.Reader, 71 | inst aetest.Instance, 72 | t *testing.T, 73 | ) (context.Context, *httptest.ResponseRecorder, *http.Request) { 74 | req, err := inst.NewRequest(method, path, body) 75 | if err != nil { 76 | t.Fatal(err) 77 | } 78 | 79 | ctx, res := appengine.NewContext(req), httptest.NewRecorder() 80 | 81 | return ctx, res, req 82 | } 83 | -------------------------------------------------------------------------------- /rocket/.dockerignore: -------------------------------------------------------------------------------- 1 | target 2 | Dockerfile* 3 | docker-compose* 4 | .gitignore 5 | -------------------------------------------------------------------------------- /rocket/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | -------------------------------------------------------------------------------- /rocket/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | -------------------------------------------------------------------------------- /rocket/Cargo.lock: -------------------------------------------------------------------------------- 1 | [[package]] 2 | name = "ascii" 3 | version = "0.9.1" 4 | source = "registry+https://github.com/rust-lang/crates.io-index" 5 | 6 | [[package]] 7 | name = "base64" 8 | version = "0.9.3" 9 | source = "registry+https://github.com/rust-lang/crates.io-index" 10 | dependencies = [ 11 | "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 12 | "safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 13 | ] 14 | 15 | [[package]] 16 | name = "base64" 17 | version = "0.10.0" 18 | source = "registry+https://github.com/rust-lang/crates.io-index" 19 | dependencies = [ 20 | "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 21 | ] 22 | 23 | [[package]] 24 | name = "bitflags" 25 | version = "0.7.0" 26 | source = "registry+https://github.com/rust-lang/crates.io-index" 27 | 28 | [[package]] 29 | name = "bitflags" 30 | version = "1.0.4" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | 33 | [[package]] 34 | name = "byteorder" 35 | version = "1.2.7" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | 38 | [[package]] 39 | name = "bytes" 40 | version = "0.4.11" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | dependencies = [ 43 | "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 44 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 45 | ] 46 | 47 | [[package]] 48 | name = "cc" 49 | version = "1.0.28" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | 52 | [[package]] 53 | name = "cfg-if" 54 | version = "0.1.6" 55 | source = "registry+https://github.com/rust-lang/crates.io-index" 56 | 57 | [[package]] 58 | name = "cloudabi" 59 | version = "0.0.3" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | dependencies = [ 62 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 63 | ] 64 | 65 | [[package]] 66 | name = "combine" 67 | version = "3.6.3" 68 | source = "registry+https://github.com/rust-lang/crates.io-index" 69 | dependencies = [ 70 | "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 71 | "byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 72 | "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 73 | "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 74 | "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 75 | ] 76 | 77 | [[package]] 78 | name = "cookie" 79 | version = "0.11.0" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | dependencies = [ 82 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 83 | "ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)", 84 | "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 85 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 86 | ] 87 | 88 | [[package]] 89 | name = "crossbeam-utils" 90 | version = "0.6.3" 91 | source = "registry+https://github.com/rust-lang/crates.io-index" 92 | dependencies = [ 93 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 94 | ] 95 | 96 | [[package]] 97 | name = "dev" 98 | version = "0.1.0" 99 | dependencies = [ 100 | "redis 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", 101 | "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 102 | "rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 103 | "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", 104 | "serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", 105 | "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", 106 | ] 107 | 108 | [[package]] 109 | name = "devise" 110 | version = "0.2.0" 111 | source = "registry+https://github.com/rust-lang/crates.io-index" 112 | dependencies = [ 113 | "devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 114 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 115 | ] 116 | 117 | [[package]] 118 | name = "devise_codegen" 119 | version = "0.2.0" 120 | source = "registry+https://github.com/rust-lang/crates.io-index" 121 | dependencies = [ 122 | "devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 123 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 124 | ] 125 | 126 | [[package]] 127 | name = "devise_core" 128 | version = "0.2.0" 129 | source = "registry+https://github.com/rust-lang/crates.io-index" 130 | dependencies = [ 131 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 132 | "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 133 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 134 | "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)", 135 | ] 136 | 137 | [[package]] 138 | name = "either" 139 | version = "1.5.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | 142 | [[package]] 143 | name = "filetime" 144 | version = "0.2.4" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | dependencies = [ 147 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 148 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 149 | "redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", 150 | ] 151 | 152 | [[package]] 153 | name = "fsevent" 154 | version = "0.2.17" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | dependencies = [ 157 | "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 158 | "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 159 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 160 | ] 161 | 162 | [[package]] 163 | name = "fsevent-sys" 164 | version = "0.1.6" 165 | source = "registry+https://github.com/rust-lang/crates.io-index" 166 | dependencies = [ 167 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 168 | ] 169 | 170 | [[package]] 171 | name = "fuchsia-zircon" 172 | version = "0.3.3" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | dependencies = [ 175 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 176 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 177 | ] 178 | 179 | [[package]] 180 | name = "fuchsia-zircon-sys" 181 | version = "0.3.3" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | 184 | [[package]] 185 | name = "futures" 186 | version = "0.1.25" 187 | source = "registry+https://github.com/rust-lang/crates.io-index" 188 | 189 | [[package]] 190 | name = "httparse" 191 | version = "1.3.3" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | 194 | [[package]] 195 | name = "hyper" 196 | version = "0.10.15" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | dependencies = [ 199 | "base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)", 200 | "httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 201 | "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 202 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 203 | "mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", 204 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 205 | "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 206 | "traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 207 | "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 208 | "unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)", 209 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 210 | ] 211 | 212 | [[package]] 213 | name = "idna" 214 | version = "0.1.5" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | dependencies = [ 217 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 218 | "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", 219 | "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 220 | ] 221 | 222 | [[package]] 223 | name = "indexmap" 224 | version = "1.0.2" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | 227 | [[package]] 228 | name = "inotify" 229 | version = "0.6.1" 230 | source = "registry+https://github.com/rust-lang/crates.io-index" 231 | dependencies = [ 232 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 233 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 234 | "inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", 235 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 236 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 237 | "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 238 | "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 239 | ] 240 | 241 | [[package]] 242 | name = "inotify-sys" 243 | version = "0.1.3" 244 | source = "registry+https://github.com/rust-lang/crates.io-index" 245 | dependencies = [ 246 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 247 | ] 248 | 249 | [[package]] 250 | name = "iovec" 251 | version = "0.1.2" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | dependencies = [ 254 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 255 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 256 | ] 257 | 258 | [[package]] 259 | name = "isatty" 260 | version = "0.1.9" 261 | source = "registry+https://github.com/rust-lang/crates.io-index" 262 | dependencies = [ 263 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 264 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 265 | "redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", 266 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 267 | ] 268 | 269 | [[package]] 270 | name = "itoa" 271 | version = "0.4.3" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | 274 | [[package]] 275 | name = "kernel32-sys" 276 | version = "0.2.2" 277 | source = "registry+https://github.com/rust-lang/crates.io-index" 278 | dependencies = [ 279 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 280 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 281 | ] 282 | 283 | [[package]] 284 | name = "language-tags" 285 | version = "0.2.2" 286 | source = "registry+https://github.com/rust-lang/crates.io-index" 287 | 288 | [[package]] 289 | name = "lazy_static" 290 | version = "1.2.0" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | 293 | [[package]] 294 | name = "lazycell" 295 | version = "1.2.1" 296 | source = "registry+https://github.com/rust-lang/crates.io-index" 297 | 298 | [[package]] 299 | name = "libc" 300 | version = "0.2.45" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | 303 | [[package]] 304 | name = "lock_api" 305 | version = "0.1.5" 306 | source = "registry+https://github.com/rust-lang/crates.io-index" 307 | dependencies = [ 308 | "owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 309 | "scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 310 | ] 311 | 312 | [[package]] 313 | name = "log" 314 | version = "0.3.9" 315 | source = "registry+https://github.com/rust-lang/crates.io-index" 316 | dependencies = [ 317 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 318 | ] 319 | 320 | [[package]] 321 | name = "log" 322 | version = "0.4.6" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | dependencies = [ 325 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 326 | ] 327 | 328 | [[package]] 329 | name = "matches" 330 | version = "0.1.8" 331 | source = "registry+https://github.com/rust-lang/crates.io-index" 332 | 333 | [[package]] 334 | name = "memchr" 335 | version = "2.1.2" 336 | source = "registry+https://github.com/rust-lang/crates.io-index" 337 | dependencies = [ 338 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 339 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 340 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 341 | ] 342 | 343 | [[package]] 344 | name = "mime" 345 | version = "0.2.6" 346 | source = "registry+https://github.com/rust-lang/crates.io-index" 347 | dependencies = [ 348 | "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", 349 | ] 350 | 351 | [[package]] 352 | name = "mio" 353 | version = "0.6.16" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | dependencies = [ 356 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 357 | "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 358 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 359 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 360 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 361 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 362 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 363 | "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 364 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 365 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 366 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 367 | ] 368 | 369 | [[package]] 370 | name = "mio-extras" 371 | version = "2.0.5" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | dependencies = [ 374 | "lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 375 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 376 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 377 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 378 | ] 379 | 380 | [[package]] 381 | name = "miow" 382 | version = "0.2.1" 383 | source = "registry+https://github.com/rust-lang/crates.io-index" 384 | dependencies = [ 385 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 386 | "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", 387 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 388 | "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", 389 | ] 390 | 391 | [[package]] 392 | name = "net2" 393 | version = "0.2.33" 394 | source = "registry+https://github.com/rust-lang/crates.io-index" 395 | dependencies = [ 396 | "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 397 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 398 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 399 | ] 400 | 401 | [[package]] 402 | name = "notify" 403 | version = "4.0.6" 404 | source = "registry+https://github.com/rust-lang/crates.io-index" 405 | dependencies = [ 406 | "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 407 | "filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", 408 | "fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)", 409 | "fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 410 | "inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", 411 | "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 412 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 413 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 414 | "mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)", 415 | "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 416 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 417 | ] 418 | 419 | [[package]] 420 | name = "num_cpus" 421 | version = "1.9.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | dependencies = [ 424 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 425 | ] 426 | 427 | [[package]] 428 | name = "owning_ref" 429 | version = "0.4.0" 430 | source = "registry+https://github.com/rust-lang/crates.io-index" 431 | dependencies = [ 432 | "stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 433 | ] 434 | 435 | [[package]] 436 | name = "parking_lot" 437 | version = "0.6.4" 438 | source = "registry+https://github.com/rust-lang/crates.io-index" 439 | dependencies = [ 440 | "lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 441 | "parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", 442 | ] 443 | 444 | [[package]] 445 | name = "parking_lot_core" 446 | version = "0.3.1" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | dependencies = [ 449 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 450 | "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", 451 | "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 452 | "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", 453 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 454 | ] 455 | 456 | [[package]] 457 | name = "pear" 458 | version = "0.1.2" 459 | source = "registry+https://github.com/rust-lang/crates.io-index" 460 | dependencies = [ 461 | "pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 462 | ] 463 | 464 | [[package]] 465 | name = "pear_codegen" 466 | version = "0.1.2" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | dependencies = [ 469 | "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 470 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 471 | "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)", 472 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 473 | "yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 474 | ] 475 | 476 | [[package]] 477 | name = "percent-encoding" 478 | version = "1.0.1" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | 481 | [[package]] 482 | name = "proc-macro2" 483 | version = "0.4.24" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | dependencies = [ 486 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 487 | ] 488 | 489 | [[package]] 490 | name = "quote" 491 | version = "0.6.10" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | dependencies = [ 494 | "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 495 | ] 496 | 497 | [[package]] 498 | name = "rand" 499 | version = "0.5.5" 500 | source = "registry+https://github.com/rust-lang/crates.io-index" 501 | dependencies = [ 502 | "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 503 | "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", 504 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 505 | "rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 506 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 507 | ] 508 | 509 | [[package]] 510 | name = "rand_core" 511 | version = "0.2.2" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | dependencies = [ 514 | "rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", 515 | ] 516 | 517 | [[package]] 518 | name = "rand_core" 519 | version = "0.3.0" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | 522 | [[package]] 523 | name = "redis" 524 | version = "0.9.1" 525 | source = "registry+https://github.com/rust-lang/crates.io-index" 526 | dependencies = [ 527 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 528 | "combine 3.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 529 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 530 | "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 531 | "tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 532 | "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 533 | "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 534 | "tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 535 | "url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)", 536 | ] 537 | 538 | [[package]] 539 | name = "redox_syscall" 540 | version = "0.1.44" 541 | source = "registry+https://github.com/rust-lang/crates.io-index" 542 | 543 | [[package]] 544 | name = "ring" 545 | version = "0.13.5" 546 | source = "registry+https://github.com/rust-lang/crates.io-index" 547 | dependencies = [ 548 | "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 549 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 550 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 551 | "untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", 552 | ] 553 | 554 | [[package]] 555 | name = "rocket" 556 | version = "0.4.0" 557 | source = "registry+https://github.com/rust-lang/crates.io-index" 558 | dependencies = [ 559 | "base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 560 | "isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 561 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 562 | "memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 563 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 564 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 565 | "rocket_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 566 | "rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 567 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 568 | "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 569 | "toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", 570 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 571 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 572 | ] 573 | 574 | [[package]] 575 | name = "rocket_codegen" 576 | version = "0.4.0" 577 | source = "registry+https://github.com/rust-lang/crates.io-index" 578 | dependencies = [ 579 | "devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 580 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 581 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 582 | "rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 583 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 584 | "yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 585 | ] 586 | 587 | [[package]] 588 | name = "rocket_contrib" 589 | version = "0.4.0" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | dependencies = [ 592 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 593 | "notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)", 594 | "rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 595 | "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", 596 | "serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)", 597 | ] 598 | 599 | [[package]] 600 | name = "rocket_http" 601 | version = "0.4.0" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | dependencies = [ 604 | "cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 605 | "hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)", 606 | "indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 607 | "pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 608 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 609 | "smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)", 610 | "state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 611 | "time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)", 612 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 613 | ] 614 | 615 | [[package]] 616 | name = "rustc_version" 617 | version = "0.2.3" 618 | source = "registry+https://github.com/rust-lang/crates.io-index" 619 | dependencies = [ 620 | "semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 621 | ] 622 | 623 | [[package]] 624 | name = "ryu" 625 | version = "0.2.7" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | 628 | [[package]] 629 | name = "safemem" 630 | version = "0.3.0" 631 | source = "registry+https://github.com/rust-lang/crates.io-index" 632 | 633 | [[package]] 634 | name = "same-file" 635 | version = "1.0.4" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | dependencies = [ 638 | "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 639 | ] 640 | 641 | [[package]] 642 | name = "scopeguard" 643 | version = "0.3.3" 644 | source = "registry+https://github.com/rust-lang/crates.io-index" 645 | 646 | [[package]] 647 | name = "semver" 648 | version = "0.9.0" 649 | source = "registry+https://github.com/rust-lang/crates.io-index" 650 | dependencies = [ 651 | "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 652 | ] 653 | 654 | [[package]] 655 | name = "semver-parser" 656 | version = "0.7.0" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | 659 | [[package]] 660 | name = "serde" 661 | version = "1.0.82" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | 664 | [[package]] 665 | name = "serde_derive" 666 | version = "1.0.82" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | dependencies = [ 669 | "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 670 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 671 | "syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)", 672 | ] 673 | 674 | [[package]] 675 | name = "serde_json" 676 | version = "1.0.33" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | dependencies = [ 679 | "itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", 680 | "ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", 681 | "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", 682 | ] 683 | 684 | [[package]] 685 | name = "sha1" 686 | version = "0.6.0" 687 | source = "registry+https://github.com/rust-lang/crates.io-index" 688 | 689 | [[package]] 690 | name = "slab" 691 | version = "0.4.1" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | 694 | [[package]] 695 | name = "smallvec" 696 | version = "0.6.7" 697 | source = "registry+https://github.com/rust-lang/crates.io-index" 698 | dependencies = [ 699 | "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", 700 | ] 701 | 702 | [[package]] 703 | name = "stable_deref_trait" 704 | version = "1.1.1" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | 707 | [[package]] 708 | name = "state" 709 | version = "0.4.1" 710 | source = "registry+https://github.com/rust-lang/crates.io-index" 711 | 712 | [[package]] 713 | name = "syn" 714 | version = "0.15.23" 715 | source = "registry+https://github.com/rust-lang/crates.io-index" 716 | dependencies = [ 717 | "proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)", 718 | "quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", 719 | "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", 720 | ] 721 | 722 | [[package]] 723 | name = "time" 724 | version = "0.1.41" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | dependencies = [ 727 | "libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)", 728 | "redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)", 729 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 730 | ] 731 | 732 | [[package]] 733 | name = "tokio-codec" 734 | version = "0.1.1" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | dependencies = [ 737 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 738 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 739 | "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 740 | ] 741 | 742 | [[package]] 743 | name = "tokio-executor" 744 | version = "0.1.5" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | dependencies = [ 747 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 748 | ] 749 | 750 | [[package]] 751 | name = "tokio-io" 752 | version = "0.1.10" 753 | source = "registry+https://github.com/rust-lang/crates.io-index" 754 | dependencies = [ 755 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 756 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 757 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 758 | ] 759 | 760 | [[package]] 761 | name = "tokio-reactor" 762 | version = "0.1.7" 763 | source = "registry+https://github.com/rust-lang/crates.io-index" 764 | dependencies = [ 765 | "crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", 766 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 767 | "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 768 | "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", 769 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 770 | "num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)", 771 | "parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)", 772 | "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", 773 | "tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 774 | "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 775 | ] 776 | 777 | [[package]] 778 | name = "tokio-tcp" 779 | version = "0.1.2" 780 | source = "registry+https://github.com/rust-lang/crates.io-index" 781 | dependencies = [ 782 | "bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)", 783 | "futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)", 784 | "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", 785 | "mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)", 786 | "tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", 787 | "tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", 788 | ] 789 | 790 | [[package]] 791 | name = "toml" 792 | version = "0.4.10" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | dependencies = [ 795 | "serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)", 796 | ] 797 | 798 | [[package]] 799 | name = "traitobject" 800 | version = "0.1.0" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | 803 | [[package]] 804 | name = "typeable" 805 | version = "0.1.2" 806 | source = "registry+https://github.com/rust-lang/crates.io-index" 807 | 808 | [[package]] 809 | name = "unicase" 810 | version = "1.4.2" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | dependencies = [ 813 | "version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 814 | ] 815 | 816 | [[package]] 817 | name = "unicode-bidi" 818 | version = "0.3.4" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | dependencies = [ 821 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 822 | ] 823 | 824 | [[package]] 825 | name = "unicode-normalization" 826 | version = "0.1.7" 827 | source = "registry+https://github.com/rust-lang/crates.io-index" 828 | 829 | [[package]] 830 | name = "unicode-xid" 831 | version = "0.1.0" 832 | source = "registry+https://github.com/rust-lang/crates.io-index" 833 | 834 | [[package]] 835 | name = "unreachable" 836 | version = "1.0.0" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | dependencies = [ 839 | "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", 840 | ] 841 | 842 | [[package]] 843 | name = "untrusted" 844 | version = "0.6.2" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | 847 | [[package]] 848 | name = "url" 849 | version = "1.7.2" 850 | source = "registry+https://github.com/rust-lang/crates.io-index" 851 | dependencies = [ 852 | "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 853 | "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 854 | "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", 855 | ] 856 | 857 | [[package]] 858 | name = "version_check" 859 | version = "0.1.5" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | 862 | [[package]] 863 | name = "void" 864 | version = "1.0.2" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | 867 | [[package]] 868 | name = "walkdir" 869 | version = "2.2.7" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | dependencies = [ 872 | "same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 873 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 874 | "winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 875 | ] 876 | 877 | [[package]] 878 | name = "winapi" 879 | version = "0.2.8" 880 | source = "registry+https://github.com/rust-lang/crates.io-index" 881 | 882 | [[package]] 883 | name = "winapi" 884 | version = "0.3.6" 885 | source = "registry+https://github.com/rust-lang/crates.io-index" 886 | dependencies = [ 887 | "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 888 | "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 889 | ] 890 | 891 | [[package]] 892 | name = "winapi-build" 893 | version = "0.1.1" 894 | source = "registry+https://github.com/rust-lang/crates.io-index" 895 | 896 | [[package]] 897 | name = "winapi-i686-pc-windows-gnu" 898 | version = "0.4.0" 899 | source = "registry+https://github.com/rust-lang/crates.io-index" 900 | 901 | [[package]] 902 | name = "winapi-util" 903 | version = "0.1.1" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | dependencies = [ 906 | "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 907 | ] 908 | 909 | [[package]] 910 | name = "winapi-x86_64-pc-windows-gnu" 911 | version = "0.4.0" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | 914 | [[package]] 915 | name = "ws2_32-sys" 916 | version = "0.2.1" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | dependencies = [ 919 | "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", 920 | "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 921 | ] 922 | 923 | [[package]] 924 | name = "yansi" 925 | version = "0.4.0" 926 | source = "registry+https://github.com/rust-lang/crates.io-index" 927 | 928 | [[package]] 929 | name = "yansi" 930 | version = "0.5.0" 931 | source = "registry+https://github.com/rust-lang/crates.io-index" 932 | 933 | [metadata] 934 | "checksum ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5fc969a8ce2c9c0c4b0429bb8431544f6658283c8326ba5ff8c762b75369335" 935 | "checksum base64 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "621fc7ecb8008f86d7fb9b95356cd692ce9514b80a86d85b397f32a22da7b9e2" 936 | "checksum base64 0.9.3 (registry+https://github.com/rust-lang/crates.io-index)" = "489d6c0ed21b11d038c31b6ceccca973e65d73ba3bd8ecb9a2babf5546164643" 937 | "checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" 938 | "checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 939 | "checksum byteorder 1.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "94f88df23a25417badc922ab0f5716cc1330e87f71ddd9203b3a3ccd9cedf75d" 940 | "checksum bytes 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "40ade3d27603c2cb345eb0912aec461a6dec7e06a4ae48589904e808335c7afa" 941 | "checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" 942 | "checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 943 | "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" 944 | "checksum combine 3.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "db733c5d0f4f52e78d4417959cadf0eecc7476e7f9ece05677912571a4af34e2" 945 | "checksum cookie 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1465f8134efa296b4c19db34d909637cb2bf0f7aaf21299e23e18fa29ac557cf" 946 | "checksum crossbeam-utils 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "41ee4864f4797060e52044376f7d107429ce1fb43460021b126424b7180ee21a" 947 | "checksum devise 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "74e04ba2d03c5fa0d954c061fc8c9c288badadffc272ebb87679a89846de3ed3" 948 | "checksum devise_codegen 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "066ceb7928ca93a9bedc6d0e612a8a0424048b0ab1f75971b203d01420c055d7" 949 | "checksum devise_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cf41c59b22b5e3ec0ea55c7847e5f358d340f3a8d6d53a5cf4f1564967f96487" 950 | "checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" 951 | "checksum filetime 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "a2df5c1a8c4be27e7707789dc42ae65976e60b394afd293d1419ab915833e646" 952 | "checksum fsevent 0.2.17 (registry+https://github.com/rust-lang/crates.io-index)" = "c4bbbf71584aeed076100b5665ac14e3d85eeb31fdbb45fbd41ef9a682b5ec05" 953 | "checksum fsevent-sys 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1a772d36c338d07a032d5375a36f15f9a7043bf0cb8ce7cee658e037c6032874" 954 | "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" 955 | "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" 956 | "checksum futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "49e7653e374fe0d0c12de4250f0bdb60680b8c80eed558c5c7538eec9c89e21b" 957 | "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83" 958 | "checksum hyper 0.10.15 (registry+https://github.com/rust-lang/crates.io-index)" = "df0caae6b71d266b91b4a83111a61d2b94ed2e2bea024c532b933dcff867e58c" 959 | "checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" 960 | "checksum indexmap 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d" 961 | "checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" 962 | "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" 963 | "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 964 | "checksum isatty 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e31a8281fc93ec9693494da65fbf28c0c2aa60a2eaec25dc58e2f31952e95edc" 965 | "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" 966 | "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 967 | "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 968 | "checksum lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a374c89b9db55895453a74c1e38861d9deec0b01b405a82516e9d5de4820dea1" 969 | "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" 970 | "checksum libc 0.2.45 (registry+https://github.com/rust-lang/crates.io-index)" = "2d2857ec59fadc0773853c664d2d18e7198e83883e7060b63c924cb077bd5c74" 971 | "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" 972 | "checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" 973 | "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" 974 | "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 975 | "checksum memchr 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "db4c41318937f6e76648f42826b1d9ade5c09cafb5aef7e351240a70f39206e9" 976 | "checksum mime 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "ba626b8a6de5da682e1caa06bdb42a335aee5a84db8e5046a3e8ab17ba0a3ae0" 977 | "checksum mio 0.6.16 (registry+https://github.com/rust-lang/crates.io-index)" = "71646331f2619b1026cc302f87a2b8b648d5c6dd6937846a16cc8ce0f347f432" 978 | "checksum mio-extras 2.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "46e73a04c2fa6250b8d802134d56d554a9ec2922bf977777c805ea5def61ce40" 979 | "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" 980 | "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" 981 | "checksum notify 4.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "873ecfd8c174964ae30f401329d140142312c8e5590719cf1199d5f1717d8078" 982 | "checksum num_cpus 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5a69d464bdc213aaaff628444e99578ede64e9c854025aa43b9796530afa9238" 983 | "checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13" 984 | "checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" 985 | "checksum parking_lot_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" 986 | "checksum pear 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c26d2b92e47063ffce70d3e3b1bd097af121a9e0db07ca38a6cc1cf0cc85ff25" 987 | "checksum pear_codegen 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "336db4a192cc7f54efeb0c4e11a9245394824cc3bcbd37ba3ff51240c35d7a6e" 988 | "checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 989 | "checksum proc-macro2 0.4.24 (registry+https://github.com/rust-lang/crates.io-index)" = "77619697826f31a02ae974457af0b29b723e5619e113e9397b8b82c6bd253f09" 990 | "checksum quote 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "53fa22a1994bd0f9372d7a816207d8a2677ad0325b073f5c5332760f0fb62b5c" 991 | "checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" 992 | "checksum rand_core 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1961a422c4d189dfb50ffa9320bf1f2a9bd54ecb92792fb9477f99a1045f3372" 993 | "checksum rand_core 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0905b6b7079ec73b314d4c748701f6931eb79fd97c668caa3f1899b22b32c6db" 994 | "checksum redis 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f0c747d743d48233f9bc3ed3fb00cb84c1d98d8c7f54ed2d4cca9adf461a7ef3" 995 | "checksum redox_syscall 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "a84bcd297b87a545980a2d25a0beb72a1f490c31f0a9fde52fca35bfbb1ceb70" 996 | "checksum ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)" = "2c4db68a2e35f3497146b7e4563df7d4773a2433230c5e4b448328e31740458a" 997 | "checksum rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "242154377a85c2a9e036fc31ffc8c200b9e1f22a196e47baa3b57716606ca89d" 998 | "checksum rocket_codegen 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7d907d6d458c859651c1cf4c8fa99b77685082bde0561db6a4600b365058f710" 999 | "checksum rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f73e161dad5730435f51c815a5c6831d2e57b6b4299b1bf609d31b09aa9a2fa7" 1000 | "checksum rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba9d4f2ce5bba6e1b6d3100493bbad63879e99bbf6b4365d61e6f781daab324d" 1001 | "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1002 | "checksum ryu 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "eb9e9b8cde282a9fe6a42dd4681319bfb63f121b8a8ee9439c6f4107e58a46f7" 1003 | "checksum safemem 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8dca453248a96cb0749e36ccdfe2b0b4e54a61bfef89fb97ec621eb8e0a93dd9" 1004 | "checksum same-file 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8f20c4be53a8a1ff4c1f1b2bd14570d2f634628709752f0702ecdd2b3f9a5267" 1005 | "checksum scopeguard 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" 1006 | "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1007 | "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1008 | "checksum serde 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "6fa52f19aee12441d5ad11c9a00459122bd8f98707cadf9778c540674f1935b6" 1009 | "checksum serde_derive 1.0.82 (registry+https://github.com/rust-lang/crates.io-index)" = "96a7f9496ac65a2db5929afa087b54f8fc5008dcfbe48a8874ed20049b0d6154" 1010 | "checksum serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "c37ccd6be3ed1fdf419ee848f7c758eb31b054d7cd3ae3600e3bae0adf569811" 1011 | "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" 1012 | "checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" 1013 | "checksum smallvec 0.6.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b73ea3738b47563803ef814925e69be00799a8c07420be8b996f8e98fb2336db" 1014 | "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" 1015 | "checksum state 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028" 1016 | "checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc" 1017 | "checksum time 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)" = "847da467bf0db05882a9e2375934a8a55cffdc9db0d128af1518200260ba1f6c" 1018 | "checksum tokio-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c501eceaf96f0e1793cf26beb63da3d11c738c4a943fdf3746d81d64684c39f" 1019 | "checksum tokio-executor 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c117b6cf86bb730aab4834f10df96e4dd586eff2c3c27d3781348da49e255bde" 1020 | "checksum tokio-io 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7392fe0a70d5ce0c882c4778116c519bd5dbaa8a7c3ae3d04578b3afafdcda21" 1021 | "checksum tokio-reactor 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "502b625acb4ee13cbb3b90b8ca80e0addd263ddacf6931666ef751e610b07fb5" 1022 | "checksum tokio-tcp 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7ad235e9dadd126b2d47f6736f65aa1fdcd6420e66ca63f44177bc78df89f912" 1023 | "checksum toml 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" 1024 | "checksum traitobject 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079" 1025 | "checksum typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1410f6f91f21d1612654e7cc69193b0334f909dcf2c790c4826254fbb86f8887" 1026 | "checksum unicase 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7f4765f83163b74f957c797ad9253caf97f103fb064d3999aea9568d09fc8a33" 1027 | "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1028 | "checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" 1029 | "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" 1030 | "checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" 1031 | "checksum untrusted 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "55cd1f4b4e96b46aeb8d4855db4a7a9bd96eeeb5c6a1ab54593328761642ce2f" 1032 | "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" 1033 | "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" 1034 | "checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" 1035 | "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1" 1036 | "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" 1037 | "checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 1038 | "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" 1039 | "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1040 | "checksum winapi-util 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "afc5508759c5bf4285e61feb862b6083c8480aec864fa17a81fdec6f69b461ab" 1041 | "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1042 | "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" 1043 | "checksum yansi 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d60c3b48c9cdec42fb06b3b84b5b087405e1fa1c644a1af3930e4dfafe93de48" 1044 | "checksum yansi 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9fc79f4a1e39857fc00c3f662cbf2651c771f00e9c15fe2abc341806bd46bd71" 1045 | -------------------------------------------------------------------------------- /rocket/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dev" 3 | version = "0.1.0" 4 | authors = ["Suyash "] 5 | edition = "2018" 6 | 7 | [dependencies] 8 | rocket = "0.4.0" 9 | redis = "0.9.1" 10 | serde = "1.0.82" 11 | serde_json = "1.0.33" 12 | serde_derive = "1.0.82" 13 | 14 | [dependencies.rocket_contrib] 15 | version = "0.4.0" 16 | default-features = false 17 | features = ["json"] 18 | -------------------------------------------------------------------------------- /rocket/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM liuchong/rustup:nightly 2 | 3 | WORKDIR /usr/src/dev 4 | 5 | ENV ROCKET_ADDRESS=0.0.0.0 6 | ENV ROCKET_PORT=8000 7 | ENV API_KEY=4dLAEkep2UxTYXms2ZwGxkgWgwcb7mSd 8 | 9 | COPY src src 10 | COPY Cargo.lock Cargo.lock 11 | COPY Cargo.toml Cargo.toml 12 | 13 | RUN cargo build --release 14 | 15 | CMD cargo run --release 16 | -------------------------------------------------------------------------------- /rocket/README.md: -------------------------------------------------------------------------------- 1 | ``` 2 | docker-compose up 3 | ``` 4 | 5 | will start a local server on 8000, to edit env variables, edit the Dockerfile. 6 | -------------------------------------------------------------------------------- /rocket/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | 3 | services: 4 | app: 5 | image: suy/flowy-server-dev 6 | build: . 7 | depends_on: 8 | - redis 9 | ports: 10 | - 8000:8000 11 | redis: 12 | image: redis:alpine 13 | -------------------------------------------------------------------------------- /rocket/src/main.rs: -------------------------------------------------------------------------------- 1 | #![warn(missing_docs)] 2 | #![feature(proc_macro_hygiene, decl_macro)] 3 | 4 | extern crate rocket; 5 | extern crate redis; 6 | extern crate rocket_contrib; 7 | extern crate serde_derive; 8 | 9 | use std::convert::From; 10 | use std::io::Cursor; 11 | 12 | use redis::{Client, Commands, RedisError}; 13 | 14 | use rocket::{Outcome, Request, Response, Rocket, State, routes, get, post, delete}; 15 | use rocket::fairing::AdHoc; 16 | use rocket::http::{Header, ContentType, Method, Status}; 17 | use rocket::request::{self, FromRequest}; 18 | 19 | use rocket_contrib::json; 20 | use rocket_contrib::json::{Json, JsonValue}; 21 | 22 | use serde_derive::{Serialize, Deserialize}; 23 | 24 | 25 | #[allow(missing_docs)] 26 | fn main() { 27 | let client = Client::open("redis://redis:6379").unwrap(); 28 | rocket(client).launch(); 29 | } 30 | 31 | /// creates the main Rocket object 32 | fn rocket(client: Client) -> Rocket { 33 | rocket::ignite() 34 | .mount("/", routes![set, get, del]) 35 | .attach(AdHoc::on_response("cors", |request: &Request, response: &mut Response| { 36 | // https://github.com/SergioBenitez/Rocket/issues/25#issuecomment-313895086 37 | 38 | if request.method() == Method::Options || response.content_type() == Some(ContentType::JSON) { 39 | response.set_header(Header::new("Access-Control-Allow-Origin", "*")); 40 | response.set_header(Header::new("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE")); 41 | response.set_header(Header::new("Access-Control-Allow-Headers", "Content-Type, Accept, X-API-Key")); 42 | response.set_header(Header::new("Access-Control-Allow-Credentials", "true")); 43 | } 44 | 45 | if request.method() == Method::Options { 46 | response.set_header(ContentType::Plain); 47 | response.set_sized_body(Cursor::new("")); 48 | response.set_status(Status::Ok); 49 | } 50 | })) 51 | .manage(client) 52 | } 53 | 54 | /// A single task to be stored. 55 | #[allow(missing_docs)] 56 | #[derive(Serialize, Deserialize)] 57 | struct Task { 58 | id: String, 59 | text: String, 60 | checked: bool, 61 | children: Vec 62 | } 63 | 64 | /// set will create or update a new task 65 | #[post("/set", format = "json", data = "")] 66 | fn set(task: Json, _key: ApiKey, client: State) -> Result { 67 | let conn = client.get_connection()?; 68 | 69 | conn.hset(task.0.id.clone(), "text", task.0.text)?; 70 | conn.hset(task.0.id.clone(), "checked", task.0.checked)?; 71 | 72 | let children_id = task.0.id.clone() + "_children"; 73 | conn.del(children_id.clone())?; 74 | for child in task.0.children { 75 | conn.lpush(children_id.clone(), child)?; 76 | } 77 | 78 | Ok(json!({ 79 | "ok": true, 80 | })) 81 | } 82 | 83 | /// get will get a task if it exists, or it will 500 out 84 | #[get("/", format = "json")] 85 | fn get(id: String, _key: ApiKey, client: State) -> Result, RedisError> { 86 | let conn = client.get_connection()?; 87 | 88 | let checked: String = conn.hget(id.clone(), "checked")?; 89 | 90 | Ok(Json(Task{ 91 | id: id.clone(), 92 | text: conn.hget(id.clone(), "text")?, 93 | checked: checked == "true", 94 | children: conn.lrange(id + "_children", 0, -1)?, 95 | })) 96 | } 97 | 98 | /// delete will remove a task 99 | #[delete("/", format = "json")] 100 | fn del(id: String, _key: ApiKey, client: State) -> Result { 101 | let conn = client.get_connection()?; 102 | conn.del(id)?; 103 | 104 | Ok(json!({ 105 | "ok": true, 106 | })) 107 | } 108 | 109 | /// API_KEY from the environment, stored at compile time. 110 | const API_KEY: &'static str = env!("API_KEY"); 111 | 112 | /// https://api.rocket.rs/rocket/request/trait.FromRequest.html#example-1 113 | struct ApiKey(String); 114 | 115 | impl<'a, 'r> FromRequest<'a, 'r> for ApiKey { 116 | type Error = (); 117 | 118 | fn from_request(request: &'a Request<'r>) -> request::Outcome { 119 | let keys: Vec<&str> = request.headers().get("X-API-Key").collect(); 120 | if keys.len() != 1 { 121 | return Outcome::Failure((Status::BadRequest, ())); 122 | } 123 | 124 | let key = keys[0]; 125 | if key != API_KEY { 126 | Outcome::Forward(()) 127 | } else { 128 | Outcome::Success(ApiKey(key.to_owned())) 129 | } 130 | } 131 | } 132 | 133 | #[cfg(test)] 134 | mod test { 135 | extern crate serde_json; 136 | 137 | use rocket::local::Client; 138 | use rocket::http::{ContentType, Status, Header}; 139 | 140 | use super::{rocket, Task, API_KEY}; 141 | 142 | #[test] 143 | fn works() { 144 | let client = redis::Client::open("redis://127.0.0.1:6379").unwrap(); 145 | let client = Client::new(rocket(client)).unwrap(); 146 | 147 | let api_key_header = Header::new("X-API-Key", API_KEY); 148 | 149 | let task = Task{ 150 | id: "test".to_owned(), 151 | text: "testtest".to_owned(), 152 | checked: true, 153 | children: vec![], 154 | }; 155 | 156 | let res = client 157 | .post("/set") 158 | .header(ContentType::JSON) 159 | .header(api_key_header.clone()) 160 | .body(serde_json::to_string(&task).unwrap()) 161 | .dispatch(); 162 | 163 | assert_eq!(res.status(), Status::Ok); 164 | 165 | let mut res = client 166 | .get(format!("/{}", task.id)) 167 | .header(ContentType::JSON) 168 | .header(api_key_header.clone()) 169 | .dispatch(); 170 | 171 | assert_eq!(res.status(), Status::Ok); 172 | 173 | let s = res.body().unwrap().into_string().unwrap(); 174 | let target: Task = serde_json::from_str(&s).unwrap(); 175 | 176 | assert_eq!(target.id, task.id); 177 | assert_eq!(target.text, task.text); 178 | assert_eq!(target.checked, task.checked); 179 | assert_eq!(target.children, task.children); 180 | 181 | let res = client 182 | .delete(format!("/{}", task.id)) 183 | .header(ContentType::JSON) 184 | .header(api_key_header) 185 | .dispatch(); 186 | 187 | assert_eq!(res.status(), Status::Ok); 188 | } 189 | } 190 | --------------------------------------------------------------------------------