init
This commit is contained in:
25
internal/storage/storage.go
Normal file
25
internal/storage/storage.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"github.com/jackc/pgx/v5/pgxpool"
|
||||
)
|
||||
|
||||
type Storage struct {
|
||||
Projects ProjectRepository
|
||||
ServerSettings ServerSettingsRepository
|
||||
Issues IssueRepository
|
||||
Status StatusRepository
|
||||
User UserRepository
|
||||
UserToProject UserToProjectRepository
|
||||
}
|
||||
|
||||
func NewStorage(client *pgxpool.Pool) *Storage {
|
||||
return &Storage{
|
||||
Projects: &ProjectStore{client: client},
|
||||
ServerSettings: &ServerSettingsStore{client: client},
|
||||
Issues: &IssueStore{client: client},
|
||||
Status: &StatusStore{client: client},
|
||||
User: &UserStore{client: client},
|
||||
UserToProject: &UserToProjectStore{client: client},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user