| 1 | gosign |
| 2 | ====== |
| 3 | |
| 4 | Go HTTP signing library for Joyent's Triton and Manta. |
| 5 | |
| 6 | ## Installation |
| 7 | |
| 8 | Use `go-get` to install gosign |
| 9 | ``` |
| 10 | go get github.com/joyent/gosign |
| 11 | ``` |
| 12 | |
| 13 | ## Documentation |
| 14 | |
| 15 | Documentation can be found on godoc. |
| 16 | |
| 17 | - [github.com/joyent/gosign](http://godoc.org/github.com/joyent/gosign) |
| 18 | - [github.com/joyent/gosign/auth](http://godoc.org/github.com/joyent/gosign/auth) |
| 19 | |
| 20 | |
| 21 | ## Contributing |
| 22 | |
| 23 | Report bugs and request features using [GitHub Issues](https://github.com/joyent/gosign/issues), or contribute code via a [GitHub Pull Request](https://github.com/joyent/gosign/pulls). Changes will be code reviewed before merging. In the near future, automated tests will be run, but in the meantime please `go fmt`, `go lint`, and test all contributions. |
| 24 | |
| 25 | |
| 26 | ## Developing |
| 27 | |
| 28 | This library assumes a Go development environment setup based on [How to Write Go Code](https://golang.org/doc/code.html). Your GOPATH environment variable should be pointed at your workspace directory. |
| 29 | |
| 30 | You can now use `go get github.com/joyent/gosign` to install the repository to the correct location, but if you are intending on contributing back a change you may want to consider cloning the repository via git yourself. This way you can have a single source tree for all Joyent Go projects with each repo having two remotes -- your own fork on GitHub and the upstream origin. |
| 31 | |
| 32 | For example if your GOPATH is `~/src/joyent/go` and you're working on multiple repos then that directory tree might look like: |
| 33 | |
| 34 | ``` |
| 35 | ~/src/joyent/go/ |
| 36 | |_ pkg/ |
| 37 | |_ src/ |
| 38 | |_ github.com |
| 39 | |_ joyent |
| 40 | |_ gocommon |
| 41 | |_ gomanta |
| 42 | |_ gosdc |
| 43 | |_ gosign |
| 44 | ``` |
| 45 | |
| 46 | ### Recommended Setup |
| 47 | |
| 48 | ``` |
| 49 | $ mkdir -p ${GOPATH}/src/github.com/joyent |
| 50 | $ cd ${GOPATH}/src/github.com/joyent |
| 51 | $ git clone [email protected]:<yourname>/gosign.git |
| 52 | $ cd gosign |
| 53 | $ git remote add upstream [email protected]:joyent/gosign.git |
| 54 | $ git remote -v |
| 55 | origin [email protected]:<yourname>/gosign.git (fetch) |
| 56 | origin [email protected]:<yourname>/gosign.git (push) |
| 57 | upstream [email protected]:joyent/gosign.git (fetch) |
| 58 | upstream [email protected]:joyent/gosign.git (push) |
| 59 | ``` |
| 60 | |
| 61 | ### Run Tests |
| 62 | |
| 63 | ``` |
| 64 | cd ${GOPATH}/src/github.com/joyent/gosign |
| 65 | go test ./... |
| 66 | ``` |
| 67 | |
| 68 | ### Build the Library |
| 69 | |
| 70 | ``` |
| 71 | cd ${GOPATH}/src/github.com/joyent/gosign |
| 72 | go build ./... |
| 73 | ``` |