8 Copyright (C) The Arvados Authors. All rights reserved.
10 SPDX-License-Identifier: CC-BY-SA-3.0
13 See "Arvados GoDoc":https://godoc.org/git.arvados.org/arvados.git/sdk/go for detailed documentation.
15 In these examples, the site prefix is @aaaaa@.
21 "git.arvados.org/arvados.git/sdk/go/arvados"
22 "git.arvados.org/arvados.git/sdk/go/arvadosclient"
26 arv, err := arvadosclient.MakeArvadosClient()
28 log.Fatalf("Error setting up arvados client %s", err.Error())
36 var collection arvados.Collection
37 err := api.Create("collections", Dict{"collection": Dict{"name": "create example"}}, &collection)
43 var collection arvados.Collection
44 err := api.Delete("collections", "aaaaa-4zz18-ccccccccccccccc", Dict{}, &collection)
50 var collection arvados.Collection
51 err := api.Get("collections", "aaaaa-4zz18-ccccccccccccccc", Dict{}, &collection)
57 var collection arvados.Collection
58 err := api.List("collections", Dict{}, &collection)
64 var collection arvados.Collection
65 err := api.Update("collections", "aaaaa-4zz18-ccccccccccccccc", Dict{"collection": Dict{"name": "update example"}}, &collection)
72 err := api.Get("users", "current", Dict{}, &user)
77 You can save this source as a .go file and run it:
79 <notextile>{% code example_sdk_go as go %}</notextile>
81 A few more usage examples can be found in the "services/keepproxy":https://dev.arvados.org/projects/arvados/repository/revisions/main/show/services/keepproxy and "sdk/go/keepclient":https://dev.arvados.org/projects/arvados/repository/revisions/main/show/sdk/go/keepclient directories in the arvados source tree.