github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/istorage/cas/provide.go (about) 1 /* 2 * Copyright (c) 2021-present unTill Pro, Ltd. 3 */ 4 5 package cas 6 7 import ( 8 "errors" 9 "html" 10 11 "github.com/voedger/voedger/pkg/istorage" 12 ) 13 14 func Provide(casPar CassandraParamsType) (asf istorage.IAppStorageFactory, err error) { 15 if len(casPar.KeyspaceWithReplication) == 0 { 16 return nil, errors.New("casPar.KeyspaceWithReplication can not be empty") 17 } 18 casPar.KeyspaceWithReplication = html.UnescapeString(casPar.KeyspaceWithReplication) // https://dev.untill.com/projects/#!643010 19 provider := newStorageProvider(casPar) 20 return provider, nil 21 }