Browse Source

update README & add vendoring

Matthieu Jacquot 4 years ago
parent
commit
f9573511a2
4 changed files with 237 additions and 46 deletions
  1. 2 0
      .gitignore
  2. 112 0
      Gopkg.lock
  3. 62 0
      Gopkg.toml
  4. 61 46
      README.md

+ 2 - 0
.gitignore

@@ -1,3 +1,5 @@
 _bench
 coverage.out
 gold.conf
+.idea
+vendor

+ 112 - 0
Gopkg.lock

@@ -0,0 +1,112 @@
+# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
+
+
+[[projects]]
+  digest = "1:0f98f59e9a2f4070d66f0c9c39561f68fcd1dc837b22a852d28d0003aebd1b1e"
+  name = "github.com/boltdb/bolt"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8"
+  version = "v1.3.1"
+
+[[projects]]
+  digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
+  name = "github.com/davecgh/go-spew"
+  packages = ["spew"]
+  pruneopts = "UT"
+  revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
+  version = "v1.1.1"
+
+[[projects]]
+  digest = "1:2b7b174ae68705866555b73fd848de0749b93b1f99e3295e27f89bebe8702203"
+  name = "github.com/elazarl/goproxy"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "947c36da3153ff334e74d9d980de341d25f358ba"
+  version = "v1.1"
+
+[[projects]]
+  digest = "1:e72d1ebb8d395cf9f346fd9cbc652e5ae222dd85e0ac842dc57f175abed6d195"
+  name = "github.com/gorilla/securecookie"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "e59506cc896acb7f7bf732d4fdf5e25f7ccd8983"
+  version = "v1.1.1"
+
+[[projects]]
+  branch = "master"
+  digest = "1:b7d73b96db1c3cd12fcf58c80c4226784cca158b96b8e7d2db0795c3dcfb4c88"
+  name = "github.com/linkeddata/gojsonld"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "4f5db6791326b8962ede4edbba693edcf20fd1ad"
+
+[[projects]]
+  digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
+  name = "github.com/pmezard/go-difflib"
+  packages = ["difflib"]
+  pruneopts = "UT"
+  revision = "792786c7400a136282c1664665ae0a8db921c6c2"
+  version = "v1.0.0"
+
+[[projects]]
+  branch = "master"
+  digest = "1:cb671a4d71ede584c1584051326929ba4fb0d0653650c26a24df04e4b6e7060c"
+  name = "github.com/presbrey/goraptor"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "d14aff371f65d19049be51de3b604f22a2ca853e"
+
+[[projects]]
+  digest = "1:1090c43442963716e8f440ca37bd9e7804bc656e669662ab30995fad2f8dbd33"
+  name = "github.com/rakyll/magicmime"
+  packages = ["."]
+  pruneopts = "UT"
+  revision = "9b99294d6b2216897632b9734769d8ce4568681e"
+  version = "v0.1.0"
+
+[[projects]]
+  digest = "1:18752d0b95816a1b777505a97f71c7467a8445b8ffb55631a7bf779f6ba4fa83"
+  name = "github.com/stretchr/testify"
+  packages = ["assert"]
+  pruneopts = "UT"
+  revision = "f35b8ab0b5a2cef36673838d662e249dd9c94686"
+  version = "v1.2.2"
+
+[[projects]]
+  branch = "master"
+  digest = "1:da939eb838c6b235621e8551297b050c2e32f1b5400ca6bab0ced87c7827ed81"
+  name = "golang.org/x/net"
+  packages = [
+    "context",
+    "webdav",
+    "webdav/internal/xml",
+    "websocket",
+  ]
+  pruneopts = "UT"
+  revision = "4dfa2610cdf3b287375bbba5b8f2a14d3b01d8de"
+
+[[projects]]
+  branch = "master"
+  digest = "1:e2ced6fdf654069e8713c96012275fbd245381673d53e8c8ace640b28441a28b"
+  name = "golang.org/x/sys"
+  packages = ["unix"]
+  pruneopts = "UT"
+  revision = "e4b3c5e9061176387e7cea65e4dc5853801f3fb7"
+
+[solve-meta]
+  analyzer-name = "dep"
+  analyzer-version = 1
+  input-imports = [
+    "github.com/boltdb/bolt",
+    "github.com/elazarl/goproxy",
+    "github.com/gorilla/securecookie",
+    "github.com/linkeddata/gojsonld",
+    "github.com/presbrey/goraptor",
+    "github.com/rakyll/magicmime",
+    "github.com/stretchr/testify/assert",
+    "golang.org/x/net/webdav",
+    "golang.org/x/net/websocket",
+  ]
+  solver-name = "gps-cdcl"
+  solver-version = 1

+ 62 - 0
Gopkg.toml

