Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nextrevision/go-runscope
Go Library for interacting with the Runscope API
https://github.com/nextrevision/go-runscope
golang runscope runscope-api
Last synced: 19 days ago
JSON representation
Go Library for interacting with the Runscope API
- Host: GitHub
- URL: https://github.com/nextrevision/go-runscope
- Owner: nextrevision
- Created: 2016-04-22T19:04:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-08T16:23:33.000Z (over 7 years ago)
- Last Synced: 2023-08-09T14:38:32.816Z (about 1 year ago)
- Topics: golang, runscope, runscope-api
- Language: Go
- Size: 60.5 KB
- Stars: 2
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-runscope
[![Circle CI](https://circleci.com/gh/nextrevision/go-runscope.svg?style=svg)](https://circleci.com/gh/nextrevision/go-runscope)
[![GoDoc](https://godoc.org/github.com/nextrevision/go-runscope?status.svg)](https://godoc.org/github.com/nextrevision/go-runscope)Go Library for interacting with the Runscope API
## Usage
To use library in your project, first create a new client:
```
package mainimport "github.com/nextrevision/go-runscope"
func main() {
token := os.Getenv("RUNSCOPE_TOKEN")
client := runscope.NewClient(runscope.Options{
Token: token,
})
}
```Once you have a client, you can start interacting with the Runscope API. For example, to list all buckets:
```
buckets, err := client.ListBuckets()
if err != nil {
...
}for _, bucket := range buckets {
println(bucket.Name)
}
```To list all tests in a bucket:
```
tests, _ := client.ListTests(bucket.Key, ListTestOptions{})
for _, test := range tests {
println(test.Name)
}
```For a comprehensive list of all the methods available, please referece [https://godoc.org/github.com/nextrevision/go-runscope](https://godoc.org/github.com/nextrevision/go-runscope).
## Developing
Dependencies are managed with [glide](https://github.com/Masterminds/glide) using the new vendoring support in Go. To add a new dependency, simply type:
```
glide get
```To test, run:
```
go vet
go test -v
```