16 lines
253 B
Go
16 lines
253 B
Go
|
package storage
|
||
|
|
||
|
import (
|
||
|
"github.com/spf13/viper"
|
||
|
)
|
||
|
|
||
|
type KVHandler interface {
|
||
|
Put(k string, v any) error
|
||
|
Get(k string) (any, error)
|
||
|
Delete(k string) error
|
||
|
}
|
||
|
|
||
|
func NewKVHandler(cfg *viper.Viper) (KVHandler, error) {
|
||
|
return NewRedisHandler(cfg)
|
||
|
}
|