Actions
Feature #8498
open[SDKs] GoSDK arvadosclient parameters are more transparent
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)
Updated by Brett Smith almost 9 years ago
- Subject changed from more transparent arvadosclient parameters (Go SDK) to [SDKs] GoSDK arvadosclient parameters are more transparent
Updated by Brett Smith almost 9 years ago
- Target version set to Arvados Future Sprints
Updated by Ward Vandewege over 3 years ago
- Target version deleted (
Arvados Future Sprints)
Actions