@@ -0,0 +1,62 @@
+# Gopkg.toml example
+#
+# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
+# for detailed Gopkg.toml documentation.
+#
+# required = ["github.com/user/thing/cmd/thing"]
+# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
+#
+# [[constraint]]
+#   name = "github.com/user/project"
+#   version = "1.0.0"
+#
+# [[constraint]]
+#   name = "github.com/user/project2"
+#   branch = "dev"
+#   source = "github.com/myfork/project2"
+#
+# [[override]]
+#   name = "github.com/x/y"
+#   version = "2.4.0"
+#
+# [prune]
+#   non-go = false
+#   go-tests = true
+#   unused-packages = true
+
+
+[[constraint]]
+  name = "github.com/boltdb/bolt"
+  version = "1.3.1"
+
+[[constraint]]
+  name = "github.com/elazarl/goproxy"
+  version = "1.1.0"
+
+[[constraint]]
+  name = "github.com/gorilla/securecookie"
+  version = "1.1.1"
+
+[[constraint]]
+  branch = "master"
+  name = "github.com/linkeddata/gojsonld"
+
+[[constraint]]
+  branch = "master"
+  name = "github.com/presbrey/goraptor"
+
+[[constraint]]
+  name = "github.com/rakyll/magicmime"
+  version = "0.1.0"
+
+[[constraint]]
+  name = "github.com/stretchr/testify"
+  version = "1.2.2"
+
+[[constraint]]
+  branch = "master"
+  name = "golang.org/x/net"
+
+[prune]
+  go-tests = true
+  unused-packages = true

+ 61 - 46
README.md

@@ -15,54 +15,69 @@ Written in Go, based on
 
 ### From docker repository:
 
-    sudo docker pull linkeddata/gold
-
-    sudo docker run -p ip:port:443 linkeddata/gold
-
+```
+sudo docker pull linkeddata/gold
+sudo docker run -p ip:port:443 linkeddata/gold
+```
 Replace `ip` and `port` with your host computer's IP address and port number.
 
 To check the status of the container, type:
 
-    sudo docker ps
+```
+sudo docker ps
+```
 
 `IMPORTANT`: if you want to mount a host directory into the container, you can use the -v parameter:
 
-    sudo docker run -p ip:port:443 -v /home/user/data:/data linkeddata/gold
+```
+sudo docker run -p ip:port:443 -v /home/user/data:/data linkeddata/gold
+```
 
 This will mount the host directory, `/home/user/data`, into the container as the `/data/` directory. Doing this will allow you to reuse the data directory without worrying about persistence inside the container.
 
 ### From Github:
 
-1. Setup Go + dependencies:
+1. Setup Go:
 
-  * **Mac OS X**: `brew install go raptor libmagic`
-  * **Ubuntu**: `sudo apt-get install golang-go libraptor2-dev libmagic-dev`
+    * **Mac OS X**: `brew install go`
+    * **Ubuntu**: `sudo apt-get install golang-go`
+    * **Fedora**: `sudo dnf install golang`
 
-2. Set the `GOPATH` variable (required by Go):
+1. Set the `GOPATH` variable (required by Go):
 
-  ```bash
-  mkdir ~/go
-  export GOPATH=~/go
-  ```
+      ```bash
+      mkdir ~/go
+      export GOPATH=~/go
+      ```
+    
+      (Optionally consider adding `export GOPATH=~/go` to your `.bashrc` or profile).
 
-  (Optionally consider adding `export GOPATH=~/go` to your `.bashrc` or profile).
+1. Check that you have the required Go version (**Go 1.4 or later**):
 
-3. Check that you have the required Go version (**Go 1.4 or later**):
+      ```
+      go version
+      ```
+    
+      If you don't, please [install](http://golang.org/doc/install) a more recent
+      version.
 
-  ```
-  go version
-  ```
-
-  If you don't, please [install](http://golang.org/doc/install) a more recent
-  version.
-
-4. Use the `go get` command to install the server and all the dependencies:
+1. Use the `go get` command to install the server and all the dependencies:
 
+    ```
     go get github.com/linkeddata/gold/server
+    ```
+    
+1. Install dependencies:
+    * **Mac OS X**: `brew install raptor libmagic`
+    * **Ubuntu**: `sudo apt-get install libraptor2-dev libmagic-dev`
+    * **Fedora**: `sudo dnf install raptor2-devel file-devel`
+  
 
-5. (Optional) Install extra dependencies used by the tests:
+1. (Optional) Install extra dependencies used by the tests:
 
+    ```
     go get github.com/stretchr/testify/assert
+    ```
 
 ## Running the Server
 
@@ -80,28 +95,28 @@ Something like: `-root=/var/www/data/` or `-root=~/data/`.
 
 1. If you installed it from package via `go get`, you can run it by:
 
-  ```
-  $GOPATH/bin/server -http=":8080" -https=":8443" -debug
-  ```
-
-2. When developing locally, you can `cd` into the repo cloned by `go get`:
-
-  ```
-  cd $GOPATH/src/github.com/linkeddata/gold
-  ```
-
-  And launch the server by:
-
-  ```
-  go run server/*.go -http=":8080" -https=":8443" -debug -boltPath=/tmp/bold.db
-  ```
-
-  Alternatively, you can compile and run it from the source dir in one command:
-
-  ```
-  go run $GOPATH/src/github.com/linkeddata/gold/server/*.go -http=":8080" -https=":8443" \
+    ```
+    $GOPATH/bin/server -http=":8080" -https=":8443" -debug
+    ```
+
+1. When developing locally, you can `cd` into the repo cloned by `go get`:
+    
+    ```
+    cd $GOPATH/src/github.com/linkeddata/gold
+    ```
+    
+    And launch the server by:
+    
+    ```
+    go run server/*.go -http=":8080" -https=":8443" -debug -boltPath=/tmp/bold.db
+    ```
+    
+    Alternatively, you can compile and run it from the source dir in one command:
+    
+    ```
+    go run $GOPATH/src/github.com/linkeddata/gold/server/*.go -http=":8080" -https=":8443" \
     -root=/home/user/data/ -debug -boltPath=/tmp/bold.db
-  ```
+    ```
 
 ## Configuration