arvados

package
v0.0.0-...-c92af4d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2021 License: AGPL-3.0, Apache-2.0, CC-BY-SA-3.0 Imports: 32 Imported by: 2

Documentation

Overview

Package arvados is a client library for Arvados.

The API is not stable: it should be considered experimental pre-release.

The intent is to offer model types and API call functions that can be generated automatically (or at least mostly automatically) from a discovery document. For the time being, there is a manually generated subset of those types and API calls with (approximately) the right signatures, plus client/authentication support and some convenience functions.

Index

Constants

View Source
const (
	ContainerStateQueued    = ContainerState("Queued")
	ContainerStateLocked    = ContainerState("Locked")
	ContainerStateRunning   = ContainerState("Running")
	ContainerStateComplete  = ContainerState("Complete")
	ContainerStateCancelled = ContainerState("Cancelled")
)
View Source
const (
	ContainerRequestStateUncomitted = ContainerRequestState("Uncommitted")
	ContainerRequestStateCommitted  = ContainerRequestState("Committed")
	ContainerRequestStateFinal      = ContainerRequestState("Final")
)

Variables

View Source
var (
	EndpointConfigGet                     = APIEndpoint{"GET", "arvados/v1/config", ""}
	EndpointLogin                         = APIEndpoint{"GET", "login", ""}
	EndpointLogout                        = APIEndpoint{"GET", "logout", ""}
	EndpointCollectionCreate              = APIEndpoint{"POST", "arvados/v1/collections", "collection"}
	EndpointCollectionUpdate              = APIEndpoint{"PATCH", "arvados/v1/collections/{uuid}", "collection"}
	EndpointCollectionGet                 = APIEndpoint{"GET", "arvados/v1/collections/{uuid}", ""}
	EndpointCollectionList                = APIEndpoint{"GET", "arvados/v1/collections", ""}
	EndpointCollectionProvenance          = APIEndpoint{"GET", "arvados/v1/collections/{uuid}/provenance", ""}
	EndpointCollectionUsedBy              = APIEndpoint{"GET", "arvados/v1/collections/{uuid}/used_by", ""}
	EndpointCollectionDelete              = APIEndpoint{"DELETE", "arvados/v1/collections/{uuid}", ""}
	EndpointCollectionTrash               = APIEndpoint{"POST", "arvados/v1/collections/{uuid}/trash", ""}
	EndpointCollectionUntrash             = APIEndpoint{"POST", "arvados/v1/collections/{uuid}/untrash", ""}
	EndpointSpecimenCreate                = APIEndpoint{"POST", "arvados/v1/specimens", "specimen"}
	EndpointSpecimenUpdate                = APIEndpoint{"PATCH", "arvados/v1/specimens/{uuid}", "specimen"}
	EndpointSpecimenGet                   = APIEndpoint{"GET", "arvados/v1/specimens/{uuid}", ""}
	EndpointSpecimenList                  = APIEndpoint{"GET", "arvados/v1/specimens", ""}
	EndpointSpecimenDelete                = APIEndpoint{"DELETE", "arvados/v1/specimens/{uuid}", ""}
	EndpointContainerCreate               = APIEndpoint{"POST", "arvados/v1/containers", "container"}
	EndpointContainerUpdate               = APIEndpoint{"PATCH", "arvados/v1/containers/{uuid}", "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{"GET", "arvados/v1/connect/{uuid}/ssh", ""} // move to /containers after #17014 fixes routing
	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}", ""}
	EndpointGroupCreate                   = APIEndpoint{"POST", "arvados/v1/groups", "group"}
	EndpointGroupUpdate                   = APIEndpoint{"PATCH", "arvados/v1/groups/{uuid}", "group"}
	EndpointGroupGet                      = APIEndpoint{"GET", "arvados/v1/groups/{uuid}", ""}
	EndpointGroupList                     = APIEndpoint{"GET", "arvados/v1/groups", ""}
	EndpointGroupContents                 = APIEndpoint{"GET", "arvados/v1/groups/contents", ""}
	EndpointGroupContentsUUIDInPath       = APIEndpoint{"GET", "arvados/v1/groups/{uuid}/contents", ""} // Alternative HTTP route; client-side code should always use EndpointGroupContents instead
	EndpointGroupShared                   = APIEndpoint{"GET", "arvados/v1/groups/shared", ""}
	EndpointGroupDelete                   = APIEndpoint{"DELETE", "arvados/v1/groups/{uuid}", ""}
	EndpointGroupTrash                    = APIEndpoint{"POST", "arvados/v1/groups/{uuid}/trash", ""}
	EndpointGroupUntrash                  = APIEndpoint{"POST", "arvados/v1/groups/{uuid}/untrash", ""}
	EndpointUserActivate                  = APIEndpoint{"POST", "arvados/v1/users/{uuid}/activate", ""}
	EndpointUserCreate                    = APIEndpoint{"POST", "arvados/v1/users", "user"}
	EndpointUserCurrent                   = APIEndpoint{"GET", "arvados/v1/users/current", ""}
	EndpointUserDelete                    = APIEndpoint{"DELETE", "arvados/v1/users/{uuid}", ""}
	EndpointUserGet                       = APIEndpoint{"GET", "arvados/v1/users/{uuid}", ""}
	EndpointUserGetCurrent                = APIEndpoint{"GET", "arvados/v1/users/current", ""}
	EndpointUserGetSystem                 = APIEndpoint{"GET", "arvados/v1/users/system", ""}
	EndpointUserList                      = APIEndpoint{"GET", "arvados/v1/users", ""}
	EndpointUserMerge                     = APIEndpoint{"POST", "arvados/v1/users/merge", ""}
	EndpointUserSetup                     = APIEndpoint{"POST", "arvados/v1/users/setup", "user"}
	EndpointUserSystem                    = APIEndpoint{"GET", "arvados/v1/users/system", ""}
	EndpointUserUnsetup                   = APIEndpoint{"POST", "arvados/v1/users/{uuid}/unsetup", ""}
	EndpointUserUpdate                    = APIEndpoint{"PATCH", "arvados/v1/users/{uuid}", "user"}
	EndpointUserUpdateUUID                = APIEndpoint{"POST", "arvados/v1/users/{uuid}/update_uuid", ""}
	EndpointUserBatchUpdate               = APIEndpoint{"PATCH", "arvados/v1/users/batch_update", ""}
	EndpointUserAuthenticate              = APIEndpoint{"POST", "arvados/v1/users/authenticate", ""}
	EndpointAPIClientAuthorizationCurrent = APIEndpoint{"GET", "arvados/v1/api_client_authorizations/current", ""}
)
View Source
var (
	// ErrSignatureExpired - a signature was rejected because the
	// expiry time has passed.
	ErrSignatureExpired = errors.New("Signature expired")
	// ErrSignatureInvalid - a signature was rejected because it
	// was badly formatted or did not match the given secret key.
	ErrSignatureInvalid = errors.New("Invalid signature")
	// ErrSignatureMissing - the given locator does not have a
	// signature hint.
	ErrSignatureMissing = errors.New("Missing signature")
)
View Source
var (
	ErrReadOnlyFile      = errors.New("read-only file")
	ErrNegativeOffset    = errors.New("cannot seek to negative offset")
	ErrFileExists        = errors.New("file exists")
	ErrInvalidOperation  = errors.New("invalid operation")
	ErrInvalidArgument   = errors.New("invalid argument")
	ErrDirectoryNotEmpty = errors.New("directory not empty")
	ErrWriteOnlyMode     = errors.New("file is O_WRONLY")
	ErrSyncNotSupported  = errors.New("O_SYNC flag is not supported")
	ErrIsDirectory       = errors.New("cannot rename file to overwrite existing directory")
	ErrNotADirectory     = errors.New("not a directory")
	ErrPermission        = os.ErrPermission
	DebugLocksPanicMode  = false
)
View Source
var DefaultConfigFile = func() string {
	if path := os.Getenv("ARVADOS_CONFIG"); path != "" {
		return path
	}
	return "/etc/arvados/config.yml"
}()
View Source
var DefaultSecureClient = &http.Client{}

DefaultSecureClient is the default http.Client used by a Client otherwise.

