[ARVADOS] updated: a4c0045623e096ce5950f137e014e0a9bf9fc5d7
Git user
git at public.curoverse.com
Wed May 25 14:43:10 EDT 2016
Summary of changes:
sdk/go/arvados/client.go | 8 ++++++++
sdk/go/arvados/keep_block.go | 3 ++-
sdk/go/arvados/keep_service.go | 2 ++
sdk/go/arvados/user.go | 3 +++
4 files changed, 15 insertions(+), 1 deletion(-)
via a4c0045623e096ce5950f137e014e0a9bf9fc5d7 (commit)
from 595f455a425d23e79789c2346a22a4a23520a417 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a4c0045623e096ce5950f137e014e0a9bf9fc5d7
Author: Tom Clegg <tom at curoverse.com>
Date: Wed May 25 14:43:06 2016 -0400
9162: Fix missing comments on public names.
diff --git a/sdk/go/arvados/client.go b/sdk/go/arvados/client.go
index 4d2b538..ee830c8 100644
--- a/sdk/go/arvados/client.go
+++ b/sdk/go/arvados/client.go
@@ -11,6 +11,12 @@ import (
"os"
)
+// A Client is an HTTP client with an API endpoint and a set of
+// Arvados credentials.
+//
+// It offers methods for accessing individual Arvados APIs, and
+// methods that implement common patterns like fetching multiple pages
+// of results using List APIs.
type Client struct {
// HTTP client used to make requests. If nil,
// http.DefaultClient or InsecureHTTPClient will be used.
@@ -27,6 +33,8 @@ type Client struct {
Insecure bool
}
+// The default http.Client used by a Client with Insecure==true and
+// Client==nil.
var InsecureHTTPClient = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
diff --git a/sdk/go/arvados/keep_block.go b/sdk/go/arvados/keep_block.go
index 68ef1d5..c9a7712 100644
--- a/sdk/go/arvados/keep_block.go
+++ b/sdk/go/arvados/keep_block.go
@@ -5,9 +5,10 @@ import (
"strings"
)
-// SizedDigest is hash+size
+// SizedDigest is a minimal Keep block locator: hash+size
type SizedDigest string
+// Size returns the size of the data block, in bytes.
func (sd SizedDigest) Size() int64 {
n, _ := strconv.ParseInt(strings.Split(string(sd), "+")[1], 10, 64)
return n
diff --git a/sdk/go/arvados/keep_service.go b/sdk/go/arvados/keep_service.go
index 6a5c0f7..4af1b79 100644
--- a/sdk/go/arvados/keep_service.go
+++ b/sdk/go/arvados/keep_service.go
@@ -8,6 +8,7 @@ import (
"strings"
)
+// KeepService is an arvados#keepService record
type KeepService struct {
UUID string `json:"uuid"`
ServiceHost string `json:"service_host"`
@@ -17,6 +18,7 @@ type KeepService struct {
ReadOnly bool `json:"read_only"`
}
+// KeepServiceList is an arvados#keepServiceList record
type KeepServiceList struct {
Items []KeepService `json:"items"`
ItemsAvailable int `json:"items_available"`
diff --git a/sdk/go/arvados/user.go b/sdk/go/arvados/user.go
index cd506ee..684a3af 100644
--- a/sdk/go/arvados/user.go
+++ b/sdk/go/arvados/user.go
@@ -1,5 +1,6 @@
package arvados
+// User is an arvados#user record
type User struct {
UUID string `json:"uuid,omitempty"`
IsActive bool `json:"is_active"`
@@ -7,6 +8,8 @@ type User struct {
Username string `json:"username,omitempty"`
}
+// CurrentUser calls arvados.v1.users.current, and returns the User
+// record corresponding to this client's credentials.
func (c *Client) CurrentUser() (User, error) {
var u User
err := c.RequestAndDecode(&u, "GET", "arvados/v1/users/current", nil, nil)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list