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

23 lines
405 B
Go
Raw Normal View History

2024-11-26 21:36:40 +00:00
package gormstore
import (
2024-11-26 23:30:58 +00:00
"git.itzana.me/strafesnet/maps-service/pkg/datastore"
2024-11-26 21:36:40 +00:00
"gorm.io/gorm"
)
type Gormstore struct {
2024-11-26 23:30:58 +00:00
db *gorm.DB
2024-11-26 21:36:40 +00:00
}
2024-11-26 23:30:58 +00:00
func (g Gormstore) Submissions() datastore.Submissions {
return &Submissions{db: g.db}
2024-11-26 21:36:40 +00:00
}
2024-12-05 01:27:49 +00:00
func (g Gormstore) Scripts() datastore.Scripts {
return &Scripts{db: g.db}
}
func (g Gormstore) ScriptPolicy() datastore.ScriptPolicy {
return &ScriptPolicy{db: g.db}
}