View Source
var InsecureHTTPClient = &http.Client{
	Transport: &http.Transport{
		TLSClientConfig: &tls.Config{
			InsecureSkipVerify: true}}}

InsecureHTTPClient is the default http.Client used by a Client with Insecure==true and Client==nil.

View Source
var SignedLocatorRe = regexp.MustCompile(

	`^([[:xdigit:]]{32})(\+[0-9]+)?((\+[B-Z][A-Za-z0-9@_-]*)*)(\+A([[:xdigit:]]{40})@([[:xdigit:]]{8}))((\+[B-Z][A-Za-z0-9@_-]*)*)$`)

Functions

func ContextWithAuthorization

func ContextWithAuthorization(ctx context.Context, value string) context.Context

ContextWithAuthorization returns a child context that (when used with (*Client)RequestAndDecodeContext) sends the given Authorization header value instead of the Client's default AuthToken.

func ContextWithRequestID

func ContextWithRequestID(ctx context.Context, reqid string) context.Context

func PortableDataHash

func PortableDataHash(mt string) string

PortableDataHash computes the portable data hash of the given manifest.

func SignLocator

func SignLocator(blobLocator, apiToken string, expiry time.Time, blobSignatureTTL time.Duration, permissionSecret []byte) string

SignLocator returns blobLocator with a permission signature added. If either permissionSecret or apiToken is empty, blobLocator is returned untouched.

This function is intended to be used by system components and admin utilities: userland programs do not know the permissionSecret.

func SignManifest

func SignManifest(manifest string, apiToken string, expiry time.Time, ttl time.Duration, permissionSecret []byte) string

SignManifest signs all locators in the given manifest, discarding any existing signatures.

func VerifySignature

func VerifySignature(signedLocator, apiToken string, blobSignatureTTL time.Duration, permissionSecret []byte) error

VerifySignature returns nil if the signature on the signedLocator can be verified using the given apiToken. Otherwise it returns ErrSignatureExpired (if the signature's expiry time has passed, which is something the client could have figured out independently), ErrSignatureMissing (if there is no signature hint at all), or ErrSignatureInvalid (if the signature is present but badly formatted or incorrect).

This function is intended to be used by system components and admin utilities: userland programs do not know the permissionSecret.

Types

type API

type API interface {
	ConfigGet(ctx context.Context) (json.RawMessage, error)
	Login(ctx context.Context, options LoginOptions) (LoginResponse, error)
	Logout(ctx context.Context, options LogoutOptions) (LogoutResponse, 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)
	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)
	ContainerSSH(ctx context.Context, options ContainerSSHOptions) (ContainerSSHConnection, error)
	ContainerRequestCreate(ctx context.Context, options CreateOptions) (ContainerRequest, error)
	ContainerRequestUpdate(ctx context.Context, options UpdateOptions) (ContainerRequest, error)
	ContainerRequestGet(ctx context.Context, options GetOptions) (ContainerRequest, error)
	ContainerRequestList(ctx context.Context, options ListOptions) (ContainerRequestList, error)
	ContainerRequestDelete(ctx context.Context, options DeleteOptions) (ContainerRequest, 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)
	GroupList(ctx context.Context, options ListOptions) (GroupList, error)
	GroupContents(ctx context.Context, options GroupContentsOptions) (ObjectList, error)
	GroupShared(ctx context.Context, options ListOptions) (GroupList, error)
	GroupDelete(ctx context.Context, options DeleteOptions) (Group, error)
	GroupTrash(ctx context.Context, options DeleteOptions) (Group, error)
	GroupUntrash(ctx context.Context, options UntrashOptions) (Group, 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)
	UserCreate(ctx context.Context, options CreateOptions) (User, error)
	UserUpdate(ctx context.Context, options UpdateOptions) (User, error)
	UserUpdateUUID(ctx context.Context, options UpdateUUIDOptions) (User, error)
	UserMerge(ctx context.Context, options UserMergeOptions) (User, error)
	UserActivate(ctx context.Context, options UserActivateOptions) (User, error)
	UserSetup(ctx context.Context, options UserSetupOptions) (map[string]interface{}, error)
	UserUnsetup(ctx context.Context, options GetOptions) (User, error)
	UserGet(ctx context.Context, options GetOptions) (User, error)
	UserGetCurrent(ctx context.Context, options GetOptions) (User, error)
	UserGetSystem(ctx context.Context, options GetOptions) (User, error)
	UserList(ctx context.Context, options ListOptions) (UserList, error)
	UserDelete(ctx context.Context, options DeleteOptions) (User, error)
	UserBatchUpdate(context.Context, UserBatchUpdateOptions) (UserList, error)
	UserAuthenticate(ctx context.Context, options UserAuthenticateOptions) (APIClientAuthorization, error)
	APIClientAuthorizationCurrent(ctx context.Context, options GetOptions) (APIClientAuthorization, error)
}

type APIClientAuthorization

type APIClientAuthorization struct {
	UUID      string   `json:"uuid"`
	APIToken  string   `json:"api_token"`
	ExpiresAt string   `json:"expires_at"`
	Scopes    []string `json:"scopes"`
}

APIClientAuthorization is an arvados#apiClientAuthorization resource.

func (APIClientAuthorization) TokenV2

func (aca APIClientAuthorization) TokenV2() string

type APIClientAuthorizationList

type APIClientAuthorizationList struct {
	Items []APIClientAuthorization `json:"items"`
}

APIClientAuthorizationList is an arvados#apiClientAuthorizationList resource.

type APIEndpoint

type APIEndpoint struct {
	Method string
	Path   string
	// "new attributes" key for create/update requests
	AttrsKey string
}

type AzureVolumeDriverParameters

type AzureVolumeDriverParameters struct {
	StorageAccountName   string
	StorageAccountKey    string
	StorageBaseURL       string
	ContainerName        string
	RequestTimeout       Duration
	ListBlobsRetryDelay  Duration
	ListBlobsMaxAttempts int
}

type ByteSize

type ByteSize int64

func (*ByteSize) UnmarshalJSON

func (n *ByteSize) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	// HTTP client used to make requests. If nil,
	// DefaultSecureClient or InsecureHTTPClient will be used.
	Client *http.Client `json:"-"`

	// Protocol scheme: "http", "https", or "" (https)
	Scheme string

	// Hostname (or host:port) of Arvados API server.
	APIHost string

	// User authentication token.
	AuthToken string

	// Accept unverified certificates. This works only if the
	// Client field is nil: otherwise, it has no effect.
	Insecure bool

	// Override keep service discovery with a list of base
	// URIs. (Currently there are no Client methods for
	// discovering keep services so this is just a convenience for
	// callers who use a Client to initialize an
	// arvadosclient.ArvadosClient.)
	KeepServiceURIs []string `json:",omitempty"`

	// HTTP headers to add/override in outgoing requests.
	SendHeader http.Header

	// Timeout for requests. NewClientFromConfig and
	// NewClientFromEnv return a Client with a default 5 minute
	// timeout.  To disable this timeout and rely on each
	// http.Request's context deadline instead, set Timeout to
	// zero.
	Timeout time.Duration
	// contains filtered or unexported fields
}

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.

func NewClientFromConfig

func NewClientFromConfig(cluster *Cluster) (*Client, error)

NewClientFromConfig creates a new Client that uses the endpoints in the given cluster.

AuthToken is left empty for the caller to populate.

func NewClientFromEnv

func NewClientFromEnv() *Client

NewClientFromEnv creates a new Client that uses the default HTTP client with the API endpoint and credentials given by the ARVADOS_API_* environment variables.

func (*Client) CurrentUser

func (c *Client) CurrentUser() (User, error)

CurrentUser calls arvados.v1.users.current, and returns the User record corresponding to this client's credentials.

func (*Client) CustomFileSystem

func (c *Client) CustomFileSystem(kc keepClient) CustomFileSystem

func (*Client) DiscoveryDocument

func (c *Client) DiscoveryDocument() (*DiscoveryDocument, error)

DiscoveryDocument returns a *DiscoveryDocument. The returned object should not be modified: the same object may be returned by subsequent calls.

func (*Client) Do

func (c *Client) Do(req *http.Request) (*http.Response, error)

Do adds Authorization and X-Request-Id headers and then calls (*http.Client)Do().

