X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/533ee50c604e3900c390b77fafac1455b28a15d0..da4bc7c758d09c1c02542b54b96eab018f746eae:/sdk/go/arvados/api.go diff --git a/sdk/go/arvados/api.go b/sdk/go/arvados/api.go index bec387e857..e7310818f7 100644 --- a/sdk/go/arvados/api.go +++ b/sdk/go/arvados/api.go @@ -25,8 +25,14 @@ type APIEndpoint struct { var ( EndpointConfigGet = APIEndpoint{"GET", "arvados/v1/config", ""} EndpointVocabularyGet = APIEndpoint{"GET", "arvados/v1/vocabulary", ""} + EndpointDiscoveryDocument = APIEndpoint{"GET", "discovery/v1/apis/arvados/v1/rest", ""} EndpointLogin = APIEndpoint{"GET", "login", ""} EndpointLogout = APIEndpoint{"GET", "logout", ""} + EndpointAuthorizedKeyCreate = APIEndpoint{"POST", "arvados/v1/authorized_keys", "authorized_key"} + EndpointAuthorizedKeyUpdate = APIEndpoint{"PATCH", "arvados/v1/authorized_keys/{uuid}", "authorized_key"} + EndpointAuthorizedKeyGet = APIEndpoint{"GET", "arvados/v1/authorized_keys/{uuid}", ""} + EndpointAuthorizedKeyList = APIEndpoint{"GET", "arvados/v1/authorized_keys", ""} + EndpointAuthorizedKeyDelete = APIEndpoint{"DELETE", "arvados/v1/authorized_keys/{uuid}", ""} EndpointCollectionCreate = APIEndpoint{"POST", "arvados/v1/collections", "collection"} EndpointCollectionUpdate = APIEndpoint{"PATCH", "arvados/v1/collections/{uuid}", "collection"} EndpointCollectionGet = APIEndpoint{"GET", "arvados/v1/collections/{uuid}", ""} @@ -43,18 +49,22 @@ var ( EndpointSpecimenDelete = APIEndpoint{"DELETE", "arvados/v1/specimens/{uuid}", ""} EndpointContainerCreate = APIEndpoint{"POST", "arvados/v1/containers", "container"} EndpointContainerUpdate = APIEndpoint{"PATCH", "arvados/v1/containers/{uuid}", "container"} + EndpointContainerPriorityUpdate = APIEndpoint{"POST", "arvados/v1/containers/{uuid}/update_priority", "container"} EndpointContainerGet = APIEndpoint{"GET", "arvados/v1/containers/{uuid}", ""} EndpointContainerList = APIEndpoint{"GET", "arvados/v1/containers", ""} EndpointContainerDelete = APIEndpoint{"DELETE", "arvados/v1/containers/{uuid}", ""} EndpointContainerLock = APIEndpoint{"POST", "arvados/v1/containers/{uuid}/lock", ""} EndpointContainerUnlock = APIEndpoint{"POST", "arvados/v1/containers/{uuid}/unlock", ""} - EndpointContainerSSH = APIEndpoint{"POST", "arvados/v1/connect/{uuid}/ssh", ""} // move to /containers after #17014 fixes routing - EndpointContainerGatewayTunnel = APIEndpoint{"POST", "arvados/v1/connect/{uuid}/gateway_tunnel", ""} // move to /containers after #17014 fixes routing + EndpointContainerSSH = APIEndpoint{"POST", "arvados/v1/containers/{uuid}/ssh", ""} + EndpointContainerSSHCompat = APIEndpoint{"POST", "arvados/v1/connect/{uuid}/ssh", ""} // for compatibility with arvados <2.7 + EndpointContainerGatewayTunnel = APIEndpoint{"POST", "arvados/v1/containers/{uuid}/gateway_tunnel", ""} + EndpointContainerGatewayTunnelCompat = APIEndpoint{"POST", "arvados/v1/connect/{uuid}/gateway_tunnel", ""} // for compatibility with arvados <2.7 EndpointContainerRequestCreate = APIEndpoint{"POST", "arvados/v1/container_requests", "container_request"} EndpointContainerRequestUpdate = APIEndpoint{"PATCH", "arvados/v1/container_requests/{uuid}", "container_request"} EndpointContainerRequestGet = APIEndpoint{"GET", "arvados/v1/container_requests/{uuid}", ""} EndpointContainerRequestList = APIEndpoint{"GET", "arvados/v1/container_requests", ""} EndpointContainerRequestDelete = APIEndpoint{"DELETE", "arvados/v1/container_requests/{uuid}", ""} + EndpointContainerRequestLog = APIEndpoint{"GET", "arvados/v1/container_requests/{uuid}/log{path:|/.*}", ""} EndpointGroupCreate = APIEndpoint{"POST", "arvados/v1/groups", "group"} EndpointGroupUpdate = APIEndpoint{"PATCH", "arvados/v1/groups/{uuid}", "group"} EndpointGroupGet = APIEndpoint{"GET", "arvados/v1/groups/{uuid}", ""} @@ -231,11 +241,17 @@ type LogoutOptions struct { ReturnTo string `json:"return_to"` // Redirect to this URL after logging out } +type BlockReadOptions struct { + Locator string + WriteTo io.Writer + LocalLocator func(string) +} + type BlockWriteOptions struct { Hash string Data []byte - Reader io.Reader - DataSize int // Must be set if Data is nil. + Reader io.Reader // Must be set if Data is nil. + DataSize int // Must be set if Data is nil. RequestID string StorageClasses []string Replicas int @@ -243,8 +259,21 @@ type BlockWriteOptions struct { } type BlockWriteResponse struct { - Locator string - Replicas int + Locator string + Replicas int + StorageClasses map[string]int +} + +type WebDAVOptions struct { + Method string + Path string + Header http.Header +} + +type ContainerLogOptions struct { + UUID string `json:"uuid"` + NoForward bool `json:"no_forward"` + WebDAVOptions } type API interface { @@ -252,6 +281,11 @@ type API interface { VocabularyGet(ctx context.Context) (Vocabulary, error) Login(ctx context.Context, options LoginOptions) (LoginResponse, error) Logout(ctx context.Context, options LogoutOptions) (LogoutResponse, error) + AuthorizedKeyCreate(ctx context.Context, options CreateOptions) (AuthorizedKey, error) + AuthorizedKeyUpdate(ctx context.Context, options UpdateOptions) (AuthorizedKey, error) + AuthorizedKeyGet(ctx context.Context, options GetOptions) (AuthorizedKey, error) + AuthorizedKeyList(ctx context.Context, options ListOptions) (AuthorizedKeyList, error) + AuthorizedKeyDelete(ctx context.Context, options DeleteOptions) (AuthorizedKey, error) CollectionCreate(ctx context.Context, options CreateOptions) (Collection, error) CollectionUpdate(ctx context.Context, options UpdateOptions) (Collection, error) CollectionGet(ctx context.Context, options GetOptions) (Collection, error) @@ -263,6 +297,7 @@ type API interface { CollectionUntrash(ctx context.Context, options UntrashOptions) (Collection, error) ContainerCreate(ctx context.Context, options CreateOptions) (Container, error) ContainerUpdate(ctx context.Context, options UpdateOptions) (Container, error) + ContainerPriorityUpdate(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) @@ -275,6 +310,7 @@ type API interface { ContainerRequestGet(ctx context.Context, options GetOptions) (ContainerRequest, error) ContainerRequestList(ctx context.Context, options ListOptions) (ContainerRequestList, error) ContainerRequestDelete(ctx context.Context, options DeleteOptions) (ContainerRequest, error) + ContainerRequestLog(ctx context.Context, options ContainerLogOptions) (http.Handler, error) GroupCreate(ctx context.Context, options CreateOptions) (Group, error) GroupUpdate(ctx context.Context, options UpdateOptions) (Group, error) GroupGet(ctx context.Context, options GetOptions) (Group, error) @@ -319,4 +355,5 @@ type API interface { APIClientAuthorizationDelete(ctx context.Context, options DeleteOptions) (APIClientAuthorization, error) APIClientAuthorizationUpdate(ctx context.Context, options UpdateOptions) (APIClientAuthorization, error) APIClientAuthorizationGet(ctx context.Context, options GetOptions) (APIClientAuthorization, error) + DiscoveryDocument(ctx context.Context) (DiscoveryDocument, error) }