2024-04-18 15:13:16 +00:00
|
|
|
package bundle
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/databricks/cli/bundle/config"
|
2024-07-03 10:13:22 +00:00
|
|
|
"github.com/databricks/cli/libs/vfs"
|
2024-04-18 15:13:16 +00:00
|
|
|
"github.com/databricks/databricks-sdk-go"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ReadOnlyBundle struct {
|
|
|
|
b *Bundle
|
|
|
|
}
|
|
|
|
|
|
|
|
func ReadOnly(b *Bundle) ReadOnlyBundle {
|
|
|
|
return ReadOnlyBundle{b: b}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r ReadOnlyBundle) Config() config.Root {
|
|
|
|
return r.b.Config
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r ReadOnlyBundle) RootPath() string {
|
|
|
|
return r.b.RootPath
|
|
|
|
}
|
|
|
|
|
2024-07-03 10:13:22 +00:00
|
|
|
func (r ReadOnlyBundle) BundleRoot() vfs.Path {
|
|
|
|
return r.b.BundleRoot
|
|
|
|
}
|
|
|
|
|
2024-04-18 15:13:16 +00:00
|
|
|
func (r ReadOnlyBundle) WorkspaceClient() *databricks.WorkspaceClient {
|
|
|
|
return r.b.WorkspaceClient()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r ReadOnlyBundle) CacheDir(ctx context.Context, paths ...string) (string, error) {
|
|
|
|
return r.b.CacheDir(ctx, paths...)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r ReadOnlyBundle) GetSyncIncludePatterns(ctx context.Context) ([]string, error) {
|
|
|
|
return r.b.GetSyncIncludePatterns(ctx)
|
|
|
|
}
|