func (*Client) DoAndDecode

func (c *Client) DoAndDecode(dst interface{}, req *http.Request) error

DoAndDecode performs req and unmarshals the response (which must be JSON) into dst. Use this instead of RequestAndDecode if you need more control of the http.Request object.

If the response status indicates an HTTP redirect, the Location header value is unmarshalled to dst as a RedirectLocation key/field.

func (*Client) EachKeepService

func (c *Client) EachKeepService(f func(KeepService) error) error

EachKeepService calls f once for every readable KeepService. EachKeepService stops if it encounters an error, such as f returning a non-nil error.

func (*Client) KindForUUID

func (c *Client) KindForUUID(uuid string) (string, error)

func (*Client) PathForUUID

func (c *Client) PathForUUID(method, uuid string) (string, error)

func (*Client) RequestAndDecode

func (c *Client) RequestAndDecode(dst interface{}, method, path string, body io.Reader, params interface{}) error

RequestAndDecode performs an API request and unmarshals the response (which must be JSON) into dst. Method and body arguments are the same as for http.NewRequest(). The given path is added to the server's scheme/host/port to form the request URL. The given params are passed via POST form or query string.

path must not contain a query string.

func (*Client) RequestAndDecodeContext

func (c *Client) RequestAndDecodeContext(ctx context.Context, dst interface{}, method, path string, body io.Reader, params interface{}) error

RequestAndDecodeContext does the same as RequestAndDecode, but with a context

func (*Client) SiteFileSystem

func (c *Client) SiteFileSystem(kc keepClient) CustomFileSystem

SiteFileSystem returns a FileSystem that maps collections and other Arvados objects onto a filesystem layout.

This is experimental: the filesystem layout is not stable, and there are significant known bugs and shortcomings. For example, writes are not persisted until Sync() is called.

func (*Client) UpdateBody

func (c *Client) UpdateBody(rsc resource) io.Reader

UpdateBody returns an io.Reader suitable for use as an http.Request Body for a create or update API call.

func (*Client) WithRequestID

func (c *Client) WithRequestID(reqid string) *Client

WithRequestID returns a new shallow copy of c that sends the given X-Request-Id value (instead of a new randomly generated one) with each subsequent request that doesn't provide its own via context or header.

type CloudVMsConfig

type CloudVMsConfig struct {
	Enable bool

	BootProbeCommand               string
	DeployRunnerBinary             string
	ImageID                        string
	MaxCloudOpsPerSecond           int
	MaxProbesPerSecond             int
	MaxConcurrentInstanceCreateOps int
	PollInterval                   Duration
	ProbeInterval                  Duration
	SSHPort                        string
	SyncInterval                   Duration
	TimeoutBooting                 Duration
	TimeoutIdle                    Duration
	TimeoutProbe                   Duration
	TimeoutShutdown                Duration
	TimeoutSignal                  Duration
	TimeoutStaleRunLock            Duration
	TimeoutTERM                    Duration
	ResourceTags                   map[string]string
	TagKeyPrefix                   string

	Driver           string
	DriverParameters json.RawMessage
}

type Cluster

type Cluster struct {
	ClusterID       string `json:"-"`
	ManagementToken string
	SystemRootToken string
	Services        Services
	InstanceTypes   InstanceTypeMap
	Containers      ContainersConfig
	RemoteClusters  map[string]RemoteCluster
	PostgreSQL      PostgreSQL

	API struct {
		AsyncPermissionsUpdateInterval Duration
		DisabledAPIs                   StringSet
		MaxIndexDatabaseRead           int
		MaxItemsPerResponse            int
		MaxConcurrentRequests          int
		MaxKeepBlobBuffers             int
		MaxRequestAmplification        int
		MaxRequestSize                 int
		MaxTokenLifetime               Duration
		RequestTimeout                 Duration
		SendTimeout                    Duration
		WebsocketClientEventQueue      int
		WebsocketServerEventQueue      int
		KeepServiceRequestTimeout      Duration
	}
	AuditLogs struct {
		MaxAge             Duration
		MaxDeleteBatch     int
		UnloggedAttributes StringSet
	}
	Collections struct {
		BlobSigning              bool
		BlobSigningKey           string
		BlobSigningTTL           Duration
		BlobTrash                bool
		BlobTrashLifetime        Duration
		BlobTrashCheckInterval   Duration
		BlobTrashConcurrency     int
		BlobDeleteConcurrency    int
		BlobReplicateConcurrency int
		CollectionVersioning     bool
		DefaultTrashLifetime     Duration
		DefaultReplication       int
		ManagedProperties        map[string]struct {
			Value     interface{}
			Function  string
			Protected bool
		}
		PreserveVersionIfIdle        Duration
		TrashSweepInterval           Duration
		TrustAllContent              bool
		ForwardSlashNameSubstitution string
		S3FolderObjects              bool

		BlobMissingReport        string
		BalancePeriod            Duration
		BalanceCollectionBatch   int
		BalanceCollectionBuffers int
		BalanceTimeout           Duration

		WebDAVCache WebDAVCacheConfig

		KeepproxyPermission UploadDownloadRolePermissions
		WebDAVPermission    UploadDownloadRolePermissions
		WebDAVLogEvents     bool
	}
	Git struct {
		GitCommand   string
		GitoliteHome string
		Repositories string
	}
	Login struct {
		LDAP struct {
			Enable             bool
			URL                URL
			StartTLS           bool
			InsecureTLS        bool
			StripDomain        string
			AppendDomain       string
			SearchAttribute    string
			SearchBindUser     string
			SearchBindPassword string
			SearchBase         string
			SearchFilters      string
			EmailAttribute     string
			UsernameAttribute  string
		}
		Google struct {
			Enable                          bool
			ClientID                        string
			ClientSecret                    string
			AlternateEmailAddresses         bool
			AuthenticationRequestParameters map[string]string
		}
		OpenIDConnect struct {
			Enable                          bool
			Issuer                          string
			ClientID                        string
			ClientSecret                    string
			EmailClaim                      string
			EmailVerifiedClaim              string
			UsernameClaim                   string
			AcceptAccessToken               bool
			AcceptAccessTokenScope          string
			AuthenticationRequestParameters map[string]string
		}
		PAM struct {
			Enable             bool
			Service            string
			DefaultEmailDomain string
		}
		Test struct {
			Enable bool
			Users  map[string]TestUser
		}
		LoginCluster       string
		RemoteTokenRefresh Duration
		TokenLifetime      Duration
		TrustedClients     map[string]struct{}
		IssueTrustedTokens bool
	}
	Mail struct {
		MailchimpAPIKey                string
		MailchimpListID                string
		SendUserSetupNotificationEmail bool
		IssueReporterEmailFrom         string
		IssueReporterEmailTo           string
		SupportEmailAddress            string
		EmailFrom                      string
	}
	SystemLogs struct {
		LogLevel                string
		Format                  string
		MaxRequestLogParamsSize int
	}
	TLS struct {
		Certificate string
		Key         string
		Insecure    bool
	}
	Users struct {
		AnonymousUserToken                    string
		AdminNotifierEmailFrom                string
		AutoAdminFirstUser                    bool
		AutoAdminUserWithEmail                string
		AutoSetupNewUsers                     bool
		AutoSetupNewUsersWithRepository       bool
		AutoSetupNewUsersWithVmUUID           string
		AutoSetupUsernameBlacklist            StringSet
		EmailSubjectPrefix                    string
		NewInactiveUserNotificationRecipients StringSet
		NewUserNotificationRecipients         StringSet
		NewUsersAreActive                     bool
		UserNotifierEmailFrom                 string
		UserProfileNotificationAddress        string
		PreferDomainForUsername               string
		UserSetupMailText                     string
	}
	Volumes   map[string]Volume
	Workbench struct {
		ActivationContactLink            string
		APIClientConnectTimeout          Duration
		APIClientReceiveTimeout          Duration
		APIResponseCompression           bool
		ApplicationMimetypesWithViewIcon StringSet
		ArvadosDocsite                   string
		ArvadosPublicDataDocURL          string
		DefaultOpenIdPrefix              string
		EnableGettingStartedPopup        bool
		EnablePublicProjectsPage         bool
		FileViewersConfigURL             string
		LogViewerMaxBytes                ByteSize
		MultiSiteSearch                  string
		ProfilingEnabled                 bool
		Repositories                     bool
		RepositoryCache                  string
		RunningJobLogRecordsToFetch      int
		SecretKeyBase                    string
		ShowRecentCollectionsOnDashboard bool
		ShowUserAgreementInline          bool
		ShowUserNotifications            bool
		SiteName                         string
		Theme                            string
		UserProfileFormFields            map[string]struct {
			Type                 string
			FormFieldTitle       string
			FormFieldDescription string
			Required             bool
			Position             int
			Options              map[string]struct{}
		}
		UserProfileFormMessage string
		VocabularyURL          string
		WelcomePageHTML        string
		InactivePageHTML       string
		SSHHelpPageHTML        string
		SSHHelpHostSuffix      string
		IdleTimeout            Duration
	}
}

