"git.curoverse.com/arvados.git/sdk/go/ctxlog"
)
-type Interface interface {
- CollectionCreate(ctx context.Context, options arvados.CreateOptions) (arvados.Collection, error)
- CollectionUpdate(ctx context.Context, options arvados.UpdateOptions) (arvados.Collection, error)
- CollectionGet(ctx context.Context, options arvados.GetOptions) (arvados.Collection, error)
- CollectionList(ctx context.Context, options arvados.ListOptions) (arvados.CollectionList, error)
- CollectionProvenance(ctx context.Context, options arvados.GetOptions) (map[string]interface{}, error)
- CollectionUsedBy(ctx context.Context, options arvados.GetOptions) (map[string]interface{}, error)
- CollectionDelete(ctx context.Context, options arvados.DeleteOptions) (arvados.Collection, error)
- CollectionTrash(ctx context.Context, options arvados.DeleteOptions) (arvados.Collection, error)
- CollectionUntrash(ctx context.Context, options arvados.UntrashOptions) (arvados.Collection, error)
- ContainerCreate(ctx context.Context, options arvados.CreateOptions) (arvados.Container, error)
- ContainerUpdate(ctx context.Context, options arvados.UpdateOptions) (arvados.Container, error)
- ContainerGet(ctx context.Context, options arvados.GetOptions) (arvados.Container, error)
- ContainerList(ctx context.Context, options arvados.ListOptions) (arvados.ContainerList, error)
- ContainerDelete(ctx context.Context, options arvados.DeleteOptions) (arvados.Container, error)
- ContainerLock(ctx context.Context, options arvados.GetOptions) (arvados.Container, error)
- ContainerUnlock(ctx context.Context, options arvados.GetOptions) (arvados.Container, error)
- SpecimenCreate(ctx context.Context, options arvados.CreateOptions) (arvados.Specimen, error)
- SpecimenUpdate(ctx context.Context, options arvados.UpdateOptions) (arvados.Specimen, error)
- SpecimenGet(ctx context.Context, options arvados.GetOptions) (arvados.Specimen, error)
- SpecimenList(ctx context.Context, options arvados.ListOptions) (arvados.SpecimenList, error)
- SpecimenDelete(ctx context.Context, options arvados.DeleteOptions) (arvados.Specimen, error)
- APIClientAuthorizationCurrent(ctx context.Context, options arvados.GetOptions) (arvados.APIClientAuthorization, error)
-}
-
type Conn struct {
cluster *arvados.Cluster
local backend
remotes map[string]backend
}
-func New(cluster *arvados.Cluster) Interface {
+func New(cluster *arvados.Cluster) arvados.API {
local := railsproxy.NewConn(cluster)
remotes := map[string]backend{}
for id, remote := range cluster.RemoteClusters {
return conn.chooseBackend(options.UUID).APIClientAuthorizationCurrent(ctx, options)
}
-type backend interface{ Interface }
+type backend interface{ arvados.API }
type notFoundError struct{}
package arvados
+import "context"
+
type APIEndpoint struct {
Method string
Path string
type DeleteOptions struct {
UUID string `json:"uuid"`
}
+
+type API interface {
+ CollectionCreate(ctx context.Context, options CreateOptions) (Collection, error)
+ CollectionUpdate(ctx context.Context, options UpdateOptions) (Collection, error)
+ CollectionGet(ctx context.Context, options GetOptions) (Collection, error)
+ CollectionList(ctx context.Context, options ListOptions) (CollectionList, error)
+ CollectionProvenance(ctx context.Context, options GetOptions) (map[string]interface{}, error)
+ CollectionUsedBy(ctx context.Context, options GetOptions) (map[string]interface{}, error)
+ CollectionDelete(ctx context.Context, options DeleteOptions) (Collection, error)
+ CollectionTrash(ctx context.Context, options DeleteOptions) (Collection, error)
+ CollectionUntrash(ctx context.Context, options UntrashOptions) (Collection, error)
+ ContainerCreate(ctx context.Context, options CreateOptions) (Container, error)
+ ContainerUpdate(ctx context.Context, options UpdateOptions) (Container, error)
+ ContainerGet(ctx context.Context, options GetOptions) (Container, error)
+ ContainerList(ctx context.Context, options ListOptions) (ContainerList, error)
+ ContainerDelete(ctx context.Context, options DeleteOptions) (Container, error)
+ ContainerLock(ctx context.Context, options GetOptions) (Container, error)
+ ContainerUnlock(ctx context.Context, options GetOptions) (Container, error)
+ SpecimenCreate(ctx context.Context, options CreateOptions) (Specimen, error)
+ SpecimenUpdate(ctx context.Context, options UpdateOptions) (Specimen, error)
+ SpecimenGet(ctx context.Context, options GetOptions) (Specimen, error)
+ SpecimenList(ctx context.Context, options ListOptions) (SpecimenList, error)
+ SpecimenDelete(ctx context.Context, options DeleteOptions) (Specimen, error)
+ APIClientAuthorizationCurrent(ctx context.Context, options GetOptions) (APIClientAuthorization, error)
+}