2017-06-24 04:09:45 +00:00
|
|
|
package storage
|
2016-05-02 03:04:19 +00:00
|
|
|
|
2017-06-24 16:48:48 +00:00
|
|
|
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"
|
2020-09-04 03:01:21 +00:00
|
|
|
|
|
|
|
// 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"
|
2017-06-24 16:48:48 +00:00
|
|
|
)
|
|
|
|
|
2016-05-02 03:04:19 +00:00
|
|
|
// Storage interface
|
|
|
|
type Storage interface {
|
2016-05-02 11:42:21 +00:00
|
|
|
Init() error
|
2022-02-03 09:03:37 +00:00
|
|
|
Add(key string, count int64)
|
|
|
|
Set(key string, count int64)
|
|
|
|
Get(key string) int64
|
2020-04-23 07:39:24 +00:00
|
|
|
Close() error
|
2016-05-02 03:04:19 +00:00
|
|
|
}
|