-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dscache): Dscache used for fsi init and checkout
Merge pull request #1349 from qri-io/dscache-fsi
- Loading branch information
Showing
20 changed files
with
513 additions
and
150 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
Binary file not shown.
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,39 @@ | ||
package hook | ||
|
||
import ( | ||
"github.com/qri-io/qri/dsref" | ||
) | ||
|
||
// ChangeType is the type of change that has happened to a dataset | ||
type ChangeType byte | ||
|
||
const ( | ||
// DatasetNameInit is when a dataset is initialized | ||
DatasetNameInit ChangeType = iota | ||
// DatasetCommitChange is when a dataset changes its newest commit | ||
DatasetCommitChange | ||
// DatasetDeleteAll is when a dataset is entirely deleted | ||
DatasetDeleteAll | ||
// DatasetRename is when a dataset is renamed | ||
DatasetRename | ||
// DatasetCreateLink is when a dataset is linked to a working directory | ||
DatasetCreateLink | ||
) | ||
|
||
// DsChange represents the result of a change to a dataset | ||
type DsChange struct { | ||
Type ChangeType | ||
InitID string | ||
TopIndex int | ||
ProfileID string | ||
Username string | ||
PrettyName string | ||
HeadRef string | ||
Info *dsref.VersionInfo | ||
Dir string | ||
} | ||
|
||
// ChangeNotifier is something that provides a hook which will be called when a dataset changes | ||
type ChangeNotifier interface { | ||
SetChangeHook(func(change DsChange)) | ||
} |
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
Oops, something went wrong.