2022-08-25 19:26:29 -06:00
|
|
|
package database
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models"
|
|
|
|
)
|
|
|
|
|
2022-08-31 20:06:12 -06:00
|
|
|
//go:generate mockgen -source=interface.go -destination=mock/mock_database.go
|
2022-08-25 19:26:29 -06:00
|
|
|
type DatabaseRepository interface {
|
|
|
|
Close() error
|
2022-09-11 21:59:13 -06:00
|
|
|
|
|
|
|
CreateUser(context.Context, *models.User) error
|
|
|
|
GetUserByEmail(context.Context, string) (*models.User, error)
|
2022-08-27 09:39:55 -06:00
|
|
|
GetCurrentUser() models.User
|
2022-08-25 19:26:29 -06:00
|
|
|
|
2022-09-08 22:14:03 -06:00
|
|
|
UpsertResource(context.Context, models.ResourceFhir) error
|
2022-09-08 23:53:54 -06:00
|
|
|
ListResources(context.Context, string, string) ([]models.ResourceFhir, error)
|
2022-09-01 19:54:01 -06:00
|
|
|
//UpsertProfile(context.Context, *models.Profile) error
|
|
|
|
//UpsertOrganziation(context.Context, *models.Organization) error
|
2022-08-30 20:35:01 -06:00
|
|
|
|
2022-08-30 22:36:40 -06:00
|
|
|
CreateSource(context.Context, *models.Source) error
|
|
|
|
GetSources(context.Context) ([]models.Source, error)
|
2022-08-25 19:26:29 -06:00
|
|
|
}
|