-
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.
refactor(event): re-work events to be synchronus
Merge pull request #1430 from qri-io/feat_sync_events
- Loading branch information
Showing
36 changed files
with
357 additions
and
422 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/qri-io/qri/dsref" | ||
) | ||
|
||
const ( | ||
// ETDatasetNameInit is when a dataset is initialized | ||
// payload is a DsChange | ||
ETDatasetNameInit = Type("dataset:Init") | ||
// ETDatasetCommitChange is when a dataset changes its newest commit | ||
// payload is a DsChange | ||
ETDatasetCommitChange = Type("dataset:CommitChange") | ||
// ETDatasetDeleteAll is when a dataset is entirely deleted | ||
// payload is a DsChange | ||
ETDatasetDeleteAll = Type("dataset:DeleteAll") | ||
// ETDatasetRename is when a dataset is renamed | ||
// payload is a DsChange | ||
ETDatasetRename = Type("dataset:Rename") | ||
// ETDatasetCreateLink is when a dataset is linked to a working directory | ||
// payload is a DsChange | ||
ETDatasetCreateLink = Type("dataset:CreateLink") | ||
) | ||
|
||
// DsChange represents the result of a change to a dataset | ||
type DsChange struct { | ||
InitID string | ||
TopIndex int | ||
ProfileID string | ||
Username string | ||
PrettyName string | ||
HeadRef string | ||
Info *dsref.VersionInfo | ||
Dir string | ||
} |
Oops, something went wrong.