func IntegrationTestCluster

func IntegrationTestCluster() *Cluster

IntegrationTestCluster returns the cluster that has been set up by the integration test framework (see /build/run-tests.sh). It panics on error.

type Collection

type Collection struct {
	UUID                      string                 `json:"uuid"`
	Etag                      string                 `json:"etag"`
	OwnerUUID                 string                 `json:"owner_uuid"`
	TrashAt                   *time.Time             `json:"trash_at"`
	ManifestText              string                 `json:"manifest_text"`
	UnsignedManifestText      string                 `json:"unsigned_manifest_text"`
	Name                      string                 `json:"name"`
	CreatedAt                 time.Time              `json:"created_at"`
	ModifiedAt                time.Time              `json:"modified_at"`
	ModifiedByClientUUID      string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID        string                 `json:"modified_by_user_uuid"`
	PortableDataHash          string                 `json:"portable_data_hash"`
	ReplicationConfirmed      *int                   `json:"replication_confirmed"`
	ReplicationConfirmedAt    *time.Time             `json:"replication_confirmed_at"`
	ReplicationDesired        *int                   `json:"replication_desired"`
	StorageClassesDesired     []string               `json:"storage_classes_desired"`
	StorageClassesConfirmed   []string               `json:"storage_classes_confirmed"`
	StorageClassesConfirmedAt *time.Time             `json:"storage_classes_confirmed_at"`
	DeleteAt                  *time.Time             `json:"delete_at"`
	IsTrashed                 bool                   `json:"is_trashed"`
	Properties                map[string]interface{} `json:"properties"`
	WritableBy                []string               `json:"writable_by,omitempty"`
	FileCount                 int                    `json:"file_count"`
	FileSizeTotal             int64                  `json:"file_size_total"`
	Version                   int                    `json:"version"`
	PreserveVersion           bool                   `json:"preserve_version"`
	CurrentVersionUUID        string                 `json:"current_version_uuid"`
	Description               string                 `json:"description"`
}

Collection is an arvados#collection resource.

func (*Collection) FileSystem

func (c *Collection) FileSystem(client apiClient, kc keepClient) (CollectionFileSystem, error)

FileSystem returns a CollectionFileSystem for the collection.

func (*Collection) SizedDigests

func (c *Collection) SizedDigests() ([]SizedDigest, error)

SizedDigests returns the hash+size part of each data block referenced by the collection.

Zero-length blocks are not included.

type CollectionFileSystem

type CollectionFileSystem interface {
	FileSystem

	// Flush all file data to Keep and return a snapshot of the
	// filesystem suitable for saving as (Collection)ManifestText.
	// Prefix (normally ".") is a top level directory, effectively
	// prepended to all paths in the returned manifest.
	MarshalManifest(prefix string) (string, error)

	// Total data bytes in all files.
	Size() int64
}

A CollectionFileSystem is a FileSystem that can be serialized as a manifest and stored as a collection.

type CollectionList

type CollectionList struct {
	Items          []Collection `json:"items"`
	ItemsAvailable int          `json:"items_available"`
	Offset         int          `json:"offset"`
	Limit          int          `json:"limit"`
}

type Config

type Config struct {
	Clusters         map[string]Cluster
	AutoReloadConfig bool
}

func GetConfig

func GetConfig(configFile string) (*Config, error)

GetConfig returns the current system config, loading it from configFile if needed.

func (*Config) GetCluster

func (sc *Config) GetCluster(clusterID string) (*Cluster, error)

GetCluster returns the cluster ID and config for the given cluster, or the default/only configured cluster if clusterID is "".

type Container

type Container struct {
	UUID                      string                 `json:"uuid"`
	Etag                      string                 `json:"etag"`
	CreatedAt                 time.Time              `json:"created_at"`
	ModifiedByClientUUID      string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID        string                 `json:"modified_by_user_uuid"`
	ModifiedAt                time.Time              `json:"modified_at"`
	Command                   []string               `json:"command"`
	ContainerImage            string                 `json:"container_image"`
	Cwd                       string                 `json:"cwd"`
	Environment               map[string]string      `json:"environment"`
	LockedByUUID              string                 `json:"locked_by_uuid"`
	Mounts                    map[string]Mount       `json:"mounts"`
	Output                    string                 `json:"output"`
	OutputPath                string                 `json:"output_path"`
	Priority                  int64                  `json:"priority"`
	RuntimeConstraints        RuntimeConstraints     `json:"runtime_constraints"`
	State                     ContainerState         `json:"state"`
	SchedulingParameters      SchedulingParameters   `json:"scheduling_parameters"`
	ExitCode                  int                    `json:"exit_code"`
	RuntimeStatus             map[string]interface{} `json:"runtime_status"`
	StartedAt                 *time.Time             `json:"started_at"`  // nil if not yet started
	FinishedAt                *time.Time             `json:"finished_at"` // nil if not yet finished
	GatewayAddress            string                 `json:"gateway_address"`
	InteractiveSessionStarted bool                   `json:"interactive_session_started"`
}

Container is an arvados#container resource.

type ContainerList

type ContainerList struct {
	Items          []Container `json:"items"`
	ItemsAvailable int         `json:"items_available"`
	Offset         int         `json:"offset"`
	Limit          int         `json:"limit"`
}

ContainerList is an arvados#containerList resource.

type ContainerRequest

type ContainerRequest struct {
	UUID                    string                 `json:"uuid"`
	OwnerUUID               string                 `json:"owner_uuid"`
	CreatedAt               time.Time              `json:"created_at"`
	ModifiedByClientUUID    string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID      string                 `json:"modified_by_user_uuid"`
	ModifiedAt              time.Time              `json:"modified_at"`
	Href                    string                 `json:"href"`
	Etag                    string                 `json:"etag"`
	Name                    string                 `json:"name"`
	Description             string                 `json:"description"`
	Properties              map[string]interface{} `json:"properties"`
	State                   ContainerRequestState  `json:"state"`
	RequestingContainerUUID string                 `json:"requesting_container_uuid"`
	ContainerUUID           string                 `json:"container_uuid"`
	ContainerCountMax       int                    `json:"container_count_max"`
	Mounts                  map[string]Mount       `json:"mounts"`
	RuntimeConstraints      RuntimeConstraints     `json:"runtime_constraints"`
	SchedulingParameters    SchedulingParameters   `json:"scheduling_parameters"`
	ContainerImage          string                 `json:"container_image"`
	Environment             map[string]string      `json:"environment"`
	Cwd                     string                 `json:"cwd"`
	Command                 []string               `json:"command"`
	OutputPath              string                 `json:"output_path"`
	OutputName              string                 `json:"output_name"`
	OutputTTL               int                    `json:"output_ttl"`
	Priority                int                    `json:"priority"`
	UseExisting             bool                   `json:"use_existing"`
	LogUUID                 string                 `json:"log_uuid"`
	OutputUUID              string                 `json:"output_uuid"`
	RuntimeToken            string                 `json:"runtime_token"`
	ExpiresAt               time.Time              `json:"expires_at"`
	Filters                 []Filter               `json:"filters"`
	ContainerCount          int                    `json:"container_count"`
}

ContainerRequest is an arvados#container_request resource.

type ContainerRequestList

type ContainerRequestList struct {
	Items          []ContainerRequest `json:"items"`
	ItemsAvailable int                `json:"items_available"`
	Offset         int                `json:"offset"`
	Limit          int                `json:"limit"`
}

ContainerRequestList is an arvados#containerRequestList resource.

type ContainerRequestState

type ContainerRequestState string

ContainerRequestState is a string corresponding to a valid Container Request state.

type ContainerSSHConnection

type ContainerSSHConnection struct {
	Conn   net.Conn           `json:"-"`
	Bufrw  *bufio.ReadWriter  `json:"-"`
	Logger logrus.FieldLogger `json:"-"`
}

func (ContainerSSHConnection) ServeHTTP

func (sshconn ContainerSSHConnection) ServeHTTP(w http.ResponseWriter, req *http.Request)

type ContainerSSHOptions

type ContainerSSHOptions struct {
	UUID          string `json:"uuid"`
	DetachKeys    string `json:"detach_keys"`
	LoginUsername string `json:"login_username"`
}

type ContainerState

type ContainerState string

ContainerState is a string corresponding to a valid Container state.

type ContainersConfig

type ContainersConfig struct {
	CloudVMs                    CloudVMsConfig
	CrunchRunCommand            string
	CrunchRunArgumentsList      []string
	DefaultKeepCacheRAM         ByteSize
	DispatchPrivateKey          string
	LogReuseDecisions           bool
	MaxComputeVMs               int
	MaxDispatchAttempts         int
	MaxRetryAttempts            int
	MinRetryPeriod              Duration
	ReserveExtraRAM             ByteSize
	StaleLockTimeout            Duration
	SupportedDockerImageFormats StringSet
	UsePreemptibleInstances     bool
	RuntimeEngine               string

	JobsAPI struct {
		Enable         string
		GitInternalDir string
	}
	Logging struct {
		MaxAge                       Duration
		LogBytesPerEvent             int
		LogSecondsBetweenEvents      Duration
		LogThrottlePeriod            Duration
		LogThrottleBytes             int
		LogThrottleLines             int
		LimitLogBytesPerJob          int
		LogPartialLineThrottlePeriod Duration
		LogUpdatePeriod              Duration
		LogUpdateSize                ByteSize
	}
	ShellAccess struct {
		Admin bool
		User  bool
	}
	SLURM struct {
		PrioritySpread             int64
		SbatchArgumentsList        []string
		SbatchEnvironmentVariables map[string]string
		Managed                    struct {
			DNSServerConfDir       string
			DNSServerConfTemplate  string
			DNSServerReloadCommand string
			DNSServerUpdateCommand string
			ComputeNodeDomain      string
			ComputeNodeNameservers StringSet
			AssignNodeHostname     string
		}
	}
}

type CreateOptions

type CreateOptions struct {
	ClusterID        string                 `json:"cluster_id"`
	EnsureUniqueName bool                   `json:"ensure_unique_name"`
	Select           []string               `json:"select"`
	Attrs            map[string]interface{} `json:"attrs"`
}

type CustomFileSystem

type CustomFileSystem interface {
	FileSystem
	MountByID(mount string)
	MountProject(mount, uuid string)
	MountUsers(mount string)
	ForwardSlashNameSubstitution(string)
}

type DeleteOptions

type DeleteOptions struct {
	UUID string `json:"uuid"`
}

type DirectoryVolumeDriverParameters

type DirectoryVolumeDriverParameters struct {
	Root      string
	Serialize bool
}

type DiscoveryDocument

type DiscoveryDocument struct {
	BasePath                     string              `json:"basePath"`
	DefaultCollectionReplication int                 `json:"defaultCollectionReplication"`
	BlobSignatureTTL             int64               `json:"blobSignatureTtl"`
	GitURL                       string              `json:"gitUrl"`
	Schemas                      map[string]Schema   `json:"schemas"`
	Resources                    map[string]Resource `json:"resources"`
}

DiscoveryDocument is the Arvados server's description of itself.

type Duration

type Duration time.Duration

Duration is time.Duration but looks like "12s" in JSON, rather than a number of nanoseconds.

func (Duration) Duration

func (d Duration) Duration() time.Duration

Duration returns a time.Duration.

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (*Duration) Set

func (d *Duration) Set(s string) error

Set implements the flag.Value interface and sets the duration value by using time.ParseDuration to parse the string.

func (Duration) String

func (d Duration) String() string

String returns a format similar to (time.Duration)String() but with "0m" and "0s" removed: e.g., "1h" instead of "1h0m0s".

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaler.

type File

type File interface {
	io.Reader
	io.Writer
	io.Closer
	io.Seeker
	Size() int64
	Readdir(int) ([]os.FileInfo, error)
	Stat() (os.FileInfo, error)
	Truncate(int64) error
	Sync() error
}

A File is an *os.File-like interface for reading and writing files in a FileSystem.

type FileSystem

type FileSystem interface {
	http.FileSystem

	// analogous to os.Stat()
	Stat(name string) (os.FileInfo, error)

	// analogous to os.Create(): create/truncate a file and open it O_RDWR.
	Create(name string) (File, error)

	// Like os.OpenFile(): create or open a file or directory.
	//
	// If flag&os.O_EXCL==0, it opens an existing file or
	// directory if one exists. If flag&os.O_CREATE!=0, it creates
	// a new empty file or directory if one does not already
	// exist.
	//
	// When creating a new item, perm&os.ModeDir determines
	// whether it is a file or a directory.
	//
	// A file can be opened multiple times and used concurrently
	// from multiple goroutines. However, each File object should
	// be used by only one goroutine at a time.
	OpenFile(name string, flag int, perm os.FileMode) (File, error)

	Mkdir(name string, perm os.FileMode) error
	Remove(name string) error
	RemoveAll(name string) error
	Rename(oldname, newname string) error

	// Write buffered data from memory to storage, returning when
	// all updates have been saved to persistent storage.
	Sync() error

	// Write buffered data from memory to storage, but don't wait
	// for all writes to finish before returning. If shortBlocks
	// is true, flush everything; otherwise, if there's less than
	// a full block of buffered data at the end of a stream, leave
	// it buffered in memory in case more data can be appended. If
	// path is "", flush all dirs/streams; otherwise, flush only
	// the specified dir/stream.
	Flush(path string, shortBlocks bool) error

	// Estimate current memory usage.
	MemorySize() int64
	// contains filtered or unexported methods
}

A FileSystem is an http.Filesystem plus Stat() and support for opening writable files. All methods are safe to call from multiple goroutines.

type Filter

type Filter struct {
	Attr     string
	Operator string
	Operand  interface{}
}

A Filter restricts the set of records returned by a list/index API.

func (*Filter) MarshalJSON

func (f *Filter) MarshalJSON() ([]byte, error)

MarshalJSON encodes a Filter to a JSON array.

func (*Filter) UnmarshalJSON

func (f *Filter) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes a JSON array to a Filter.

type GetOptions

type GetOptions struct {
	UUID         string   `json:"uuid,omitempty"`
	Select       []string `json:"select"`
	IncludeTrash bool     `json:"include_trash"`
	ForwardedFor string   `json:"forwarded_for,omitempty"`
	Remote       string   `json:"remote,omitempty"`
}

type Group

type Group struct {
	UUID                 string                 `json:"uuid"`
	Name                 string                 `json:"name"`
	OwnerUUID            string                 `json:"owner_uuid"`
	GroupClass           string                 `json:"group_class"`
	Etag                 string                 `json:"etag"`
	Href                 string                 `json:"href"`
	TrashAt              *time.Time             `json:"trash_at"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedAt           time.Time              `json:"modified_at"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	DeleteAt             *time.Time             `json:"delete_at"`
	IsTrashed            bool                   `json:"is_trashed"`
	Properties           map[string]interface{} `json:"properties"`
	WritableBy           []string               `json:"writable_by,omitempty"`
	Description          string                 `json:"description"`
}

Group is an arvados#group record

type GroupContentsOptions

type GroupContentsOptions struct {
	ClusterID          string   `json:"cluster_id"`
	UUID               string   `json:"uuid,omitempty"`
	Select             []string `json:"select"`
	Filters            []Filter `json:"filters"`
	Limit              int64    `json:"limit"`
	Offset             int64    `json:"offset"`
	Order              []string `json:"order"`
	Distinct           bool     `json:"distinct"`
	Count              string   `json:"count"`
	Include            string   `json:"include"`
	Recursive          bool     `json:"recursive"`
	IncludeTrash       bool     `json:"include_trash"`
	IncludeOldVersions bool     `json:"include_old_versions"`
	ExcludeHomeProject bool     `json:"exclude_home_project"`
}

