Documentation ¶
Index ¶
- Constants
- type Databricks
- func (d *Databricks) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
- func (d *Databricks) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
- func (d *Databricks) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
- func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, error)
- type ResourceCache
Constants ¶
const ( // Roles relevant to Account API (Grantable to User or ServicePrincipal). AccountAdminRole = "account_admin" MarketplaceAdminRole = "marketplace.admin" // Roles (or Entitlements) relevant to Workspace API (Grantable to User, Group or ServicePrincipal). WorkspaceAccessRole = "workspace-access" SQLAccessRole = "databricks-sql-access" ClusterCreateRole = "allow-cluster-create" InstancePoolCreateRole = "allow-instance-pool-create" UsersType = "users" GroupsType = "groups" ServicePrincipalsType = "servicePrincipals" )
const ( RoleMemberEntitlement = "member" RoleType = "role" EntitlementType = "entitlement" )
const ResourcesPageSize uint = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Databricks ¶
type Databricks struct {
// contains filtered or unexported fields
}
func New ¶
func New( ctx context.Context, hostname, accountHostname, accountID string, auth databricks.Auth, workspaces []string, ) (*Databricks, error)
New returns a new instance of the connector.
func (*Databricks) Asset ¶
func (d *Databricks) Asset(ctx context.Context, asset *v2.AssetRef) (string, io.ReadCloser, error)
Asset takes an input AssetRef and attempts to fetch it using the connector's authenticated http client It streams a response, always starting with a metadata object, following by chunked payloads for the asset.
func (*Databricks) Metadata ¶
func (d *Databricks) Metadata(ctx context.Context) (*v2.ConnectorMetadata, error)
Metadata returns metadata about the connector.
func (*Databricks) ResourceSyncers ¶
func (d *Databricks) ResourceSyncers(ctx context.Context) []connectorbuilder.ResourceSyncer
ResourceSyncers returns a ResourceSyncer for each resource type that should be synced from the upstream service.
func (*Databricks) Validate ¶
func (d *Databricks) Validate(ctx context.Context) (annotations.Annotations, error)
Validate is called to ensure that the connector is properly configured. It should exercise any API credentials to be sure that they are valid. Since this connector works with two APIs and can have different types of credentials it is important to validate that the connector is properly configured before attempting to sync.
type ResourceCache ¶
type ResourceCache struct {
// contains filtered or unexported fields
}
func NewResourceCache ¶
func NewResourceCache() *ResourceCache