Project

General

Profile

Actions

Feature #8498

open

[SDKs] GoSDK arvadosclient parameters are more transparent

Added by Joshua Randall over 8 years ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
SDKs
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

Currently, one passes a generic 'arvadosclient.Dict' (actually a 'map[string]interface{}') to an API request in order to specify parameters of the request.

It would be nice if there was a more structured (and semantically meaningful) interface to set the parameters.

The sort of thing I would like to do would be to be able to take something currently written like this (example extracted from datamanager):

    fieldsWanted := []string{"manifest_text",
        "owner_uuid",
        "uuid",
        "redundancy",
        "modified_at"}

    sdkParams := arvadosclient.Dict{
        "select":  fieldsWanted,
        "order":   []string{"modified_at ASC"},
        "filters": [][]string{[]string{"modified_at", ">=", "1900-01-01T00:00:00Z"}}}

    sdkParams["filters"].([][]string)[0][2] = latestModificationDate.Format(time.RFC3339)

And instead write it rather more like:

    import arv "git.curoverse.com/arvados.git/sdk/go/arvadosclient" 
    listParams := arv.ListParams(
        arv.Select("manifest_text", "owner_uuid", "uuid", "redundancy", "modified_at"),
        arv.Order("modified_at ASC"),
        arv.Filters(arv.Filter{"modified_at", ">=", "1900-01-01T00:00:00Z"})
    )
    listParams.Filters[0].value = latestModificationDate.Format(time.RFC3339)

Actions #1

Updated by Brett Smith over 8 years ago

  • Subject changed from more transparent arvadosclient parameters (Go SDK) to [SDKs] GoSDK arvadosclient parameters are more transparent
Actions #2

Updated by Brett Smith over 8 years ago

  • Target version set to Arvados Future Sprints
Actions #3

Updated by Ward Vandewege over 3 years ago

  • Target version deleted (Arvados Future Sprints)
Actions #4

Updated by Peter Amstutz over 1 year ago

  • Release set to 60
Actions #5

Updated by Peter Amstutz 7 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF