Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- type ClustersAPI
- func (a ClustersAPI) Create(cluster httpmodels.CreateReq) (httpmodels.CreateResp, error)
- func (a ClustersAPI) Delete(clusterID string) error
- func (a ClustersAPI) Edit(editReq httpmodels.EditReq) error
- func (a ClustersAPI) Events(clusterID string, startTime, endTime int64, order models.ListOrder, ...) (httpmodels.EventsResp, error)
- func (a ClustersAPI) Get(clusterID string) (httpmodels.GetResp, error)
- func (a ClustersAPI) List() ([]httpmodels.GetResp, error)
- func (a ClustersAPI) ListNodeTypes() ([]httpmodels.ListNodeTypesRespItem, error)
- func (a ClustersAPI) PermanentDelete(clusterID string) error
- func (a ClustersAPI) Pin(clusterID string) error
- func (a ClustersAPI) Resize(clusterID string, clusterSize models.ClusterSize) error
- func (a ClustersAPI) Restart(clusterID string) error
- func (a ClustersAPI) SparkVersions() ([]httpmodels.SparkVersionsRespItem, error)
- func (a ClustersAPI) Start(clusterID string) error
- func (a ClustersAPI) Terminate(clusterID string) error
- func (a ClustersAPI) Unpin(clusterID string) error
- type DBClient
- func (c DBClient) Clusters() ClustersAPI
- func (c DBClient) Dbfs() DbfsAPI
- func (c DBClient) Groups() GroupsAPI
- func (c *DBClient) Init(option databricks.DBClientOption) DBClient
- func (c DBClient) InstancePools() InstancePoolsAPI
- func (c DBClient) Jobs() JobsAPI
- func (c DBClient) Libraries() LibrariesAPI
- func (c DBClient) Scim() ScimAPI
- func (c DBClient) Secrets() SecretsAPI
- func (c DBClient) Token() TokenAPI
- func (c DBClient) Workspace() WorkspaceAPI
- type DbfsAPI
- func (a DbfsAPI) AddBlock(handle int64, data []byte) error
- func (a DbfsAPI) Close(handle int64) error
- func (a DbfsAPI) Create(path string, overwrite bool) (DbfsCreateResponse, error)
- func (a DbfsAPI) Delete(path string, recursive bool) error
- func (a DbfsAPI) GetStatus(path string) (models.FileInfo, error)
- func (a DbfsAPI) List(path string) ([]models.FileInfo, error)
- func (a DbfsAPI) Mkdirs(path string) error
- func (a DbfsAPI) Move(sourcePath, destinationPath string) error
- func (a DbfsAPI) Put(path string, contents []byte, overwrite bool) error
- func (a DbfsAPI) Read(path string, offset, length int64) (DbfsReadResponse, error)
- type DbfsCreateResponse
- type DbfsListResponse
- type DbfsReadResponse
- type GroupsAPI
- func (a GroupsAPI) AddMember(principalName models.PrincipalName, parentName string) error
- func (a GroupsAPI) Create(groupName string) (GroupsCreateResponse, error)
- func (a GroupsAPI) Delete(groupName string) error
- func (a GroupsAPI) List() ([]string, error)
- func (a GroupsAPI) ListMembers(groupName string) ([]models.PrincipalName, error)
- func (a GroupsAPI) ListParents(principalName models.PrincipalName) ([]string, error)
- func (a GroupsAPI) RemoveMember(principalName models.PrincipalName, parentName string) error
- type GroupsCreateResponse
- type InstancePoolsAPI
- type JobsAPI
- func (a JobsAPI) Create(jobSettings models.JobSettings) (models.Job, error)
- func (a JobsAPI) Delete(jobID int64) error
- func (a JobsAPI) Get(jobID int64) (models.Job, error)
- func (a JobsAPI) List() ([]models.Job, error)
- func (a JobsAPI) Reset(jobID int64, jobSettings models.JobSettings) error
- func (a JobsAPI) RunNow(jobID int64, runParameters models.RunParameters) (models.Run, error)
- func (a JobsAPI) RunsCancel(runID int64) error
- func (a JobsAPI) RunsDelete(runID int64) error
- func (a JobsAPI) RunsExport(runID int64) ([]models.ViewItem, error)
- func (a JobsAPI) RunsGet(runID int64) (models.Run, error)
- func (a JobsAPI) RunsGetOutput(runID int64) (JobsRunsGetOutputResponse, error)
- func (a JobsAPI) RunsList(activeOnly, completedOnly bool, jobID int64, offset, limit int32) (JobsRunsListResponse, error)
- func (a JobsAPI) RunsSubmit(runName string, clusterSpec models.ClusterSpec, jobTask models.JobTask, ...) (models.Run, error)
- type JobsListResponse
- type JobsRunsGetOutputResponse
- type JobsRunsListResponse
- type LibrariesAPI
- func (a LibrariesAPI) AllClusterStatuses() ([]models.ClusterLibraryStatuses, error)
- func (a LibrariesAPI) ClusterStatus(clusterID string) (LibrariesClusterStatusResponse, error)
- func (a LibrariesAPI) Install(clusterID string, libraries []models.Library) error
- func (a LibrariesAPI) Uninstall(clusterID string, libraries []models.Library) error
- type LibrariesClusterStatusResponse
- type ScimAPI
- type SecretsAPI
- func (a SecretsAPI) Create(lifetimeSeconds int64, comment string) (TokenCreateResponse, error)
- func (a SecretsAPI) CreateSecretScope(scope, initialManagePrincipal string) error
- func (a SecretsAPI) DeleteSecret(scope, key string) error
- func (a SecretsAPI) DeleteSecretACL(scope, principal string) error
- func (a SecretsAPI) DeleteSecretScope(scope string) error
- func (a SecretsAPI) GetSecretACL(scope, principal string) (models.AclItem, error)
- func (a SecretsAPI) List() ([]models.PublicTokenInfo, error)
- func (a SecretsAPI) ListSecretACLs(scope string) ([]models.AclItem, error)
- func (a SecretsAPI) ListSecretScopes() ([]models.SecretScope, error)
- func (a SecretsAPI) ListSecrets(scope string) ([]models.SecretMetadata, error)
- func (a SecretsAPI) PutSecret(bytesValue []byte, scope, key string) error
- func (a SecretsAPI) PutSecretACL(scope, principal string, permission models.AclPermission) error
- func (a SecretsAPI) PutSecretString(stringValue, scope, key string) error
- func (a SecretsAPI) Revoke(tokenID string) error
- type TokenAPI
- type TokenCreateResponse
- type WorkspaceAPI
- func (a WorkspaceAPI) Delete(path string, recursive bool) error
- func (a WorkspaceAPI) Export(path string, format models.ExportFormat, directDownload bool) ([]byte, error)
- func (a WorkspaceAPI) GetStatus(path string) (models.ObjectInfo, error)
- func (a WorkspaceAPI) Import(path string, format models.ExportFormat, language models.Language, ...) error
- func (a WorkspaceAPI) List(path string) ([]models.ObjectInfo, error)
- func (a WorkspaceAPI) Mkdirs(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClustersAPI ¶
type ClustersAPI struct {
Client DBClient
}
ClustersAPI exposes the Clusters API
func (ClustersAPI) Create ¶
func (a ClustersAPI) Create(cluster httpmodels.CreateReq) (httpmodels.CreateResp, error)
Create creates a new Spark cluster
func (ClustersAPI) Delete ¶
func (a ClustersAPI) Delete(clusterID string) error
Delete is an alias of Terminate
func (ClustersAPI) Edit ¶
func (a ClustersAPI) Edit(editReq httpmodels.EditReq) error
Edit edits the configuration of a cluster to match the provided attributes and size
func (ClustersAPI) Events ¶
func (a ClustersAPI) Events( clusterID string, startTime, endTime int64, order models.ListOrder, eventTypes []models.ClusterEventType, offset, limit int64) (httpmodels.EventsResp, error)
Events retrieves a list of events about the activity of a cluster
func (ClustersAPI) Get ¶
func (a ClustersAPI) Get(clusterID string) (httpmodels.GetResp, error)
Get retrieves the information for a cluster given its identifier
func (ClustersAPI) List ¶
func (a ClustersAPI) List() ([]httpmodels.GetResp, error)
List return information about all pinned clusters, currently active clusters, up to 70 of the most recently terminated interactive clusters in the past 30 days, and up to 30 of the most recently terminated job clusters in the past 30 days
func (ClustersAPI) ListNodeTypes ¶
func (a ClustersAPI) ListNodeTypes() ([]httpmodels.ListNodeTypesRespItem, error)
ListNodeTypes returns a list of supported Spark node types
func (ClustersAPI) PermanentDelete ¶
func (a ClustersAPI) PermanentDelete(clusterID string) error
PermanentDelete permanently delete a cluster
func (ClustersAPI) Pin ¶
func (a ClustersAPI) Pin(clusterID string) error
Pin ensure that an interactive cluster configuration is retained even after a cluster has been terminated for more than 30 days
func (ClustersAPI) Resize ¶
func (a ClustersAPI) Resize(clusterID string, clusterSize models.ClusterSize) error
Resize resizes a cluster to have a desired number of workers. This will fail unless the cluster is in a RUNNING state.
func (ClustersAPI) Restart ¶
func (a ClustersAPI) Restart(clusterID string) error
Restart restart a Spark cluster given its ID. If the cluster is not in a RUNNING state, nothing will happen.
func (ClustersAPI) SparkVersions ¶
func (a ClustersAPI) SparkVersions() ([]httpmodels.SparkVersionsRespItem, error)
SparkVersions return the list of available Spark versions
func (ClustersAPI) Start ¶
func (a ClustersAPI) Start(clusterID string) error
Start starts a terminated Spark cluster given its ID
func (ClustersAPI) Terminate ¶
func (a ClustersAPI) Terminate(clusterID string) error
Terminate terminates a Spark cluster given its ID
func (ClustersAPI) Unpin ¶
func (a ClustersAPI) Unpin(clusterID string) error
Unpin allows the cluster to eventually be removed from the list returned by the List API
type DBClient ¶
type DBClient struct {
Option databricks.DBClientOption
}
DBClient is the client for Azure implements DBClient
func (DBClient) Clusters ¶
func (c DBClient) Clusters() ClustersAPI
Clusters returns an instance of ClustersAPI
func (*DBClient) Init ¶
func (c *DBClient) Init(option databricks.DBClientOption) DBClient
Init initializes the client
func (DBClient) InstancePools ¶
func (c DBClient) InstancePools() InstancePoolsAPI
InstancePools returns an instance of InstancePoolsAPI
func (DBClient) Libraries ¶
func (c DBClient) Libraries() LibrariesAPI
Libraries returns an instance of LibrariesAPI
func (DBClient) Secrets ¶
func (c DBClient) Secrets() SecretsAPI
Secrets returns an instance of SecretsAPI
func (DBClient) Workspace ¶
func (c DBClient) Workspace() WorkspaceAPI
Workspace returns an instance of WorkspaceAPI
type DbfsAPI ¶
type DbfsAPI struct {
Client DBClient
}
DbfsAPI exposes the DBFS API
func (DbfsAPI) AddBlock ¶
AddBlock appends a block of data to the stream specified by the input handle
func (DbfsAPI) Create ¶
func (a DbfsAPI) Create(path string, overwrite bool) (DbfsCreateResponse, error)
Create opens a stream to write to a file and returns a handle to this stream
func (DbfsAPI) Delete ¶
Delete deletes the file or directory (optionally recursively delete all files in the directory)
func (DbfsAPI) Mkdirs ¶
Mkdirs creates the given directory and necessary parent directories if they do not exist
type DbfsCreateResponse ¶
type DbfsCreateResponse struct {
Handle int64 `json:"handle,omitempty" url:"handle,omitempty"`
}
DbfsCreateResponse is the response from Create
type DbfsListResponse ¶
type DbfsListResponse struct {
Files []models.FileInfo `json:"files,omitempty" url:"files,omitempty"`
}
DbfsListResponse is a list of FileInfo as a response of List
type DbfsReadResponse ¶
type DbfsReadResponse struct { BytesRead int64 `json:"bytes_read,omitempty" url:"bytes_read,omitempty"` Data []byte `json:"data,omitempty" url:"data,omitempty"` }
DbfsReadResponse is the response of reading a file
type GroupsAPI ¶
type GroupsAPI struct {
Client DBClient
}
GroupsAPI exposes the Groups API
func (GroupsAPI) AddMember ¶
func (a GroupsAPI) AddMember(principalName models.PrincipalName, parentName string) error
AddMember adds a user or group to a group
func (GroupsAPI) Create ¶
func (a GroupsAPI) Create(groupName string) (GroupsCreateResponse, error)
Create creates a new group with the given name
func (GroupsAPI) ListMembers ¶
func (a GroupsAPI) ListMembers(groupName string) ([]models.PrincipalName, error)
ListMembers returns all of the members of a particular group
func (GroupsAPI) ListParents ¶
func (a GroupsAPI) ListParents(principalName models.PrincipalName) ([]string, error)
ListParents retrieves all groups in which a given user or group is a member
func (GroupsAPI) RemoveMember ¶
func (a GroupsAPI) RemoveMember(principalName models.PrincipalName, parentName string) error
RemoveMember removes a user or group from a group
type GroupsCreateResponse ¶
type GroupsCreateResponse struct {
GroupName string `json:"group_name,omitempty" url:"group_name,omitempty"`
}
GroupsCreateResponse is a response with group name for Create
type InstancePoolsAPI ¶
type InstancePoolsAPI struct {
Client DBClient
}
InstancePoolsAPI exposes the InstancePools API
type JobsAPI ¶
type JobsAPI struct {
Client DBClient
}
JobsAPI exposes Jobs API endpoints
func (JobsAPI) Reset ¶
func (a JobsAPI) Reset(jobID int64, jobSettings models.JobSettings) error
Reset overwrites job settings
func (JobsAPI) RunsDelete ¶
RunsDelete deletes a non-active run. Returns an error if the run is active.
func (JobsAPI) RunsExport ¶
RunsExport exports and retrieve the job run task
func (JobsAPI) RunsGetOutput ¶
func (a JobsAPI) RunsGetOutput(runID int64) (JobsRunsGetOutputResponse, error)
RunsGetOutput retrieves the output of a run
type JobsListResponse ¶
JobsListResponse is the response type returned by JobsList
type JobsRunsGetOutputResponse ¶
type JobsRunsGetOutputResponse struct { NotebookOutput models.NotebookOutput `json:"notebook_output,omitempty" url:"notebook_output,omitempty"` Error string `json:"error,omitempty" url:"error,omitempty"` Metadata models.Run `json:"metadata,omitempty" url:"metadata,omitempty"` }
JobsRunsGetOutputResponse is the output of the run
type JobsRunsListResponse ¶
type JobsRunsListResponse struct { Runs []models.Run `json:"runs,omitempty" url:"runs,omitempty"` HasMore bool `json:"has_more,omitempty" url:"has_more,omitempty"` }
JobsRunsListResponse is the response type returned by RunsList
type LibrariesAPI ¶
type LibrariesAPI struct {
Client DBClient
}
LibrariesAPI exposes the Libraries API
func (LibrariesAPI) AllClusterStatuses ¶
func (a LibrariesAPI) AllClusterStatuses() ([]models.ClusterLibraryStatuses, error)
AllClusterStatuses gets the status of all libraries on all clusters
func (LibrariesAPI) ClusterStatus ¶
func (a LibrariesAPI) ClusterStatus(clusterID string) (LibrariesClusterStatusResponse, error)
ClusterStatus get the status of libraries on a cluster
type LibrariesClusterStatusResponse ¶
type LibrariesClusterStatusResponse struct { ClusterID string `json:"cluster_id,omitempty" url:"cluster_id,omitempty"` LibraryStatuses []models.LibraryFullStatus `json:"library_statuses,omitempty" url:"library_statuses,omitempty"` }
LibrariesClusterStatusResponse is a response from AllClusterStatuses
type SecretsAPI ¶
type SecretsAPI struct {
Client DBClient
}
SecretsAPI exposes the Secrets API
func (SecretsAPI) Create ¶
func (a SecretsAPI) Create(lifetimeSeconds int64, comment string) (TokenCreateResponse, error)
Create creates and return a token
func (SecretsAPI) CreateSecretScope ¶
func (a SecretsAPI) CreateSecretScope(scope, initialManagePrincipal string) error
CreateSecretScope creates a new secret scope
func (SecretsAPI) DeleteSecret ¶
func (a SecretsAPI) DeleteSecret(scope, key string) error
DeleteSecret deletes a secret depends on the type of scope backend
func (SecretsAPI) DeleteSecretACL ¶
func (a SecretsAPI) DeleteSecretACL(scope, principal string) error
DeleteSecretACL deletes the given ACL on the given scope
func (SecretsAPI) DeleteSecretScope ¶
func (a SecretsAPI) DeleteSecretScope(scope string) error
DeleteSecretScope deletes a secret scope
func (SecretsAPI) GetSecretACL ¶
func (a SecretsAPI) GetSecretACL(scope, principal string) (models.AclItem, error)
GetSecretACL describe the details about the given ACL, such as the group and permission
func (SecretsAPI) List ¶
func (a SecretsAPI) List() ([]models.PublicTokenInfo, error)
List lists all the valid tokens for a user-workspace pair
func (SecretsAPI) ListSecretACLs ¶
func (a SecretsAPI) ListSecretACLs(scope string) ([]models.AclItem, error)
ListSecretACLs lists the ACLs set on the given scope
func (SecretsAPI) ListSecretScopes ¶
func (a SecretsAPI) ListSecretScopes() ([]models.SecretScope, error)
ListSecretScopes lists all secret scopes available in the workspace
func (SecretsAPI) ListSecrets ¶
func (a SecretsAPI) ListSecrets(scope string) ([]models.SecretMetadata, error)
ListSecrets lists the secret keys that are stored at this scope
func (SecretsAPI) PutSecret ¶
func (a SecretsAPI) PutSecret(bytesValue []byte, scope, key string) error
PutSecret creates or modifies a bytes secret depends on the type of scope backend with
func (SecretsAPI) PutSecretACL ¶
func (a SecretsAPI) PutSecretACL(scope, principal string, permission models.AclPermission) error
PutSecretACL creates or overwrites the ACL associated with the given principal (user or group) on the specified scope point
func (SecretsAPI) PutSecretString ¶
func (a SecretsAPI) PutSecretString(stringValue, scope, key string) error
PutSecretString creates or modifies a string secret depends on the type of scope backend
func (SecretsAPI) Revoke ¶
func (a SecretsAPI) Revoke(tokenID string) error
Revoke revokes an access token
type TokenCreateResponse ¶
type TokenCreateResponse struct { TokenValue string `json:"token_value,omitempty" url:"token_value,omitempty"` TokenInfo models.PublicTokenInfo `json:"token_info,omitempty" url:"token_info,omitempty"` }
TokenCreateResponse is the response from Create
type WorkspaceAPI ¶
type WorkspaceAPI struct {
Client DBClient
}
WorkspaceAPI exposes the Workspace API
func (WorkspaceAPI) Delete ¶
func (a WorkspaceAPI) Delete(path string, recursive bool) error
Delete deletes an object or a directory (and optionally recursively deletes all objects in the directory)
func (WorkspaceAPI) Export ¶
func (a WorkspaceAPI) Export(path string, format models.ExportFormat, directDownload bool) ([]byte, error)
Export exports a notebook or contents of an entire directory
func (WorkspaceAPI) GetStatus ¶
func (a WorkspaceAPI) GetStatus(path string) (models.ObjectInfo, error)
GetStatus gets the status of an object or a directory
func (WorkspaceAPI) Import ¶
func (a WorkspaceAPI) Import(path string, format models.ExportFormat, language models.Language, content []byte, overwrite bool) error
Import imports a notebook or the contents of an entire directory
func (WorkspaceAPI) List ¶
func (a WorkspaceAPI) List(path string) ([]models.ObjectInfo, error)
List lists the contents of a directory, or the object if it is not a directory
func (WorkspaceAPI) Mkdirs ¶
func (a WorkspaceAPI) Mkdirs(path string) error
Mkdirs creates the given directory and necessary parent directories if they do not exists