feat: init project

This commit is contained in:
Steven
2022-09-11 16:38:06 +08:00
commit 5f48be3b7a
48 changed files with 4585 additions and 0 deletions

26
store/store.go Normal file
View File

@ -0,0 +1,26 @@
package store
import (
"database/sql"
"github.com/boojack/corgi/api"
"github.com/boojack/corgi/server/profile"
)
// Store provides database access to all raw objects.
type Store struct {
db *sql.DB
profile *profile.Profile
cache api.CacheService
}
// New creates a new instance of Store.
func New(db *sql.DB, profile *profile.Profile) *Store {
cacheService := NewCacheService()
return &Store{
db: db,
profile: profile,
cache: cacheService,
}
}