refactor code structure (#1738)

This commit is contained in:
zryfish
2020-01-04 12:44:54 +08:00
committed by GitHub
parent eceadec69c
commit c40d1542a2
50 changed files with 695 additions and 456 deletions

40
pkg/simple/client/cache/simple_cache.go vendored Normal file
View File

@@ -0,0 +1,40 @@
package cache
import "time"
type simpleObject struct {
value string
expire time.Time
}
type SimpleCache struct {
store map[string]simpleObject
}
func NewSimpleCache() Interface {
return &SimpleCache{store: make(map[string]simpleObject)}
}
func (s *SimpleCache) Keys(pattern string) ([]string, error) {
panic("implement me")
}
func (s *SimpleCache) Set(key string, value string, duration time.Duration) error {
panic("implement me")
}
func (s *SimpleCache) Del(key string) error {
panic("implement me")
}
func (s *SimpleCache) Get(key string) (string, error) {
return "", nil
}
func (s *SimpleCache) Exists(key string) (bool, error) {
panic("implement me")
}
func (s *SimpleCache) Expire(key string, duration time.Duration) error {
panic("implement me")
}