type GroupList

type GroupList struct {
	Items          []Group       `json:"items"`
	ItemsAvailable int           `json:"items_available"`
	Offset         int           `json:"offset"`
	Limit          int           `json:"limit"`
	Included       []interface{} `json:"included"`
}

GroupList is an arvados#groupList resource.

type InstanceType

type InstanceType struct {
	Name            string
	ProviderType    string
	VCPUs           int
	RAM             ByteSize
	Scratch         ByteSize
	IncludedScratch ByteSize
	AddedScratch    ByteSize
	Price           float64
	Preemptible     bool
}

type InstanceTypeMap

type InstanceTypeMap map[string]InstanceType

func (*InstanceTypeMap) UnmarshalJSON

func (it *InstanceTypeMap) UnmarshalJSON(data []byte) error

UnmarshalJSON handles old config files that provide an array of instance types instead of a hash.

type Job

type Job struct {
	UUID                   string                 `json:"uuid"`
	Etag                   string                 `json:"etag"`
	OwnerUUID              string                 `json:"owner_uuid"`
	ModifiedByClientUUID   string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID     string                 `json:"modified_by_user_uuid"`
	ModifiedAt             time.Time              `json:"modified_at"`
	SubmitID               string                 `json:"submit_id"`
	Script                 string                 `json:"script"`
	CancelledByClientUUID  string                 `json:"cancelled_by_client_uuid"`
	CancelledByUserUUID    string                 `json:"cancelled_by_user_uuid"`
	CancelledAt            time.Time              `json:"cancelled_at"`
	StartedAt              time.Time              `json:"started_at"`
	FinishedAt             time.Time              `json:"finished_at"`
	Running                bool                   `json:"running"`
	Success                bool                   `json:"success"`
	Output                 string                 `json:"output"`
	CreatedAt              time.Time              `json:"created_at"`
	UpdatedAt              time.Time              `json:"updated_at"`
	IsLockedByUUID         string                 `json:"is_locked_by_uuid"`
	Log                    string                 `json:"log"`
	TasksSummary           map[string]interface{} `json:"tasks_summary"`
	RuntimeConstraints     map[string]interface{} `json:"runtime_constraints"`
	Nondeterministic       bool                   `json:"nondeterministic"`
	Repository             string                 `json:"repository"`
	SuppliedScriptVersion  string                 `json:"supplied_script_version"`
	DockerImageLocator     string                 `json:"docker_image_locator"`
	Priority               int                    `json:"priority"`
	Description            string                 `json:"description"`
	State                  string                 `json:"state"`
	ArvadosSDKVersion      string                 `json:"arvados_sdk_version"`
	Components             map[string]interface{} `json:"components"`
	ScriptParametersDigest string                 `json:"script_parameters_digest"`
	WritableBy             []string               `json:"writable_by,omitempty"`
}

Job is an arvados#job record

type KeepMount

type KeepMount struct {
	UUID           string          `json:"uuid"`
	DeviceID       string          `json:"device_id"`
	ReadOnly       bool            `json:"read_only"`
	Replication    int             `json:"replication"`
	StorageClasses map[string]bool `json:"storage_classes"`
}

type KeepService

type KeepService struct {
	UUID           string    `json:"uuid"`
	ServiceHost    string    `json:"service_host"`
	ServicePort    int       `json:"service_port"`
	ServiceSSLFlag bool      `json:"service_ssl_flag"`
	ServiceType    string    `json:"service_type"`
	ReadOnly       bool      `json:"read_only"`
	CreatedAt      time.Time `json:"created_at"`
	ModifiedAt     time.Time `json:"modified_at"`
}

KeepService is an arvados#keepService record

func (*KeepService) Index

func (s *KeepService) Index(ctx context.Context, c *Client, prefix string) ([]KeepServiceIndexEntry, error)

Index returns an unsorted list of blocks that can be retrieved from this server.

func (*KeepService) IndexMount

func (s *KeepService) IndexMount(ctx context.Context, c *Client, mountUUID string, prefix string) ([]KeepServiceIndexEntry, error)

IndexMount returns an unsorted list of blocks at the given mount point.

func (*KeepService) Mounts

func (s *KeepService) Mounts(c *Client) ([]KeepMount, error)

func (*KeepService) String

func (s *KeepService) String() string

String implements fmt.Stringer

func (*KeepService) Touch

func (s *KeepService) Touch(ctx context.Context, c *Client, blk string) error

Touch updates the timestamp on the given block.

func (*KeepService) Untrash

func (s *KeepService) Untrash(ctx context.Context, c *Client, blk string) error

Untrash moves/copies the given block out of trash.

type KeepServiceIndexEntry

type KeepServiceIndexEntry struct {
	SizedDigest
	// Time of last write, in nanoseconds since Unix epoch
	Mtime int64
}

KeepServiceIndexEntry is what a keep service's index response tells us about a stored block.

type KeepServiceList

type KeepServiceList struct {
	Items          []KeepService `json:"items"`
	ItemsAvailable int           `json:"items_available"`
	Offset         int           `json:"offset"`
	Limit          int           `json:"limit"`
}

KeepServiceList is an arvados#keepServiceList record

type Link struct {
	UUID       string                 `json:"uuid,omiempty"`
	OwnerUUID  string                 `json:"owner_uuid"`
	Name       string                 `json:"name"`
	LinkClass  string                 `json:"link_class"`
	HeadUUID   string                 `json:"head_uuid"`
	HeadKind   string                 `json:"head_kind"`
	TailUUID   string                 `json:"tail_uuid"`
	TailKind   string                 `json:"tail_kind"`
	Properties map[string]interface{} `json:"properties"`
}

Link is an arvados#link record

type LinkList struct {
	Items          []Link `json:"items"`
	ItemsAvailable int    `json:"items_available"`
	Offset         int    `json:"offset"`
	Limit          int    `json:"limit"`
}

LinkList is an arvados#linkList resource.

type ListOptions

type ListOptions struct {
	ClusterID          string                 `json:"cluster_id"`
	Select             []string               `json:"select"`
	Filters            []Filter               `json:"filters"`
	Where              map[string]interface{} `json:"where"`
	Limit              int64                  `json:"limit"`
	Offset             int64                  `json:"offset"`
	Order              []string               `json:"order"`
	Distinct           bool                   `json:"distinct"`
	Count              string                 `json:"count"`
	IncludeTrash       bool                   `json:"include_trash"`
	IncludeOldVersions bool                   `json:"include_old_versions"`
	BypassFederation   bool                   `json:"bypass_federation"`
	ForwardedFor       string                 `json:"forwarded_for,omitempty"`
	Include            string                 `json:"include"`
}

type Log

type Log struct {
	ID              uint64                 `json:"id"`
	UUID            string                 `json:"uuid"`
	ObjectUUID      string                 `json:"object_uuid"`
	ObjectOwnerUUID string                 `json:"object_owner_uuid"`
	EventType       string                 `json:"event_type"`
	EventAt         *time.Time             `json:"event"`
	Properties      map[string]interface{} `json:"properties"`
	CreatedAt       *time.Time             `json:"created_at"`
}

Log is an arvados#log record

type LogList

type LogList struct {
	Items          []Log `json:"items"`
	ItemsAvailable int   `json:"items_available"`
	Offset         int   `json:"offset"`
	Limit          int   `json:"limit"`
}

LogList is an arvados#logList resource.

type LoginOptions

type LoginOptions struct {
	ReturnTo string `json:"return_to"`        // On success, redirect to this target with api_token=xxx query param
	Remote   string `json:"remote,omitempty"` // Salt token for remote Cluster ID
	Code     string `json:"code,omitempty"`   // OAuth2 callback code
	State    string `json:"state,omitempty"`  // OAuth2 callback state
}

type LoginResponse

type LoginResponse struct {
	RedirectLocation string       `json:"redirect_location,omitempty"`
	HTML             bytes.Buffer `json:"-"`
}

