initial commit 2

This commit is contained in:
Senad Uka
2018-04-25 13:16:36 +02:00
parent c1520d169c
commit 99c10b75fb
167 changed files with 25057 additions and 0 deletions

19
domain/contract/cache.go Normal file
View File

@@ -0,0 +1,19 @@
package contract
import "time"
// CacheManager defines the main caching interface
// - Get methods can return domain.ErrCacheMiss
type CacheManager interface {
GetItem(key string) ([]byte, error)
SetItem(key string, data []byte) error
GetString(key string) (string, error)
SetString(key string, data string) error
GetStruct(key string, data interface{}) error
SetStruct(key string, data interface{}) error
GetExpiration(key string) (time.Duration, error)
SetExpiration(key string, expiration time.Duration) error
}