service.sitemap-generator/dao/dao.go
package dao
import (
"io"
"cloud.google.com/go/firestore"
"github.com/lolibrary/lolibrary/libraries/database"
)
var (
Firestore *firestore.Client
brandsByID *firestore.CollectionRef
)
// Init starts up the database access object package and configures a database.
func Init() io.Closer {
if Firestore == nil {
Firestore = database.NewClient()
}
brandsByID = Firestore.Collection("brands")
return Firestore
}