func (LoginResponse) ServeHTTP

func (resp LoginResponse) ServeHTTP(w http.ResponseWriter, req *http.Request)

type LogoutOptions

type LogoutOptions struct {
	ReturnTo string `json:"return_to"` // Redirect to this URL after logging out
}

type LogoutResponse

type LogoutResponse struct {
	RedirectLocation string `json:"redirect_location,omitempty"`
}

func (LogoutResponse) ServeHTTP

func (resp LogoutResponse) ServeHTTP(w http.ResponseWriter, req *http.Request)

type MethodResponse

type MethodResponse struct {
	Ref string `json:"$ref"`
}

type Mount

type Mount struct {
	Kind              string      `json:"kind"`
	Writable          bool        `json:"writable"`
	PortableDataHash  string      `json:"portable_data_hash"`
	UUID              string      `json:"uuid"`
	DeviceType        string      `json:"device_type"`
	Path              string      `json:"path"`
	Content           interface{} `json:"content"`
	ExcludeFromOutput bool        `json:"exclude_from_output"`
	Capacity          int64       `json:"capacity"`
	Commit            string      `json:"commit"`          // only if kind=="git_tree"
	RepositoryName    string      `json:"repository_name"` // only if kind=="git_tree"
	GitURL            string      `json:"git_url"`         // only if kind=="git_tree"
}

Mount is special behavior to attach to a filesystem path or device.

type Node

type Node struct {
	UUID       string         `json:"uuid"`
	Domain     string         `json:"domain"`
	Hostname   string         `json:"hostname"`
	IPAddress  string         `json:"ip_address"`
	LastPingAt *time.Time     `json:"last_ping_at"`
	SlotNumber int            `json:"slot_number"`
	Status     string         `json:"status"`
	JobUUID    string         `json:"job_uuid"`
	Properties NodeProperties `json:"properties"`
}

Node is an arvados#node resource.

type NodeList

type NodeList struct {
	Items          []Node `json:"items"`
	ItemsAvailable int    `json:"items_available"`
	Offset         int    `json:"offset"`
	Limit          int    `json:"limit"`
}

NodeList is an arvados#nodeList resource.

type NodeProperties

type NodeProperties struct {
	CloudNode      NodePropertiesCloudNode `json:"cloud_node"`
	TotalCPUCores  int                     `json:"total_cpu_cores,omitempty"`
	TotalScratchMB int64                   `json:"total_scratch_mb,omitempty"`
	TotalRAMMB     int64                   `json:"total_ram_mb,omitempty"`
}

type NodePropertiesCloudNode

type NodePropertiesCloudNode struct {
	Size  string  `json:"size,omitempty"`
	Price float64 `json:"price"`
}

type ObjectList

type ObjectList struct {
	Included       []interface{} `json:"included"`
	Items          []interface{} `json:"items"`
	ItemsAvailable int           `json:"items_available"`
	Offset         int           `json:"offset"`
	Limit          int           `json:"limit"`
}

ObjectList is an arvados#objectList resource.

type PipelineInstance

type PipelineInstance struct {
	UUID                 string                 `json:"uuid"`
	Etag                 string                 `json:"etag"`
	OwnerUUID            string                 `json:"owner_uuid"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	ModifiedAt           time.Time              `json:"modified_at"`
	PipelineTemplateUUID string                 `json:"pipeline_template_uuid"`
	Name                 string                 `json:"name"`
	Components           map[string]interface{} `json:"components"`
	UpdatedAt            time.Time              `json:"updated_at"`
	Properties           map[string]interface{} `json:"properties"`
	State                string                 `json:"state"`
	ComponentsSummary    map[string]interface{} `json:"components_summary"`
	StartedAt            time.Time              `json:"started_at"`
	FinishedAt           time.Time              `json:"finished_at"`
	Description          string                 `json:"description"`
	WritableBy           []string               `json:"writable_by,omitempty"`
}

PipelineInstance is an arvados#pipelineInstance record

type PipelineTemplate

type PipelineTemplate struct {
	UUID                 string                 `json:"uuid"`
	Etag                 string                 `json:"etag"`
	OwnerUUID            string                 `json:"owner_uuid"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	ModifiedAt           time.Time              `json:"modified_at"`
	Name                 string                 `json:"name"`
	Components           map[string]interface{} `json:"components"`
	UpdatedAt            time.Time              `json:"updated_at"`
	Description          string                 `json:"description"`
	WritableBy           []string               `json:"writable_by,omitempty"`
}

PipelineTemplate is an arvados#pipelineTemplate record

type PostgreSQL

type PostgreSQL struct {
	Connection     PostgreSQLConnection
	ConnectionPool int
}

type PostgreSQLConnection

type PostgreSQLConnection map[string]string

func (PostgreSQLConnection) String

func (c PostgreSQLConnection) String() string

type RemoteCluster

type RemoteCluster struct {
	Host          string
	Proxy         bool
	Scheme        string
	Insecure      bool
	ActivateUsers bool
}

type Resource

type Resource struct {
	Methods map[string]ResourceMethod `json:"methods"`
}

type ResourceListParams

type ResourceListParams struct {
	Select             []string `json:"select,omitempty"`
	Filters            []Filter `json:"filters,omitempty"`
	IncludeTrash       bool     `json:"include_trash,omitempty"`
	IncludeOldVersions bool     `json:"include_old_versions,omitempty"`
	Limit              *int     `json:"limit,omitempty"`
	Offset             int      `json:"offset,omitempty"`
	Order              string   `json:"order,omitempty"`
	Distinct           bool     `json:"distinct,omitempty"`
	Count              string   `json:"count,omitempty"`
}

ResourceListParams expresses which results are requested in a list/index API.

type ResourceMethod

type ResourceMethod struct {
	HTTPMethod string         `json:"httpMethod"`
	Path       string         `json:"path"`
	Response   MethodResponse `json:"response"`
}

type RuntimeConstraints

type RuntimeConstraints struct {
	API          bool  `json:"API"`
	RAM          int64 `json:"ram"`
	VCPUs        int   `json:"vcpus"`
	KeepCacheRAM int64 `json:"keep_cache_ram"`
}

RuntimeConstraints specify a container's compute resources (RAM, CPU) and network connectivity.

type S3VolumeDriverParameters

type S3VolumeDriverParameters struct {
	IAMRole            string
	AccessKeyID        string
	SecretAccessKey    string
	Endpoint           string
	Region             string
	Bucket             string
	LocationConstraint bool
	V2Signature        bool
	UseAWSS3v2Driver   bool
	IndexPageSize      int
	ConnectTimeout     Duration
	ReadTimeout        Duration
	RaceWindow         Duration
	UnsafeDelete       bool
}

type SchedulingParameters

type SchedulingParameters struct {
	Partitions  []string `json:"partitions"`
	Preemptible bool     `json:"preemptible"`
	MaxRunTime  int      `json:"max_run_time"`
}

SchedulingParameters specify a container's scheduling parameters such as Partitions

type Schema

type Schema struct {
	UUIDPrefix string `json:"uuidPrefix"`
}

type Service

type Service struct {
	InternalURLs map[URL]ServiceInstance
	ExternalURL  URL
}

type ServiceInstance

type ServiceInstance struct {
	Rendezvous string `json:",omitempty"`
}

type ServiceName

type ServiceName string
const (
	ServiceNameRailsAPI      ServiceName = "arvados-api-server"
	ServiceNameController    ServiceName = "arvados-controller"
	ServiceNameDispatchCloud ServiceName = "arvados-dispatch-cloud"
	ServiceNameHealth        ServiceName = "arvados-health"
	ServiceNameWorkbench1    ServiceName = "arvados-workbench1"
	ServiceNameWorkbench2    ServiceName = "arvados-workbench2"
	ServiceNameWebsocket     ServiceName = "arvados-ws"
	ServiceNameKeepbalance   ServiceName = "keep-balance"
	ServiceNameKeepweb       ServiceName = "keep-web"
	ServiceNameKeepproxy     ServiceName = "keepproxy"
	ServiceNameKeepstore     ServiceName = "keepstore"
)

type Services

