maps-service/internal/datastore/gormstore/gormstore.go

21 lines
380 B
Go
Raw Normal View History

2024-11-26 21:36:40 +00:00
package gormstore
import (
2024-11-26 21:38:45 +00:00
"git.itzana.me/strafesnet/maps-service/internal/datastore"
2024-11-26 21:36:40 +00:00
"github.com/eko/gocache/lib/v4/cache"
"gorm.io/gorm"
)
type Gormstore struct {
db *gorm.DB
cache *cache.Cache[[]byte]
}
func (g Gormstore) Users() datastore.Users {
return &Users{db: g.db}
}
2024-11-26 22:37:18 +00:00
func (g Gormstore) Submissions() datastore.Submissions {
return &Submissions{db: g.db}
2024-11-26 21:36:40 +00:00
}