You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
478 B
Go
27 lines
478 B
Go
2 years ago
|
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,
|
||
|
}
|
||
|
}
|