memos/store/store.go

21 lines
337 B
Go
Raw Normal View History

2022-05-16 02:37:23 +03:00
package store
2022-05-21 19:59:22 +03:00
import (
"database/sql"
2022-05-22 04:29:34 +03:00
"memos/server/profile"
2022-05-21 19:59:22 +03:00
)
2022-05-16 02:37:23 +03:00
// Store provides database access to all raw objects
type Store struct {
2022-05-21 19:59:22 +03:00
db *sql.DB
2022-05-22 04:29:34 +03:00
profile *profile.Profile
2022-05-16 02:37:23 +03:00
}
// New creates a new instance of Store
2022-05-22 04:29:34 +03:00
func New(db *sql.DB, profile *profile.Profile) *Store {
2022-05-16 02:37:23 +03:00
return &Store{
2022-05-21 19:59:22 +03:00
db: db,
profile: profile,
2022-05-16 02:37:23 +03:00
}
}