CheqBooq/storage/storage.go

19 lines
320 B
Go
Executable File

package storage
import (
"fmt"
"local/cheqbooq/config"
"strings"
)
type Storage struct {
mongo *Mongo
}
func New() (*Storage, error) {
mongo, err := NewMongo(config.Page, config.StoreNS, fmt.Sprintf("mongodb://%s", strings.TrimPrefix(config.StoreAddr, "mongodb://")))
return &Storage{
mongo: mongo,
}, err
}