fasten-onprem/backend/pkg/database/interface.go

24 lines
753 B
Go
Raw Normal View History

2022-08-25 19:26:29 -06:00
package database
import (
"context"
"github.com/fastenhealth/fastenhealth-onprem/backend/pkg/models"
)
//go:generate mockgen -source=interface.go -destination=mock/mock_database.go
2022-08-25 19:26:29 -06:00
type DatabaseRepository interface {
Close() error
CreateUser(context.Context, *models.User) error
GetUserByEmail(context.Context, string) (*models.User, error)
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
ListResources(context.Context, string, string) ([]models.ResourceFhir, error)
//UpsertProfile(context.Context, *models.Profile) error
//UpsertOrganziation(context.Context, *models.Organization) error
CreateSource(context.Context, *models.Source) error
GetSources(context.Context) ([]models.Source, error)
2022-08-25 19:26:29 -06:00
}