@@ -18,23 +18,23 @@ import (
1818 "golang.org/x/sync/errgroup"
1919)
2020
21- type downloader struct {
21+ type Downloader struct {
2222 files map [string ]string
2323 w * databricks.WorkspaceClient
2424 sourceDir string
2525 configDir string
2626 basePath string
2727}
2828
29- func (n * downloader ) MarkTaskForDownload (ctx context.Context , task * jobs.Task ) error {
29+ func (n * Downloader ) MarkTaskForDownload (ctx context.Context , task * jobs.Task ) error {
3030 if task .NotebookTask == nil {
3131 return nil
3232 }
3333
3434 return n .markNotebookForDownload (ctx , & task .NotebookTask .NotebookPath )
3535}
3636
37- func (n * downloader ) MarkPipelineLibraryForDownload (ctx context.Context , lib * pipelines.PipelineLibrary ) error {
37+ func (n * Downloader ) MarkPipelineLibraryForDownload (ctx context.Context , lib * pipelines.PipelineLibrary ) error {
3838 if lib .Notebook != nil {
3939 return n .markNotebookForDownload (ctx , & lib .Notebook .Path )
4040 }
@@ -46,7 +46,7 @@ func (n *downloader) MarkPipelineLibraryForDownload(ctx context.Context, lib *pi
4646 return nil
4747}
4848
49- func (n * downloader ) markFileForDownload (ctx context.Context , filePath * string ) error {
49+ func (n * Downloader ) markFileForDownload (ctx context.Context , filePath * string ) error {
5050 _ , err := n .w .Workspace .GetStatusByPath (ctx , * filePath )
5151 if err != nil {
5252 return err
@@ -66,7 +66,7 @@ func (n *downloader) markFileForDownload(ctx context.Context, filePath *string)
6666 return nil
6767}
6868
69- func (n * downloader ) markDirectoryForDownload (ctx context.Context , dirPath * string ) error {
69+ func (n * Downloader ) MarkDirectoryForDownload (ctx context.Context , dirPath * string ) error {
7070 _ , err := n .w .Workspace .GetStatusByPath (ctx , * dirPath )
7171 if err != nil {
7272 return err
@@ -102,7 +102,7 @@ func (n *downloader) markDirectoryForDownload(ctx context.Context, dirPath *stri
102102 return nil
103103}
104104
105- func (n * downloader ) markNotebookForDownload (ctx context.Context , notebookPath * string ) error {
105+ func (n * Downloader ) markNotebookForDownload (ctx context.Context , notebookPath * string ) error {
106106 info , err := n .w .Workspace .GetStatusByPath (ctx , * notebookPath )
107107 if err != nil {
108108 return err
@@ -123,7 +123,7 @@ func (n *downloader) markNotebookForDownload(ctx context.Context, notebookPath *
123123 return nil
124124}
125125
126- func (n * downloader ) relativePath (fullPath string ) string {
126+ func (n * Downloader ) relativePath (fullPath string ) string {
127127 basePath := path .Dir (fullPath )
128128 if n .basePath != "" {
129129 basePath = n .basePath
@@ -138,7 +138,7 @@ func (n *downloader) relativePath(fullPath string) string {
138138 return relPath
139139}
140140
141- func (n * downloader ) FlushToDisk (ctx context.Context , force bool ) error {
141+ func (n * Downloader ) FlushToDisk (ctx context.Context , force bool ) error {
142142 // First check that all files can be written
143143 for targetPath := range n .files {
144144 info , err := os .Stat (targetPath )
@@ -185,8 +185,8 @@ func (n *downloader) FlushToDisk(ctx context.Context, force bool) error {
185185 return errs .Wait ()
186186}
187187
188- func newDownloader (w * databricks.WorkspaceClient , sourceDir , configDir string ) * downloader {
189- return & downloader {
188+ func NewDownloader (w * databricks.WorkspaceClient , sourceDir , configDir string ) * Downloader {
189+ return & Downloader {
190190 files : make (map [string ]string ),
191191 w : w ,
192192 sourceDir : sourceDir ,
0 commit comments