Skip to content

Instantly share code, notes, and snippets.

@vbatts
Created October 9, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vbatts/5531b8c38039ecc2eef30ce5a17f25ad to your computer and use it in GitHub Desktop.
Save vbatts/5531b8c38039ecc2eef30ce5a17f25ad to your computer and use it in GitHub Desktop.
grafeas client trial
package main
import (
"log"
"github.com/davecgh/go-spew/spew"
grf "github.com/grafeas/client-go"
)
func main() {
api := grf.NewGrafeasApiWithBasePath("http://0.0.0.0:8080")
spew.Dump(api)
note := grf.Note{
Name: "note01",
ShortDescription: "this is just a test",
}
spew.Dump(note)
retNote, resp, err := api.CreateNote("project01", note.Name, note) //projectsId string, noteId string, note Note) (*Note, *APIResponse, error)
if err != nil {
spew.Dump(resp)
log.Fatal(err)
}
// for verbose review
spew.Dump(resp)
spew.Dump(retNote)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment