-
-
Notifications
You must be signed in to change notification settings - Fork 850
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(storage): move interface to core package
- Loading branch information
Showing
10 changed files
with
120 additions
and
117 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package core | ||
|
||
const ( | ||
// TotalCountKey is key name for total count of storage | ||
TotalCountKey = "gorush-total-count" | ||
|
||
// IosSuccessKey is key name or ios success count of storage | ||
IosSuccessKey = "gorush-ios-success-count" | ||
|
||
// IosErrorKey is key name or ios success error of storage | ||
IosErrorKey = "gorush-ios-error-count" | ||
|
||
// AndroidSuccessKey is key name for android success count of storage | ||
AndroidSuccessKey = "gorush-android-success-count" | ||
|
||
// AndroidErrorKey is key name for android error count of storage | ||
AndroidErrorKey = "gorush-android-error-count" | ||
|
||
// HuaweiSuccessKey is key name for huawei success count of storage | ||
HuaweiSuccessKey = "gorush-huawei-success-count" | ||
|
||
// HuaweiErrorKey is key name for huawei error count of storage | ||
HuaweiErrorKey = "gorush-huawei-error-count" | ||
) | ||
|
||
// Storage interface | ||
type Storage interface { | ||
Init() error | ||
Add(key string, count int64) | ||
Set(key string, count int64) | ||
Get(key string) int64 | ||
Close() error | ||
} |
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
Oops, something went wrong.