-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #199 from FleekHQ/alpha-release-dev
Release: alpha to master
- Loading branch information
Showing
76 changed files
with
5,164 additions
and
1,395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
package fsds | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
|
||
"github.com/FleekHQ/space-daemon/core/space" | ||
) | ||
|
||
var DefaultBucketName = "personal" | ||
|
||
type dataSourceConfig struct { | ||
tlfSources []*TLFDataSource | ||
} | ||
|
||
type FSDataSourceConfig func(config *dataSourceConfig) | ||
|
||
func WithTLFDataSource(source *TLFDataSource) FSDataSourceConfig { | ||
return func(config *dataSourceConfig) { | ||
config.tlfSources = append(config.tlfSources, source) | ||
} | ||
} | ||
|
||
// Configure the default 'Files` data source to be included as a data source | ||
func WithFilesDataSources(service space.Service) FSDataSourceConfig { | ||
basePath := fmt.Sprintf("%cFiles", os.PathSeparator) | ||
return WithTLFDataSource(&TLFDataSource{ | ||
name: "Files", | ||
basePath: basePath, | ||
FSDataSource: &filesDataSource{service: service}, | ||
}) | ||
} | ||
|
||
// Configure the default 'Shared With Me` data source to be included as a data source | ||
func WithSharedWithMeDataSources(service space.Service) FSDataSourceConfig { | ||
basePath := fmt.Sprintf("%cShared With Me", os.PathSeparator) | ||
return WithTLFDataSource(&TLFDataSource{ | ||
name: "Shared With Me", | ||
basePath: basePath, | ||
FSDataSource: &sharedWithMeDataSource{ | ||
service: service, | ||
maxDirLimit: 1000, | ||
cache: make(map[string]*sharedFileEntry), | ||
}, | ||
}) | ||
} | ||
|
||
var blackListedDirEntryNames = map[string]bool{ | ||
// OSX specific special directories | ||
".Trashes": true, | ||
".localized": true, | ||
".fseventsd": true, | ||
".ql_disablethumbnails": true, | ||
".ql_disablecache": true, | ||
// special space empty directory file | ||
".keep": true, | ||
} |
Oops, something went wrong.