func New() Interface {
	newInstance := func() {
		vs = &viperStore{}
	}
	once.Do(newInstance)
	return vs
}
New returns a config accessor that implements Interface as singleton
package config
import (
	"log"
	"sync"
	"github.com/spf13/viper"
)
type Interface interface {
	Store
	Encryptor
}
type Store interface {
	SelectedStore
	Redis
	DB
}
type Encryptor interface {
	SelectedEncryptor
	KMS
	AES
	KDF
}
type viperStore struct{}
var vs *viperStore
var once sync.Once
func init() {
	defaults := map[string]interface{}{
		"Store":     "redis",
		"Encryptor": "kms",
		"KMS.KeyID":  "",
		"KMS.Region": "eu-west-1",
		"AES.Key":     "",
		"AES.HmacKey": "",
		"Redis.Host":         "127.0.0.1:6379",
		"Redis.DbIndex":      0,
		"Redis.Password":     "",
		"Redis.ReadTimeout":  "3s",
		"Redis.WriteTimeout": "5s",
		"Redis.MaxRetries":   0,
		"DB.Host":        "127.0.0.1:3306",
		"DB.Username":    "root",
		"DB.Password":    "",
		"DB.Name":        "cryptic",
		"DB.Table":       "secrets",
		"DB.KeyColumn":   "name",
		"DB.ValueColumn": "data",
	}
	viper.AddConfigPath(".")
	viper.AddConfigPath("/etc/cryptic/")
	for k, v := range defaults {
		viper.SetDefault(k, v)
	}
	viper.SetConfigName("cryptic")
	if err := viper.ReadInConfig(); err != nil {
		if _, ok := err.(viper.UnsupportedConfigError); ok {
			log.Print("config: failed to load config file, using defaults")
		} else {
			log.Fatalf("config: init error (%v)", err)
		}
	}
}