type Services struct {
	Composer       Service
	Controller     Service
	DispatchCloud  Service
	GitHTTP        Service
	GitSSH         Service
	Health         Service
	Keepbalance    Service
	Keepproxy      Service
	Keepstore      Service
	RailsAPI       Service
	WebDAVDownload Service
	WebDAV         Service
	WebShell       Service
	Websocket      Service
	Workbench1     Service
	Workbench2     Service
}

func (Services) Map

func (svcs Services) Map() map[ServiceName]Service

Map returns all services as a map, suitable for iterating over all services or looking up a service by name.

type SizedDigest

type SizedDigest string

SizedDigest is a minimal Keep block locator: hash+size

func (SizedDigest) Size

func (sd SizedDigest) Size() int64

Size returns the size of the data block, in bytes.

type Specimen

type Specimen struct {
	UUID                 string                 `json:"uuid"`
	OwnerUUID            string                 `json:"owner_uuid"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedAt           time.Time              `json:"modified_at"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	Properties           map[string]interface{} `json:"properties"`
}

type SpecimenList

type SpecimenList struct {
	Items          []Specimen `json:"items"`
	ItemsAvailable int        `json:"items_available"`
	Offset         int        `json:"offset"`
	Limit          int        `json:"limit"`
}

type StringSet

type StringSet map[string]struct{}

func (*StringSet) UnmarshalJSON

func (ss *StringSet) UnmarshalJSON(data []byte) error

UnmarshalJSON handles old config files that provide an array of instance types instead of a hash.

type TestUser

type TestUser struct {
	Email    string
	Password string
}

type Trait

type Trait struct {
	UUID                 string                 `json:"uuid"`
	Etag                 string                 `json:"etag"`
	OwnerUUID            string                 `json:"owner_uuid"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	ModifiedAt           time.Time              `json:"modified_at"`
	Name                 string                 `json:"name"`
	Properties           map[string]interface{} `json:"properties"`
	UpdatedAt            time.Time              `json:"updated_at"`
	WritableBy           []string               `json:"writable_by,omitempty"`
}

Trait is an arvados#trait record

type TransactionError

type TransactionError struct {
	Method     string
	URL        url.URL
	StatusCode int
	Status     string
	Errors     []string
}

func (TransactionError) Error

func (e TransactionError) Error() (s string)

func (TransactionError) HTTPStatus

func (e TransactionError) HTTPStatus() int

type URL

type URL url.URL

URL is a url.URL that is also usable as a JSON key/value.

func (URL) MarshalText

func (su URL) MarshalText() ([]byte, error)

func (URL) String

func (su URL) String() string

func (*URL) UnmarshalText

func (su *URL) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler so URL can be used as a JSON key/value.

type UntrashOptions

type UntrashOptions struct {
	UUID             string `json:"uuid"`
	EnsureUniqueName bool   `json:"ensure_unique_name"`
}

type UpdateOptions

type UpdateOptions struct {
	UUID             string                 `json:"uuid"`
	Attrs            map[string]interface{} `json:"attrs"`
	BypassFederation bool                   `json:"bypass_federation"`
}

type UpdateUUIDOptions

type UpdateUUIDOptions struct {
	UUID    string `json:"uuid"`
	NewUUID string `json:"new_uuid"`
}

type UploadDownloadPermission

type UploadDownloadPermission struct {
	Upload   bool
	Download bool
}

type UploadDownloadRolePermissions

type UploadDownloadRolePermissions struct {
	User  UploadDownloadPermission
	Admin UploadDownloadPermission
}

type User

type User struct {
	UUID                 string                 `json:"uuid"`
	Etag                 string                 `json:"etag"`
	IsActive             bool                   `json:"is_active"`
	IsAdmin              bool                   `json:"is_admin"`
	Username             string                 `json:"username"`
	Email                string                 `json:"email"`
	FullName             string                 `json:"full_name"`
	FirstName            string                 `json:"first_name"`
	LastName             string                 `json:"last_name"`
	IdentityURL          string                 `json:"identity_url"`
	IsInvited            bool                   `json:"is_invited"`
	OwnerUUID            string                 `json:"owner_uuid"`
	CreatedAt            time.Time              `json:"created_at"`
	ModifiedAt           time.Time              `json:"modified_at"`
	ModifiedByUserUUID   string                 `json:"modified_by_user_uuid"`
	ModifiedByClientUUID string                 `json:"modified_by_client_uuid"`
	Prefs                map[string]interface{} `json:"prefs"`
	WritableBy           []string               `json:"writable_by,omitempty"`
}

User is an arvados#user record

type UserActivateOptions

type UserActivateOptions struct {
	UUID string `json:"uuid"`
}

type UserAuthenticateOptions

type UserAuthenticateOptions struct {
	Username string `json:"username,omitempty"` // PAM username
	Password string `json:"password,omitempty"` // PAM password
}

type UserBatchUpdateOptions

type UserBatchUpdateOptions struct {
	Updates map[string]map[string]interface{} `json:"updates"`
}

type UserBatchUpdateResponse

type UserBatchUpdateResponse struct{}

type UserList

type UserList struct {
	Items          []User `json:"items"`
	ItemsAvailable int    `json:"items_available"`
	Offset         int    `json:"offset"`
	Limit          int    `json:"limit"`
}

UserList is an arvados#userList resource.

type UserMergeOptions

type UserMergeOptions struct {
	NewUserUUID       string `json:"new_user_uuid,omitempty"`
	OldUserUUID       string `json:"old_user_uuid,omitempty"`
	NewOwnerUUID      string `json:"new_owner_uuid,omitempty"`
	NewUserToken      string `json:"new_user_token,omitempty"`
	RedirectToNewUser bool   `json:"redirect_to_new_user"`
}

type UserSetupOptions

type UserSetupOptions struct {
	UUID                  string                 `json:"uuid,omitempty"`
	Email                 string                 `json:"email,omitempty"`
	OpenIDPrefix          string                 `json:"openid_prefix,omitempty"`
	RepoName              string                 `json:"repo_name,omitempty"`
	VMUUID                string                 `json:"vm_uuid,omitempty"`
	SendNotificationEmail bool                   `json:"send_notification_email,omitempty"`
	Attrs                 map[string]interface{} `json:"attrs"`
}

type VirtualMachine

type VirtualMachine struct {
	UUID               string     `json:"uuid"`
	OwnerUUID          string     `json:"owner_uuid"`
	Hostname           string     `json:"hostname"`
	CreatedAt          *time.Time `json:"created_at"`
	ModifiedAt         *time.Time `json:"modified_at"`
	ModifiedByUserUUID string     `json:"modified_by_user_uuid"`
}

VirtualMachine is an arvados#virtualMachine resource.

type VirtualMachineList

type VirtualMachineList struct {
	Items          []VirtualMachine `json:"items"`
	ItemsAvailable int              `json:"items_available"`
	Offset         int              `json:"offset"`
	Limit          int              `json:"limit"`
}

VirtualMachineList is an arvados#virtualMachineList resource.

type Volume

type Volume struct {
	AccessViaHosts   map[URL]VolumeAccess
	ReadOnly         bool
	Replication      int
	StorageClasses   map[string]bool
	Driver           string
	DriverParameters json.RawMessage
}

type VolumeAccess

type VolumeAccess struct {
	ReadOnly bool
}

type WebDAVCacheConfig

type WebDAVCacheConfig struct {
	TTL                  Duration
	UUIDTTL              Duration
	MaxBlockEntries      int
	MaxCollectionEntries int
	MaxCollectionBytes   int64
	MaxPermissionEntries int
	MaxUUIDEntries       int
	MaxSessions          int
}

type Workflow

type Workflow struct {
	UUID        string     `json:"uuid"`
	OwnerUUID   string     `json:"owner_uuid"`
	Name        string     `json:"name"`
	Description string     `json:"description"`
	Definition  string     `json:"definition"`
	CreatedAt   *time.Time `json:"created_at"`
	ModifiedAt  *time.Time `json:"modified_at"`
}

Workflow is an arvados#workflow resource.

type WorkflowList

type WorkflowList struct {
	Items          []Workflow `json:"items"`
	ItemsAvailable int        `json:"items_available"`
	Offset         int        `json:"offset"`
	Limit          int        `json:"limit"`
}

WorkflowList is an arvados#workflowList resource.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL