X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/3babb86cbbb3275d55b1cb928248d0cff436fb3f..e1fd558686c78d6edfd460b7531ec9b559299889:/doc/sdk/go/index.html.textile.liquid diff --git a/doc/sdk/go/index.html.textile.liquid b/doc/sdk/go/index.html.textile.liquid index e4653b2c13..81f4f9914b 100644 --- a/doc/sdk/go/index.html.textile.liquid +++ b/doc/sdk/go/index.html.textile.liquid @@ -2,70 +2,17 @@ layout: default navsection: sdk navmenu: Go -title: "Go SDK" - +title: "Installation" ... The Go ("Golang":http://golang.org) SDK provides a generic set of wrappers so you can make API calls easily. -h3. Installation - -You don't need to install anything. Just import the client like this. The go tools will fetch the relevant code and dependencies for you. - - -
import (
-	"git.curoverse.com/arvados.git/sdk/go/keepclient"
-	"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
-)
-
-
- -If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados - -h3. Examples - -Import the module. (We import the log module here too, so we can use it in the subsequent examples.) - - -
import (
-	"git.curoverse.com/arvados.git/sdk/go/keepclient"
-	"git.curoverse.com/arvados.git/sdk/go/arvadosclient"
-	"log"
-)
-
-
+See "Arvados GoDoc":https://godoc.org/git.curoverse.com/arvados.git/sdk/go for detailed documentation. -Set up an API client user agent: - - -
	arv, err := arvadosclient.MakeArvadosClient()
-	if err != nil {
-		log.Fatalf("Error setting up arvados client %s", err.Error())
-	}
-
-
- -Get the User object for the current user: - - -
	type user struct {
-		Uuid       string   `json:"uuid"`
-		FullName   string   `json:"full_name"`
-	}
-
-	var u user
-	err := arv.Call("GET", "users", "", "current", nil, &u)
-
-	if err != nil {
-		return err
-	}
-
-	log.Printf("Logged in as %s (uuid %s)", user.Uuid, user.FullName)
-
-
+h3. Installation -Print all returned fields for collections: +Use @go get git.curoverse.com/arvados.git/sdk/go/arvadosclient@. The go tools will fetch the relevant code and dependencies for you. -{% code 'example_sdk_go' as go %} +{% code 'example_sdk_go_imports' as go %} -A few more usage examples can be found in the "services/keepproxy":https://arvados.org/projects/arvados/repository/revisions/master/show/services/keepproxy and "sdk/go/keepclient":https://arvados.org/projects/arvados/repository/revisions/master/show/sdk/go/keepclient directories in the arvados source tree. +If you need pre-release client code, you can use the latest version from the repo by following "these instructions.":https://dev.arvados.org/projects/arvados/wiki/Go#Using-Go-with-Arvados