db

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResearcherDBService

type ResearcherDBService struct {
	DBClient *mongo.Client

	DBNamePrefix string
	// contains filtered or unexported fields
}

func NewResearcherDBService

func NewResearcherDBService(configs types.DBConfig) *ResearcherDBService

func (*ResearcherDBService) AddNoteToParticipantContact

func (dbService *ResearcherDBService) AddNoteToParticipantContact(substudyKey string, contactID string, note types.ContactNote) error

func (*ResearcherDBService) AddNotificationSubscription

func (dbService *ResearcherDBService) AddNotificationSubscription(substudyKey string, sub types.NotificationSubscription) (string, error)

func (*ResearcherDBService) AddParticipantContact

func (dbService *ResearcherDBService) AddParticipantContact(substudyKey string, pc types.ParticipantContact) (string, error)

func (*ResearcherDBService) CleanUpExpiredParticipantContacts

func (dbService *ResearcherDBService) CleanUpExpiredParticipantContacts(substudyKey string, deleteAfterInDays int) error

Remove entries after certain time if not marked as permanent

func (*ResearcherDBService) DeleteEmailAllNotificationsForStudy

func (dbService *ResearcherDBService) DeleteEmailAllNotificationsForStudy(substudyKey string) (err error)

func (*ResearcherDBService) DeleteNotificationSubscription

func (dbService *ResearcherDBService) DeleteNotificationSubscription(substudyKey string, id string) (count int64, err error)

func (*ResearcherDBService) DeleteParticipantContact

func (dbService *ResearcherDBService) DeleteParticipantContact(substudyKey string, contactID string) error

Remove entries after certain time if not marked as permanent

func (*ResearcherDBService) DeleteStudyInfo

func (dbService *ResearcherDBService) DeleteStudyInfo(substudyKey string) (count int64, err error)

func (*ResearcherDBService) FindAllStudyInfos

func (dbService *ResearcherDBService) FindAllStudyInfos() (studyInfos []types.StudyInfo, err error)

func (*ResearcherDBService) FindNotificationSubscriptions

func (dbService *ResearcherDBService) FindNotificationSubscriptions(substudyKey string, topic string) (subs []types.NotificationSubscription, err error)

func (*ResearcherDBService) FindParticipantContactByID added in v1.2.0

func (dbService *ResearcherDBService) FindParticipantContactByID(substudyKey string, id string) (pcs types.ParticipantContact, err error)

func (*ResearcherDBService) FindParticipantContacts

func (dbService *ResearcherDBService) FindParticipantContacts(substudyKey string) (pcs []types.ParticipantContact, err error)

func (*ResearcherDBService) FindStudyInfo

func (dbService *ResearcherDBService) FindStudyInfo(substudyKey string) (types.StudyInfo, error)

func (*ResearcherDBService) FindStudyInfosByKeys

func (dbService *ResearcherDBService) FindStudyInfosByKeys(substudyKeys []string) (studyInfos []types.StudyInfo, err error)

func (*ResearcherDBService) SaveStudyInfo

func (dbService *ResearcherDBService) SaveStudyInfo(studyInfo types.StudyInfo) (types.StudyInfo, error)

func (*ResearcherDBService) UpdateKeepParticipantContactStatus

func (dbService *ResearcherDBService) UpdateKeepParticipantContactStatus(substudyKey string, contactID string, value bool) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL