mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-20 17:57:54 +00:00
30 lines
587 B
Go
30 lines
587 B
Go
package cache
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/matchstalk/utils/cache"
|
|
)
|
|
|
|
type Adapter interface {
|
|
Connect() error
|
|
Get(key string) (string, error)
|
|
Set(key string, val interface{}, expire int) error
|
|
Del(key string) error
|
|
HashGet(hk, key string) (string, error)
|
|
HashDel(hk, key string) error
|
|
Increase(key string) error
|
|
Decrease(key string) error
|
|
Expire(key string, dur time.Duration) error
|
|
cache.AdapterQueue
|
|
}
|
|
|
|
type Message interface {
|
|
SetID(string)
|
|
SetStream(string)
|
|
SetValues(map[string]interface{})
|
|
GetID() string
|
|
GetStream() string
|
|
GetValues() map[string]interface{}
|
|
}
|