mock

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GormMock

type GormMock struct {
	MockCreateUserFn                                          func(ctx context.Context, user *gorm.User) error
	MockCreateClientFn                                        func(ctx context.Context, client *gorm.Client, contactID, identifierID string) error
	MockCreateIdentifierFn                                    func(ctx context.Context, identifier *gorm.Identifier) error
	MockRetrieveFacilityFn                                    func(ctx context.Context, id *string, isActive bool) (*gorm.Facility, error)
	MockRetrieveFacilityByIdentifierFn                        func(ctx context.Context, identifier *gorm.FacilityIdentifier, isActive bool) (*gorm.Facility, error)
	MockRetrieveFacilityIdentifiersByFacilityIDFn             func(ctx context.Context, facilityID *string) ([]*gorm.FacilityIdentifier, error)
	MockListFacilitiesFn                                      func(ctx context.Context, searchTerm *string, filter []*domain.FiltersParam, pagination *domain.Pagination) ([]*gorm.Facility, *domain.Pagination, error)
	MockDeleteFacilityFn                                      func(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)
	MockListProgramFacilitiesFn                               func(ctx context.Context, programID, searchTerm *string, filter []*domain.FiltersParam, pagination *domain.Pagination) ([]*gorm.Facility, *domain.Pagination, error)
	MockGetUserProfileByUsernameFn                            func(ctx context.Context, username string) (*gorm.User, error)
	MockGetUserProfileByPhoneNumberFn                         func(ctx context.Context, phoneNumber string) (*gorm.User, error)
	MockGetUserPINByUserIDFn                                  func(ctx context.Context, userID string) (*gorm.PINData, error)
	MockInactivateFacilityFn                                  func(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)
	MockReactivateFacilityFn                                  func(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)
	MockGetUserProfileByUserIDFn                              func(ctx context.Context, userID *string) (*gorm.User, error)
	MockSaveTemporaryUserPinFn                                func(ctx context.Context, pinData *gorm.PINData) (bool, error)
	MockGetCurrentTermsFn                                     func(ctx context.Context) (*gorm.TermsOfService, error)
	MockAcceptTermsFn                                         func(ctx context.Context, userID *string, termsID *int) (bool, error)
	MockSavePinFn                                             func(ctx context.Context, pinData *gorm.PINData) (bool, error)
	MockGetSecurityQuestionsFn                                func(ctx context.Context, flavour feedlib.Flavour) ([]*gorm.SecurityQuestion, error)
	MockSaveOTPFn                                             func(ctx context.Context, otpInput *gorm.UserOTP) error
	MockGetSecurityQuestionByIDFn                             func(ctx context.Context, securityQuestionID *string) (*gorm.SecurityQuestion, error)
	MockSaveSecurityQuestionResponseFn                        func(ctx context.Context, securityQuestionResponse []*gorm.SecurityQuestionResponse) error
	MockGetSecurityQuestionResponseFn                         func(ctx context.Context, questionID string, userID string) (*gorm.SecurityQuestionResponse, error)
	MockCheckIfPhoneNumberExistsFn                            func(ctx context.Context, phone string, isOptedIn bool, flavour feedlib.Flavour) (bool, error)
	MockVerifyOTPFn                                           func(ctx context.Context, payload *dto.VerifyOTPInput) (bool, error)
	MockCheckStaffExistsFn                                    func(ctx context.Context, userID string) (bool, error)
	MockCheckClientExistsFn                                   func(ctx context.Context, userID string) (bool, error)
	MockCheckCaregiverExistsFn                                func(ctx context.Context, userID string) (bool, error)
	MockGetClientProfileFn                                    func(ctx context.Context, userID string, programID string) (*gorm.Client, error)
	MockGetCaregiverByUserIDFn                                func(ctx context.Context, userID string) (*gorm.Caregiver, error)
	MockGetStaffProfileFn                                     func(ctx context.Context, userID string, programID string) (*gorm.StaffProfile, error)
	MockGetClientsSurveyServiceRequestFn                      func(ctx context.Context, facilityID string, projectID int, formID string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)
	MockCheckUserHasPinFn                                     func(ctx context.Context, userID string) (bool, error)
	MockCompleteOnboardingTourFn                              func(ctx context.Context, userID string, flavour feedlib.Flavour) (bool, error)
	MockGetOTPFn                                              func(ctx context.Context, phoneNumber string, flavour feedlib.Flavour) (*gorm.UserOTP, error)
	MockGetUserSecurityQuestionsResponsesFn                   func(ctx context.Context, userID, flavour string) ([]*gorm.SecurityQuestionResponse, error)
	MockInvalidatePINFn                                       func(ctx context.Context, userID string) (bool, error)
	MockGetContactByUserIDFn                                  func(ctx context.Context, userID *string, contactType string) (*gorm.Contact, error)
	MockUpdateIsCorrectSecurityQuestionResponseFn             func(ctx context.Context, userID string, isCorrectSecurityQuestionResponse bool) (bool, error)
	MockCreateHealthDiaryEntryFn                              func(ctx context.Context, healthDiaryInput *gorm.ClientHealthDiaryEntry) (*gorm.ClientHealthDiaryEntry, error)
	MockCreateServiceRequestFn                                func(ctx context.Context, serviceRequestInput *gorm.ClientServiceRequest) error
	MockCanRecordHeathDiaryFn                                 func(ctx context.Context, clientID string) (bool, error)
	MockGetClientHealthDiaryQuoteFn                           func(ctx context.Context, limit int) ([]*gorm.ClientHealthDiaryQuote, error)
	MockGetClientHealthDiaryEntriesFn                         func(ctx context.Context, params map[string]interface{}) ([]*gorm.ClientHealthDiaryEntry, error)
	MockUpdateClientCaregiverFn                               func(ctx context.Context, caregiverInput *dto.CaregiverInput) error
	MockInProgressByFn                                        func(ctx context.Context, requestID string, staffID string) (bool, error)
	MockGetClientProfileByClientIDFn                          func(ctx context.Context, clientID string) (*gorm.Client, error)
	MockGetServiceRequestsFn                                  func(ctx context.Context, requestType, requestStatus *string, facilityID string, programID string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)
	MockGetClientPendingServiceRequestsCountFn                func(ctx context.Context, facilityID string, programID *string) (*domain.ServiceRequestsCount, error)
	MockCreateCommunityFn                                     func(ctx context.Context, community *gorm.Community) (*gorm.Community, error)
	MockCheckIfUsernameExistsFn                               func(ctx context.Context, username string) (bool, error)
	MockGetCommunityByIDFn                                    func(ctx context.Context, communityID string) (*gorm.Community, error)
	MockCheckIdentifierExists                                 func(ctx context.Context, identifierType string, identifierValue string) (bool, error)
	MockCheckFacilityExistsByIdentifier                       func(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)
	MockGetOrCreateNextOfKin                                  func(ctx context.Context, person *gorm.RelatedPerson, clientID, contactID string) error
	MockGetOrCreateContact                                    func(ctx context.Context, contact *gorm.Contact) (*gorm.Contact, error)
	MockGetClientsInAFacilityFn                               func(ctx context.Context, facilityID string) ([]*gorm.Client, error)
	MockGetRecentHealthDiaryEntriesFn                         func(ctx context.Context, lastSyncTime time.Time, clientID string) ([]*gorm.ClientHealthDiaryEntry, error)
	MockGetClientsByParams                                    func(ctx context.Context, params gorm.Client, lastSyncTime *time.Time) ([]*gorm.Client, error)
	MockGetClientIdentifiers                                  func(ctx context.Context, clientID string) ([]*gorm.Identifier, error)
	MockGetServiceRequestsForKenyaEMRFn                       func(ctx context.Context, facilityID string, lastSyncTime time.Time) ([]*gorm.ClientServiceRequest, error)
	MockCreateAppointment                                     func(ctx context.Context, appointment *gorm.Appointment) error
	MockListAppointments                                      func(ctx context.Context, params *gorm.Appointment, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*gorm.Appointment, *domain.Pagination, error)
	MockUpdateAppointmentFn                                   func(ctx context.Context, appointment *gorm.Appointment, updateData map[string]interface{}) (*gorm.Appointment, error)
	MockUpdateServiceRequestsFn                               func(ctx context.Context, payload []*gorm.ClientServiceRequest) (bool, error)
	MockGetProgramClientProfileByIdentifierFn                 func(ctx context.Context, programID, identifierType, value string) (*gorm.Client, error)
	MockGetClientProfilesByIdentifierFn                       func(ctx context.Context, identifierType, value string) ([]*gorm.Client, error)
	MockSearchClientProfileFn                                 func(ctx context.Context, searchParameter string) ([]*gorm.Client, error)
	MockSearchStaffProfileFn                                  func(ctx context.Context, searchParameter string, programID *string) ([]*gorm.StaffProfile, error)
	MockUpdateUserPinChangeRequiredStatusFn                   func(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
	MockCheckIfClientHasUnresolvedServiceRequestsFn           func(ctx context.Context, clientID string, serviceRequestType string) (bool, error)
	MockUpdateHealthDiaryFn                                   func(ctx context.Context, clientHealthDiaryEntry *gorm.ClientHealthDiaryEntry, updateData map[string]interface{}) error
	MockUpdateUserPinUpdateRequiredStatusFn                   func(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
	MockUpdateClientFn                                        func(ctx context.Context, client *gorm.Client, updates map[string]interface{}) (*gorm.Client, error)
	MockGetUserProfileByStaffIDFn                             func(ctx context.Context, staffID string) (*gorm.User, error)
	MockGetHealthDiaryEntryByIDFn                             func(ctx context.Context, healthDiaryEntryID string) (*gorm.ClientHealthDiaryEntry, error)
	MockUpdateFailedSecurityQuestionsAnsweringAttemptsFn      func(ctx context.Context, userID string, failCount int) error
	MockGetClientServiceRequestByIDFn                         func(ctx context.Context, serviceRequestID string) (*gorm.ClientServiceRequest, error)
	MockUpdateUserFn                                          func(ctx context.Context, user *gorm.User, updateData map[string]interface{}) error
	MockGetStaffProfileByStaffIDFn                            func(ctx context.Context, staffID string) (*gorm.StaffProfile, error)
	MockCreateStaffServiceRequestFn                           func(ctx context.Context, serviceRequestInput *gorm.StaffServiceRequest) error
	MockGetStaffPendingServiceRequestsCountFn                 func(ctx context.Context, facilityID string, programID string) (*domain.ServiceRequestsCount, error)
	MockGetStaffServiceRequestsFn                             func(ctx context.Context, requestType, requestStatus *string, facilityID string, pagination *domain.Pagination) ([]*gorm.StaffServiceRequest, *domain.Pagination, error)
	MockResolveStaffServiceRequestFn                          func(ctx context.Context, staffID *string, serviceRequestID *string, verificationStatus string) (bool, error)
	MockGetAppointmentServiceRequestsFn                       func(ctx context.Context, lastSyncTime time.Time, facilityID string) ([]*gorm.ClientServiceRequest, error)
	MockUpdateFacilityFn                                      func(ctx context.Context, facility *gorm.Facility, updateData map[string]interface{}) error
	MockGetFacilitiesWithoutFHIRIDFn                          func(ctx context.Context) ([]*gorm.Facility, error)
	MockGetSharedHealthDiaryEntriesFn                         func(ctx context.Context, clientID string, facilityID string) ([]*gorm.ClientHealthDiaryEntry, error)
	MockGetClientServiceRequestsFn                            func(ctx context.Context, requestType, status, clientID, facilityID string) ([]*gorm.ClientServiceRequest, error)
	MockCheckAppointmentExistsByExternalIDFn                  func(ctx context.Context, externalID string) (bool, error)
	MockGetUserSurveyFormsFn                                  func(ctx context.Context, params map[string]interface{}) ([]*gorm.UserSurvey, error)
	MockCreateNotificationFn                                  func(ctx context.Context, notification *gorm.Notification) error
	MockUpdateUserSurveysFn                                   func(ctx context.Context, survey *gorm.UserSurvey, updateData map[string]interface{}) error
	MockSearchClientServiceRequestsFn                         func(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*gorm.ClientServiceRequest, error)
	MockSearchStaffServiceRequestsFn                          func(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*gorm.StaffServiceRequest, error)
	MockListNotificationsFn                                   func(ctx context.Context, params *gorm.Notification, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*gorm.Notification, *domain.Pagination, error)
	MockListAvailableNotificationTypesFn                      func(ctx context.Context, params *gorm.Notification) ([]enums.NotificationType, error)
	MockGetClientScreeningToolServiceRequestByToolTypeFn      func(ctx context.Context, clientID, toolType, status string) (*gorm.ClientServiceRequest, error)
	MockGetAppointmentFn                                      func(ctx context.Context, params *gorm.Appointment) (*gorm.Appointment, error)
	MockCheckIfStaffHasUnresolvedServiceRequestsFn            func(ctx context.Context, staffID string, serviceRequestType string) (bool, error)
	MockGetFacilityStaffsFn                                   func(ctx context.Context, facilityID string) ([]*gorm.StaffProfile, error)
	MockDeleteClientProfileFn                                 func(ctx context.Context, clientID string, userID *string) error
	MockDeleteStaffProfileFn                                  func(ctx context.Context, staffID string) error
	MockSaveFeedbackFn                                        func(ctx context.Context, feedback *gorm.Feedback) error
	MockUpdateNotificationFn                                  func(ctx context.Context, notification *gorm.Notification, updateData map[string]interface{}) error
	MockGetNotificationFn                                     func(ctx context.Context, notificationID string) (*gorm.Notification, error)
	MockGetClientsByFilterParamsFn                            func(ctx context.Context, facilityID string, filterParams *dto.ClientFilterParamsInput) ([]*gorm.Client, error)
	MockCreateUserSurveyFn                                    func(ctx context.Context, userSurvey []*gorm.UserSurvey) error
	MockCreateMetricFn                                        func(ctx context.Context, metric *gorm.Metric) error
	MockFindContactsFn                                        func(ctx context.Context, contactType string, contactValue string) ([]*gorm.Contact, error)
	MockRegisterStaffFn                                       func(ctx context.Context, user *gorm.User, contact *gorm.Contact, identifier *gorm.Identifier, staffProfile *gorm.StaffProfile) (*gorm.StaffProfile, error)
	MockUpdateClientServiceRequestFn                          func(ctx context.Context, clientServiceRequest *gorm.ClientServiceRequest, updateData map[string]interface{}) error
	MockRegisterClientFn                                      func(ctx context.Context, user *gorm.User, contact *gorm.Contact, identifier *gorm.Identifier, client *gorm.Client) (*gorm.Client, error)
	MockDeleteCommunityFn                                     func(ctx context.Context, communityID string) error
	MockCreateQuestionnaireFn                                 func(ctx context.Context, input *gorm.Questionnaire) error
	MockCreateScreeningToolFn                                 func(ctx context.Context, input *gorm.ScreeningTool) error
	MockCreateQuestionFn                                      func(ctx context.Context, input *gorm.Question) error
	MockCreateQuestionChoiceFn                                func(ctx context.Context, input *gorm.QuestionInputChoice) error
	MockGetScreeningToolByIDFn                                func(ctx context.Context, toolID string) (*gorm.ScreeningTool, error)
	MockGetQuestionnaireByIDFn                                func(ctx context.Context, questionnaireID string) (*gorm.Questionnaire, error)
	MockGetQuestionsByQuestionnaireIDFn                       func(ctx context.Context, questionnaireID string) ([]*gorm.Question, error)
	MockGetQuestionInputChoicesByQuestionIDFn                 func(ctx context.Context, questionID string) ([]*gorm.QuestionInputChoice, error)
	MockCreateScreeningToolResponseFn                         func(ctx context.Context, screeningToolResponse *gorm.ScreeningToolResponse, screeningToolQuestionResponses []*gorm.ScreeningToolQuestionResponse) (*string, error)
	MockGetAvailableScreeningToolsFn                          func(ctx context.Context, clientID string, screeningTool gorm.ScreeningTool, screeningToolIDs []string) ([]*gorm.ScreeningTool, error)
	MockGetAllScreeningToolsFn                                func(ctx context.Context, pagination *domain.Pagination) ([]*gorm.ScreeningTool, *domain.Pagination, error)
	MockGetScreeningToolResponsesWithin24HoursFn              func(ctx context.Context, clientID, programID string) ([]*gorm.ScreeningToolResponse, error)
	MockGetScreeningToolResponsesWithPendingServiceRequestsFn func(ctx context.Context, clientID, programID string) ([]*gorm.ScreeningToolResponse, error)
	MockGetFacilityRespondedScreeningToolsFn                  func(ctx context.Context, facilityID, programID string, pagination *domain.Pagination) ([]*gorm.ScreeningTool, *domain.Pagination, error)
	MockListSurveyRespondentsFn                               func(ctx context.Context, params *gorm.UserSurvey, facilityID string, pagination *domain.Pagination) ([]*gorm.UserSurvey, *domain.Pagination, error)
	MockGetScreeningToolServiceRequestOfRespondentsFn         func(ctx context.Context, facilityID, programID string, screeningToolID string, searchTerm string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)
	MockGetScreeningToolResponseByIDFn                        func(ctx context.Context, id string) (*gorm.ScreeningToolResponse, error)
	MockGetScreeningToolQuestionResponsesByResponseIDFn       func(ctx context.Context, responseID string) ([]*gorm.ScreeningToolQuestionResponse, error)
	MockGetSurveysWithServiceRequestsFn                       func(ctx context.Context, facilityID, programID string) ([]*gorm.UserSurvey, error)
	MockGetStaffFacilitiesFn                                  func(ctx context.Context, staffFacility gorm.StaffFacilities, pagination *domain.Pagination) ([]*gorm.StaffFacilities, *domain.Pagination, error)
	MockGetClientFacilitiesFn                                 func(ctx context.Context, clientFacility gorm.ClientFacilities, pagination *domain.Pagination) ([]*gorm.ClientFacilities, *domain.Pagination, error)
	MockUpdateStaffFn                                         func(ctx context.Context, staff *gorm.StaffProfile, updates map[string]interface{}) (*gorm.StaffProfile, error)
	MockAddFacilitiesToStaffProfileFn                         func(ctx context.Context, staffID string, facilities []string) error
	MockAddFacilitiesToClientProfileFn                        func(ctx context.Context, clientID string, facilities []string) error
	MockGetNotificationsCountFn                               func(ctx context.Context, notification gorm.Notification) (int, error)
	MockRegisterCaregiverFn                                   func(ctx context.Context, user *gorm.User, contact *gorm.Contact, caregiver *gorm.Caregiver) error
	MockCreateCaregiverFn                                     func(ctx context.Context, caregiver *gorm.Caregiver) error
	MockGetClientsSurveyCountFn                               func(ctx context.Context, userID string) (int, error)
	MockSearchCaregiverUserFn                                 func(ctx context.Context, searchParameter string) ([]*gorm.Caregiver, error)
	MockSearchPlatformCaregiversFn                            func(ctx context.Context, searchParameter string) ([]*gorm.Caregiver, error)
	MockRemoveFacilitiesFromClientProfileFn                   func(ctx context.Context, clientID string, facilities []string) error
	MockAddCaregiverToClientFn                                func(ctx context.Context, clientCaregiver *gorm.CaregiverClient) error
	MockRemoveFacilitiesFromStaffProfileFn                    func(ctx context.Context, staffID string, facilities []string) error
	MockGetCaregiverManagedClientsFn                          func(ctx context.Context, userID string, pagination *domain.Pagination) ([]*gorm.CaregiverClient, *domain.Pagination, error)
	MockGetCaregiversClientFn                                 func(ctx context.Context, caregiverClient gorm.CaregiverClient) ([]*gorm.CaregiverClient, error)
	MockListClientsCaregiversFn                               func(ctx context.Context, clientID string, pagination *domain.Pagination) ([]*gorm.CaregiverClient, *domain.Pagination, error)
	MockGetCaregiverProfileByCaregiverIDFn                    func(ctx context.Context, caregiverID string) (*gorm.Caregiver, error)
	MockUpdateCaregiverClientFn                               func(ctx context.Context, caregiverClient *gorm.CaregiverClient, updates map[string]interface{}) error
	MockDeleteOrganisationFn                                  func(ctx context.Context, organisation *gorm.Organisation) error
	MockGetOrganisationFn                                     func(ctx context.Context, id string) (*gorm.Organisation, error)
	MockCreateOrganisationFn                                  func(ctx context.Context, organization *gorm.Organisation) (*gorm.Organisation, error)
	MockGetStaffUserProgramsFn                                func(ctx context.Context, userID string) ([]*gorm.Program, error)
	MockGetClientUserProgramsFn                               func(ctx context.Context, userID string) ([]*gorm.Program, error)
	MockCreateProgramFn                                       func(ctx context.Context, program *gorm.Program) (*gorm.Program, error)
	MockCheckOrganisationExistsFn                             func(ctx context.Context, organisationID string) (bool, error)
	MockCheckIfProgramNameExistsFn                            func(ctx context.Context, organisationID string, programName string) (bool, error)
	MockAddFacilityToProgramFn                                func(ctx context.Context, programID string, facilityID []string) error
	MockRegisterExistingUserAsClientFn                        func(ctx context.Context, identifier *gorm.Identifier, client *gorm.Client) (*gorm.Client, error)
	MockRegisterExistingUserAsStaffFn                         func(ctx context.Context, identifier *gorm.Identifier, staff *gorm.StaffProfile) (*gorm.StaffProfile, error)
	MockListOrganisationsFn                                   func(ctx context.Context, pagination *domain.Pagination) ([]*gorm.Organisation, *domain.Pagination, error)
	MockGetProgramFacilitiesFn                                func(ctx context.Context, programID string) ([]*gorm.ProgramFacility, error)
	MockGetProgramByIDFn                                      func(ctx context.Context, programID string) (*gorm.Program, error)
	MockListProgramsFn                                        func(ctx context.Context, organisationID *string, pagination *domain.Pagination) ([]*gorm.Program, *domain.Pagination, error)
	MockCheckIfSuperUserExistsFn                              func(ctx context.Context) (bool, error)
	MockRegisterExistingUserAsCaregiverFn                     func(ctx context.Context, caregiver *gorm.Caregiver) (*gorm.Caregiver, error)
	MockUpdateClientIdentifierFn                              func(ctx context.Context, clientID string, identifierType string, identifierValue string, programID string) error
	MockGetCaregiverProfileByUserIDFn                         func(ctx context.Context, userID string, organisationID string) (*gorm.Caregiver, error)
	MockUpdateCaregiverFn                                     func(ctx context.Context, caregiver *gorm.Caregiver, updates map[string]interface{}) error
	MockSearchProgramsFn                                      func(ctx context.Context, searchParameter string, organisationID string, pagination *domain.Pagination) ([]*gorm.Program, *domain.Pagination, error)
	MockUpdateUserContactFn                                   func(ctx context.Context, userContact *gorm.Contact, updates map[string]interface{}) error
	MockSearchOrganisationsFn                                 func(ctx context.Context, searchParameter string) ([]*gorm.Organisation, error)
	MockCreateFacilitiesFn                                    func(ctx context.Context, facilities []*gorm.Facility) ([]*gorm.Facility, error)
	MockListCommunitiesFn                                     func(ctx context.Context, programID string, organisationID string) ([]*gorm.Community, error)
	MockCreateSecurityQuestionsFn                             func(ctx context.Context, securityQuestions []*gorm.SecurityQuestion) ([]*gorm.SecurityQuestion, error)
	MockCreateTermsOfServiceFn                                func(ctx context.Context, termsOfService *gorm.TermsOfService) (*gorm.TermsOfService, error)
	MockCheckPhoneExistsFn                                    func(ctx context.Context, phone string) (bool, error)
	MockUpdateProgramFn                                       func(ctx context.Context, program *gorm.Program, updateData map[string]interface{}) error
	MockGetStaffServiceRequestByIDFn                          func(ctx context.Context, serviceRequestID string) (*gorm.StaffServiceRequest, error)
	MockCreateOauthClientJWT                                  func(ctx context.Context, jwt *gorm.OauthClientJWT) error
	MockCreateOauthClient                                     func(ctx context.Context, client *gorm.OauthClient) error
	MockGetClientJWT                                          func(ctx context.Context, jti string) (*gorm.OauthClientJWT, error)
	MockGetOauthClient                                        func(ctx context.Context, id string) (*gorm.OauthClient, error)
	MockGetValidClientJWT                                     func(ctx context.Context, jti string) (*gorm.OauthClientJWT, error)
	MockCreateOrUpdateSessionFn                               func(ctx context.Context, session *gorm.Session) error
	MockCreateAuthorizationCodeFn                             func(ctx context.Context, code *gorm.AuthorizationCode) error
	MockGetAuthorizationCodeFn                                func(ctx context.Context, code string) (*gorm.AuthorizationCode, error)
	MockUpdateAuthorizationCodeFn                             func(ctx context.Context, code *gorm.AuthorizationCode, updateData map[string]interface{}) error
	MockCreateAccessTokenFn                                   func(ctx context.Context, token *gorm.AccessToken) error
	MockCreateRefreshTokenFn                                  func(ctx context.Context, token *gorm.RefreshToken) error
	MockDeleteAccessTokenFn                                   func(ctx context.Context, signature string) error
	MockDeleteRefreshTokenFn                                  func(ctx context.Context, signature string) error
	MockGetAccessTokenFn                                      func(ctx context.Context, token gorm.AccessToken) (*gorm.AccessToken, error)
	MockGetRefreshTokenFn                                     func(ctx context.Context, token gorm.RefreshToken) (*gorm.RefreshToken, error)
	MockUpdateAccessTokenFn                                   func(ctx context.Context, code *gorm.AccessToken, updateData map[string]interface{}) error
	MockUpdateRefreshTokenFn                                  func(ctx context.Context, code *gorm.RefreshToken, updateData map[string]interface{}) error
	MockCheckIfClientHasPendingSurveyServiceRequestFn         func(ctx context.Context, clientID string, projectID int, formID string) (bool, error)
	MockGetUserProfileByPushTokenFn                           func(ctx context.Context, pushToken string) (*gorm.User, error)
	MockCheckStaffExistsInProgramFn                           func(ctx context.Context, userID, programID string) (bool, error)
	MockCheckIfFacilityExistsInProgramFn                      func(ctx context.Context, programID, facilityID string) (bool, error)
	MockGetStaffIdentifiersFn                                 func(ctx context.Context, staffID string, identifierType *string) ([]*gorm.Identifier, error)
	MockCheckIfClientExistsInProgramFn                        func(ctx context.Context, userID, programID string) (bool, error)
	MockGetUserClientProfilesFn                               func(ctx context.Context, userID string) ([]*gorm.Client, error)
	MockGetUserStaffProfilesFn                                func(ctx context.Context, userID string) ([]*gorm.StaffProfile, error)
	MockCreateBookingFn                                       func(ctx context.Context, booking *gorm.Booking) (*gorm.Booking, error)
	MockUpdateBookingFn                                       func(ctx context.Context, booking *gorm.Booking, updateData map[string]interface{}) error
	MockListBookingsFn                                        func(ctx context.Context, clientID string, bookingState enums.BookingState, pagination *domain.Pagination) ([]*gorm.Booking, *domain.Pagination, error)
}

GormMock struct implements mocks of `gorm's`internal methods.

func NewGormMock

func NewGormMock() *GormMock

NewGormMock initializes a new instance of `GormMock` then mocking the case of success.

This initialization initializes all the good cases of your mock tests. i.e all success cases should be defined here.

func (*GormMock) AcceptTerms

func (gm *GormMock) AcceptTerms(ctx context.Context, userID *string, termsID *int) (bool, error)

AcceptTerms mocks the implementation of accept current terms of service

func (*GormMock) AddCaregiverToClient

func (gm *GormMock) AddCaregiverToClient(ctx context.Context, clientCaregiver *gorm.CaregiverClient) error

AddCaregiverToClient mocks the implementation of adding a caregiver to a client

func (*GormMock) AddFacilitiesToClientProfile

func (gm *GormMock) AddFacilitiesToClientProfile(ctx context.Context, clientID string, facilities []string) error

AddFacilitiesToClientProfile mocks the implementation of adding facilities to a client profile

func (*GormMock) AddFacilitiesToStaffProfile

func (gm *GormMock) AddFacilitiesToStaffProfile(ctx context.Context, staffID string, facilities []string) error

AddFacilitiesToStaffProfile mocks the implementation of adding facilities to a staff profile

func (*GormMock) AddFacilityToProgram

func (gm *GormMock) AddFacilityToProgram(ctx context.Context, programID string, facilityID []string) error

AddFacilityToProgram mocks the implementation of adding a facility to a program

func (*GormMock) CanRecordHeathDiary

func (gm *GormMock) CanRecordHeathDiary(ctx context.Context, userID string) (bool, error)

CanRecordHeathDiary mocks the implementation of checking if a user can record a health diary

func (*GormMock) CheckAppointmentExistsByExternalID

func (gm *GormMock) CheckAppointmentExistsByExternalID(ctx context.Context, externalID string) (bool, error)

CheckAppointmentExistsByExternalID checks if an appointment with the external id exists

func (*GormMock) CheckCaregiverExists

func (gm *GormMock) CheckCaregiverExists(ctx context.Context, userID string) (bool, error)

CheckCaregiverExists checks if there is a caregiver profile that exists for a user

func (*GormMock) CheckClientExists

func (gm *GormMock) CheckClientExists(ctx context.Context, userID string) (bool, error)

CheckClientExists checks if there is a client profile that exists for a user

func (*GormMock) CheckFacilityExistsByIdentifier

func (gm *GormMock) CheckFacilityExistsByIdentifier(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)

CheckFacilityExistsByIdentifier mocks checking a facility by MFL Code

func (*GormMock) CheckIdentifierExists

func (gm *GormMock) CheckIdentifierExists(ctx context.Context, identifierType string, identifierValue string) (bool, error)

CheckIdentifierExists mocks checking of identifiers

func (*GormMock) CheckIfClientExistsInProgram

func (gm *GormMock) CheckIfClientExistsInProgram(ctx context.Context, userID, programID string) (bool, error)

CheckStaffExistsInProgram mocks the implementation of CheckStaffExistsInProgram method

func (*GormMock) CheckIfClientHasPendingSurveyServiceRequest

func (gm *GormMock) CheckIfClientHasPendingSurveyServiceRequest(ctx context.Context, clientID string, projectID int, formID string) (bool, error)

CheckIfClientHasPendingSurveyServiceRequest mocks the implementation of CheckIfClientHasPendingSurveyServiceRequest method

func (*GormMock) CheckIfClientHasUnresolvedServiceRequests

func (gm *GormMock) CheckIfClientHasUnresolvedServiceRequests(ctx context.Context, clientID string, serviceRequestType string) (bool, error)

CheckIfClientHasUnresolvedServiceRequests mocks the implementation of checking if a client has a pending service request

func (*GormMock) CheckIfFacilityExistsInProgram

func (gm *GormMock) CheckIfFacilityExistsInProgram(ctx context.Context, programID, facilityID string) (bool, error)

CheckIfFacilityExistsInProgram mocks the implementation of CheckIfFacilityExistsInProgram method

func (*GormMock) CheckIfPhoneNumberExists

func (gm *GormMock) CheckIfPhoneNumberExists(ctx context.Context, phone string, isOptedIn bool, flavour feedlib.Flavour) (bool, error)

CheckIfPhoneNumberExists mock the implementation of checking the existence of phone number

func (*GormMock) CheckIfProgramNameExists

func (gm *GormMock) CheckIfProgramNameExists(ctx context.Context, organisationID string, programName string) (bool, error)

CheckIfProgramNameExists mocks the implementation checking if an organisation is associated with a program

func (*GormMock) CheckIfStaffHasUnresolvedServiceRequests

func (gm *GormMock) CheckIfStaffHasUnresolvedServiceRequests(ctx context.Context, staffID string, serviceRequestType string) (bool, error)

CheckIfStaffHasUnresolvedServiceRequests mocks the implementation of checking if a staff has unresolved service requests

func (*GormMock) CheckIfSuperUserExists

func (gm *GormMock) CheckIfSuperUserExists(ctx context.Context) (bool, error)

CheckIfSuperUserExists mocks the implementation of checking if a superuser exists

func (*GormMock) CheckIfUsernameExists

func (gm *GormMock) CheckIfUsernameExists(ctx context.Context, username string) (bool, error)

CheckIfUsernameExists mocks the implementation of checking whether a username exists

func (*GormMock) CheckOrganisationExists

func (gm *GormMock) CheckOrganisationExists(ctx context.Context, organisationID string) (bool, error)

CheckOrganisationExists mocks the implementation checking if the an organisation exists

func (*GormMock) CheckPhoneExists

func (gm *GormMock) CheckPhoneExists(ctx context.Context, phone string) (bool, error)

CheckPhoneExists mocks the implementation of CheckPhoneExists method

func (*GormMock) CheckStaffExists

func (gm *GormMock) CheckStaffExists(ctx context.Context, userID string) (bool, error)

CheckStaffExists checks if there is a staff profile that exists for a user

func (*GormMock) CheckStaffExistsInProgram

func (gm *GormMock) CheckStaffExistsInProgram(ctx context.Context, userID, programID string) (bool, error)

CheckStaffExistsInProgram mocks the implementation of CheckStaffExistsInProgram method

func (*GormMock) CheckUserHasPin

func (gm *GormMock) CheckUserHasPin(ctx context.Context, userID string) (bool, error)

CheckUserHasPin mocks the method for checking if a user has a pin

func (*GormMock) CompleteOnboardingTour

func (gm *GormMock) CompleteOnboardingTour(ctx context.Context, userID string, flavour feedlib.Flavour) (bool, error)

CompleteOnboardingTour mocks the implementation for updating a user's pin change required state

func (*GormMock) CreateAccessToken

func (gm *GormMock) CreateAccessToken(ctx context.Context, token *gorm.AccessToken) error

CreateAccessToken creates a new access token.

func (*GormMock) CreateAppointment

func (gm *GormMock) CreateAppointment(ctx context.Context, appointment *gorm.Appointment) error

CreateAppointment creates an appointment in the database

func (*GormMock) CreateAuthorizationCode

func (gm *GormMock) CreateAuthorizationCode(ctx context.Context, code *gorm.AuthorizationCode) error

CreateAuthorizationCode creates a new authorization code.

func (GormMock) CreateBooking

func (gm GormMock) CreateBooking(ctx context.Context, booking *gorm.Booking) (*gorm.Booking, error)

CreateBooking mocks the implementation that persists a booking record

func (*GormMock) CreateCaregiver

func (gm *GormMock) CreateCaregiver(ctx context.Context, caregiver *gorm.Caregiver) error

CreateCaregiver creates a caregiver record linked to a user

func (*GormMock) CreateClient

func (gm *GormMock) CreateClient(ctx context.Context, client *gorm.Client, contactID, identifierID string) error

CreateClient creates a new client

func (*GormMock) CreateCommunity

func (gm *GormMock) CreateCommunity(ctx context.Context, community *gorm.Community) (*gorm.Community, error)

CreateCommunity mocks the implementation of creating a channel

func (*GormMock) CreateFacilities

func (gm *GormMock) CreateFacilities(ctx context.Context, facilities []*gorm.Facility) ([]*gorm.Facility, error)

CreateFacilities Mocks the implementation of CreateFacilities method

func (*GormMock) CreateHealthDiaryEntry

func (gm *GormMock) CreateHealthDiaryEntry(ctx context.Context, healthDiaryInput *gorm.ClientHealthDiaryEntry) (*gorm.ClientHealthDiaryEntry, error)

CreateHealthDiaryEntry mocks the method for creating a health diary entry

func (*GormMock) CreateIdentifier

func (gm *GormMock) CreateIdentifier(ctx context.Context, identifier *gorm.Identifier) error

CreateIdentifier creates a new identifier

func (*GormMock) CreateMetric

func (gm *GormMock) CreateMetric(ctx context.Context, metric *gorm.Metric) error

CreateMetric saves a metric to the database

func (*GormMock) CreateNotification

func (gm *GormMock) CreateNotification(ctx context.Context, notification *gorm.Notification) error

CreateNotification saves a new notification to the database

func (*GormMock) CreateOauthClient

func (gm *GormMock) CreateOauthClient(ctx context.Context, client *gorm.OauthClient) error

CreateOauthClient creates a new oauth client

func (*GormMock) CreateOauthClientJWT

func (gm *GormMock) CreateOauthClientJWT(ctx context.Context, jwt *gorm.OauthClientJWT) error

CreateOauthClientJWT creates a new oauth jwt client

func (*GormMock) CreateOrUpdateSession

func (gm *GormMock) CreateOrUpdateSession(ctx context.Context, session *gorm.Session) error

CreateOrUpdateSession creates a new session or updates an existing session

func (*GormMock) CreateOrganisation

func (gm *GormMock) CreateOrganisation(ctx context.Context, organisation *gorm.Organisation) (*gorm.Organisation, error)

CreateOrganisation mocks the implementation of creating an organisation

func (*GormMock) CreateProgram

func (gm *GormMock) CreateProgram(ctx context.Context, program *gorm.Program) (*gorm.Program, error)

CreateProgram mocks the implementation of creating a program

func (*GormMock) CreateQuestion

func (gm *GormMock) CreateQuestion(ctx context.Context, question *gorm.Question) error

CreateQuestion mocks the implementation of creating a question

func (*GormMock) CreateQuestionChoice

func (gm *GormMock) CreateQuestionChoice(ctx context.Context, questionChoice *gorm.QuestionInputChoice) error

CreateQuestionChoice mocks the implementation of creating a question input choice

func (*GormMock) CreateQuestionnaire

func (gm *GormMock) CreateQuestionnaire(ctx context.Context, questionnaire *gorm.Questionnaire) error

CreateQuestionnaire mocks the implementation of creating a questionnaire

func (*GormMock) CreateRefreshToken

func (gm *GormMock) CreateRefreshToken(ctx context.Context, token *gorm.RefreshToken) error

CreateRefreshToken creates a new refresh token.

func (*GormMock) CreateScreeningTool

func (gm *GormMock) CreateScreeningTool(ctx context.Context, screeningTool *gorm.ScreeningTool) error

CreateScreeningTool mocks the implementation of creating a screening tool

func (*GormMock) CreateScreeningToolResponse

func (gm *GormMock) CreateScreeningToolResponse(ctx context.Context, screeningToolResponse *gorm.ScreeningToolResponse, screeningToolQuestionResponses []*gorm.ScreeningToolQuestionResponse) (*string, error)

CreateScreeningToolResponse mocks the implementation of creating a screening tool response

func (*GormMock) CreateSecurityQuestions

func (gm *GormMock) CreateSecurityQuestions(ctx context.Context, securityQuestions []*gorm.SecurityQuestion) ([]*gorm.SecurityQuestion, error)

CreateSecurityQuestions mocks the implementation of CreateSecurityQuestions method

func (*GormMock) CreateServiceRequest

func (gm *GormMock) CreateServiceRequest(ctx context.Context, serviceRequestInput *gorm.ClientServiceRequest) error

CreateServiceRequest mocks creating a service request method

func (*GormMock) CreateStaffServiceRequest

func (gm *GormMock) CreateStaffServiceRequest(ctx context.Context, serviceRequestInput *gorm.StaffServiceRequest) error

CreateStaffServiceRequest mocks the implementation creating a staff's service request

func (*GormMock) CreateTermsOfService

func (gm *GormMock) CreateTermsOfService(ctx context.Context, termsOfService *gorm.TermsOfService) (*gorm.TermsOfService, error)

CreateTermsOfService mocks the implementation of CreateTermsOfService method

func (*GormMock) CreateUser

func (gm *GormMock) CreateUser(ctx context.Context, user *gorm.User) error

CreateUser creates a new user

func (*GormMock) CreateUserSurveys

func (gm *GormMock) CreateUserSurveys(ctx context.Context, survey []*gorm.UserSurvey) error

CreateUserSurveys creates a new user survey

func (*GormMock) DeleteAccessToken

func (gm *GormMock) DeleteAccessToken(ctx context.Context, signature string) error

DeleteAccessToken retrieves an access token using the signature

func (*GormMock) DeleteClientProfile

func (gm *GormMock) DeleteClientProfile(ctx context.Context, clientID string, userID *string) error

DeleteClientProfile mocks the implementation of deleting a client user

func (*GormMock) DeleteCommunity

func (gm *GormMock) DeleteCommunity(ctx context.Context, communityID string) error

DeleteCommunity deletes the specified community from the database

func (*GormMock) DeleteFacility

func (gm *GormMock) DeleteFacility(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)

DeleteFacility mocks the implementation of DeleteFacility method.

func (*GormMock) DeleteOrganisation

func (gm *GormMock) DeleteOrganisation(ctx context.Context, organisation *gorm.Organisation) error

DeleteOrganisation mocks the implementation of deleting an organisation

func (*GormMock) DeleteRefreshToken

func (gm *GormMock) DeleteRefreshToken(ctx context.Context, signature string) error

DeleteRefreshToken retrieves a refresh token using the signature

func (*GormMock) DeleteStaffProfile

func (gm *GormMock) DeleteStaffProfile(ctx context.Context, staffID string) error

DeleteStaffProfile mocks the implementation of deleting a staff

func (*GormMock) FindContacts

func (gm *GormMock) FindContacts(ctx context.Context, contactType, contactValue string) ([]*gorm.Contact, error)

FindContacts retrieves all the contacts that match the given contact type and value. Contacts can be shared by users thus the same contact can have multiple records stored

func (*GormMock) GetAccessToken

func (gm *GormMock) GetAccessToken(ctx context.Context, token gorm.AccessToken) (*gorm.AccessToken, error)

GetAccessToken retrieves an access token using the signature

func (*GormMock) GetAllScreeningTools

func (gm *GormMock) GetAllScreeningTools(ctx context.Context, pagination *domain.Pagination) ([]*gorm.ScreeningTool, *domain.Pagination, error)

GetAllScreeningTools mocks the implementation of getting all screening tools

func (*GormMock) GetAppointment

func (gm *GormMock) GetAppointment(ctx context.Context, params *gorm.Appointment) (*gorm.Appointment, error)

GetAppointment returns an appointment by provided params

func (*GormMock) GetAppointmentServiceRequests

func (gm *GormMock) GetAppointmentServiceRequests(ctx context.Context, lastSyncTime time.Time, facilityID string) ([]*gorm.ClientServiceRequest, error)

GetAppointmentServiceRequests mocks the implementation of getting appointments service requests

func (*GormMock) GetAuthorizationCode

func (gm *GormMock) GetAuthorizationCode(ctx context.Context, code string) (*gorm.AuthorizationCode, error)

GetAuthorizationCode retrieves an authorization code using the code

func (*GormMock) GetAvailableScreeningTools

func (gm *GormMock) GetAvailableScreeningTools(ctx context.Context, clientID string, screeningTool gorm.ScreeningTool, screeningToolIDs []string) ([]*gorm.ScreeningTool, error)

GetAvailableScreeningTools mocks the implementation of getting available screening tools

func (*GormMock) GetCaregiverByUserID

func (gm *GormMock) GetCaregiverByUserID(ctx context.Context, userID string) (*gorm.Caregiver, error)

GetCaregiverByUserID returns the caregiver record of the provided user ID

func (*GormMock) GetCaregiverManagedClients

func (gm *GormMock) GetCaregiverManagedClients(ctx context.Context, userID string, pagination *domain.Pagination) ([]*gorm.CaregiverClient, *domain.Pagination, error)

GetCaregiverManagedClients mocks the implementation of getting caregiver's managed clients

func (*GormMock) GetCaregiverProfileByCaregiverID

func (gm *GormMock) GetCaregiverProfileByCaregiverID(ctx context.Context, caregiverID string) (*gorm.Caregiver, error)

GetCaregiverProfileByCaregiverID mocks the implementation of getting a caregiver profile by caregiver ID

func (*GormMock) GetCaregiverProfileByUserID

func (gm *GormMock) GetCaregiverProfileByUserID(ctx context.Context, userID string, organisationID string) (*gorm.Caregiver, error)

GetCaregiverProfileByUserID mocks the implementation of getting a caregiver profile

func (*GormMock) GetCaregiversClient

func (gm *GormMock) GetCaregiversClient(ctx context.Context, caregiverClient gorm.CaregiverClient) ([]*gorm.CaregiverClient, error)

GetCaregiversClient mocks the implementation of getting a record of client - caregiver association

func (*GormMock) GetClientFacilities

func (gm *GormMock) GetClientFacilities(ctx context.Context, clientFacility gorm.ClientFacilities, pagination *domain.Pagination) ([]*gorm.ClientFacilities, *domain.Pagination, error)

GetClientFacilities mocks the implementation of getting a list of client facilities

func (*GormMock) GetClientHealthDiaryEntries

func (gm *GormMock) GetClientHealthDiaryEntries(ctx context.Context, params map[string]interface{}) ([]*gorm.ClientHealthDiaryEntry, error)

GetClientHealthDiaryEntries mocks the implementation of getting all health diary entries that belong to a specific user

func (*GormMock) GetClientHealthDiaryQuote

func (gm *GormMock) GetClientHealthDiaryQuote(ctx context.Context, limit int) ([]*gorm.ClientHealthDiaryQuote, error)

GetClientHealthDiaryQuote mocks the implementation of getting a client's health diary quote

func (*GormMock) GetClientIdentifiers

func (gm *GormMock) GetClientIdentifiers(ctx context.Context, clientID string) ([]*gorm.Identifier, error)

GetClientIdentifiers retrieves a client's ccc identifier

func (*GormMock) GetClientJWT

func (gm *GormMock) GetClientJWT(ctx context.Context, jti string) (*gorm.OauthClientJWT, error)

GetClientJWT retrieves a JWT by unique JTI

func (*GormMock) GetClientProfile

func (gm *GormMock) GetClientProfile(ctx context.Context, userID string, programID string) (*gorm.Client, error)

GetClientProfile mocks the method for fetching a client profile using the user ID

func (*GormMock) GetClientProfileByClientID

func (gm *GormMock) GetClientProfileByClientID(ctx context.Context, clientID string) (*gorm.Client, error)

GetClientProfileByClientID mocks the implementation of getting a client by client ID

func (*GormMock) GetClientProfilesByIdentifier

func (gm *GormMock) GetClientProfilesByIdentifier(ctx context.Context, identifierType, value string) ([]*gorm.Client, error)

GetClientProfilesByIdentifier mocks the implementation of retrieving a client profiles by identifier

func (*GormMock) GetClientScreeningToolServiceRequestByToolType

func (gm *GormMock) GetClientScreeningToolServiceRequestByToolType(ctx context.Context, clientID, toolType, status string) (*gorm.ClientServiceRequest, error)

GetClientScreeningToolServiceRequestByToolType mocks the implementation of getting client screening tool service request

func (*GormMock) GetClientServiceRequestByID

func (gm *GormMock) GetClientServiceRequestByID(ctx context.Context, serviceRequestID string) (*gorm.ClientServiceRequest, error)

GetClientServiceRequestByID mocks the implementation of getting a service request by ID

func (*GormMock) GetClientServiceRequests

func (gm *GormMock) GetClientServiceRequests(ctx context.Context, requestType, status, clientID, facilityID string) ([]*gorm.ClientServiceRequest, error)

GetClientServiceRequests mocks the implementation of getting system generated client service requests

func (*GormMock) GetClientUserPrograms

func (gm *GormMock) GetClientUserPrograms(ctx context.Context, userID string) ([]*gorm.Program, error)

GetClientUserPrograms retrieves all programs associated with a client user

func (*GormMock) GetClientsByFilterParams

func (gm *GormMock) GetClientsByFilterParams(ctx context.Context, facilityID string, filterParams *dto.ClientFilterParamsInput) ([]*gorm.Client, error)

GetClientsByFilterParams returns a list of clients based on the provided filter params

func (*GormMock) GetClientsByParams

func (gm *GormMock) GetClientsByParams(ctx context.Context, params gorm.Client, lastSyncTime *time.Time) ([]*gorm.Client, error)

GetClientsByParams retrieves clients using the parameters provided

func (*GormMock) GetClientsInAFacility

func (gm *GormMock) GetClientsInAFacility(ctx context.Context, facilityID string) ([]*gorm.Client, error)

GetClientsInAFacility mocks getting clients that belong to a certain facility

func (*GormMock) GetClientsPendingServiceRequestsCount

func (gm *GormMock) GetClientsPendingServiceRequestsCount(ctx context.Context, facilityID string, programID *string) (*domain.ServiceRequestsCount, error)

GetClientsPendingServiceRequestsCount mocks the implementation of getting the service requests count

func (*GormMock) GetClientsSurveyCount

func (gm *GormMock) GetClientsSurveyCount(ctx context.Context, userID string) (int, error)

GetClientsSurveyCount mocks the implementation of getting clients survey count

func (*GormMock) GetClientsSurveyServiceRequest

func (gm *GormMock) GetClientsSurveyServiceRequest(ctx context.Context, facilityID string, projectID int, formID string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)

GetClientsSurveyServiceRequest mocks the implementation of getting clients with survey service request

func (*GormMock) GetCommunityByID

func (gm *GormMock) GetCommunityByID(ctx context.Context, communityID string) (*gorm.Community, error)

GetCommunityByID mocks the implementation of getting the community by ID

func (*GormMock) GetContactByUserID

func (gm *GormMock) GetContactByUserID(ctx context.Context, userID *string, contactType string) (*gorm.Contact, error)

GetContactByUserID mocks the implementation of retrieving a contact by user ID

func (*GormMock) GetCurrentTerms

func (gm *GormMock) GetCurrentTerms(ctx context.Context) (*gorm.TermsOfService, error)

GetCurrentTerms mocks the implementation of getting all the current terms of service.

func (*GormMock) GetFacilitiesWithoutFHIRID

func (gm *GormMock) GetFacilitiesWithoutFHIRID(ctx context.Context) ([]*gorm.Facility, error)

GetFacilitiesWithoutFHIRID mocks the implementation of getting a facility without FHIR Organisation

func (*GormMock) GetFacilityRespondedScreeningTools

func (gm *GormMock) GetFacilityRespondedScreeningTools(ctx context.Context, facilityID, programID string, pagination *domain.Pagination) ([]*gorm.ScreeningTool, *domain.Pagination, error)

GetFacilityRespondedScreeningTools mocks the response returned by getting facility responded screening tools

func (*GormMock) GetFacilityStaffs

func (gm *GormMock) GetFacilityStaffs(ctx context.Context, facilityID string) ([]*gorm.StaffProfile, error)

GetFacilityStaffs returns a list of staff at a particular facility

func (*GormMock) GetHealthDiaryEntryByID

func (gm *GormMock) GetHealthDiaryEntryByID(ctx context.Context, healthDiaryEntryID string) (*gorm.ClientHealthDiaryEntry, error)

GetHealthDiaryEntryByID mocks the implementation of getting health diary entry bu a given ID

func (*GormMock) GetNotification

func (gm *GormMock) GetNotification(ctx context.Context, notificationID string) (*gorm.Notification, error)

GetNotification retrieve a notification using the provided ID

func (*GormMock) GetNotificationsCount

func (gm *GormMock) GetNotificationsCount(ctx context.Context, notification gorm.Notification) (int, error)

GetNotificationsCount mocks the implementation of getting notification count

func (*GormMock) GetOTP

func (gm *GormMock) GetOTP(ctx context.Context, phoneNumber string, flavour feedlib.Flavour) (*gorm.UserOTP, error)

GetOTP fetches the OTP for the given phone number

func (*GormMock) GetOauthClient

func (gm *GormMock) GetOauthClient(ctx context.Context, id string) (*gorm.OauthClient, error)

GetOauthClient retrieves a client by ID

func (*GormMock) GetOrCreateContact

func (gm *GormMock) GetOrCreateContact(ctx context.Context, contact *gorm.Contact) (*gorm.Contact, error)

GetOrCreateContact mocks creating a contact

func (*GormMock) GetOrCreateNextOfKin

func (gm *GormMock) GetOrCreateNextOfKin(ctx context.Context, person *gorm.RelatedPerson, clientID, contactID string) error

GetOrCreateNextOfKin mocks creating a related person

func (*GormMock) GetOrganisation

func (gm *GormMock) GetOrganisation(ctx context.Context, id string) (*gorm.Organisation, error)

GetOrganisation retrieves an organisation using the provided id

func (*GormMock) GetProgramByID

func (gm *GormMock) GetProgramByID(ctx context.Context, programID string) (*gorm.Program, error)

GetProgramByID mocks the implementation of getting a program by ID

func (*GormMock) GetProgramClientProfileByIdentifier

func (gm *GormMock) GetProgramClientProfileByIdentifier(ctx context.Context, programID, identifierType, value string) (*gorm.Client, error)

GetProgramClientProfileByIdentifier mocks the implementation of retrieving a client profile by CCC number

func (*GormMock) GetProgramFacilities

func (gm *GormMock) GetProgramFacilities(ctx context.Context, programID string) ([]*gorm.ProgramFacility, error)

GetProgramFacilities mocks the implementation of listing program facilities

func (*GormMock) GetQuestionInputChoicesByQuestionID

func (gm *GormMock) GetQuestionInputChoicesByQuestionID(ctx context.Context, questionID string) ([]*gorm.QuestionInputChoice, error)

GetQuestionInputChoicesByQuestionID mocks the implementation of getting question input choices by question ID

func (*GormMock) GetQuestionnaireByID

func (gm *GormMock) GetQuestionnaireByID(ctx context.Context, questionnaireID string) (*gorm.Questionnaire, error)

GetQuestionnaireByID mocks the implementation of getting a questionnaire by ID

func (*GormMock) GetQuestionsByQuestionnaireID

func (gm *GormMock) GetQuestionsByQuestionnaireID(ctx context.Context, questionnaireID string) ([]*gorm.Question, error)

GetQuestionsByQuestionnaireID mocks the implementation of getting questions by questionnaire ID

func (*GormMock) GetRecentHealthDiaryEntries

func (gm *GormMock) GetRecentHealthDiaryEntries(ctx context.Context, lastSyncTime time.Time, clientID string) ([]*gorm.ClientHealthDiaryEntry, error)

GetRecentHealthDiaryEntries mocks getting the most recent health diary entries

func (*GormMock) GetRefreshToken

func (gm *GormMock) GetRefreshToken(ctx context.Context, token gorm.RefreshToken) (*gorm.RefreshToken, error)

GetRefreshToken retrieves a refresh token using the signature

func (*GormMock) GetScreeningToolByID

func (gm *GormMock) GetScreeningToolByID(ctx context.Context, screeningToolID string) (*gorm.ScreeningTool, error)

GetScreeningToolByID mocks the implementation of getting a screening tool by ID

func (*GormMock) GetScreeningToolQuestionResponsesByResponseID

func (gm *GormMock) GetScreeningToolQuestionResponsesByResponseID(ctx context.Context, responseID string) ([]*gorm.ScreeningToolQuestionResponse, error)

GetScreeningToolQuestionResponsesByResponseID mocks the implementation of getting screening tool question responses by response ID

func (*GormMock) GetScreeningToolResponseByID

func (gm *GormMock) GetScreeningToolResponseByID(ctx context.Context, id string) (*gorm.ScreeningToolResponse, error)

GetScreeningToolResponseByID mocks the implementation of getting a screening tool response by ID

func (*GormMock) GetScreeningToolResponsesWithPendingServiceRequests

func (gm *GormMock) GetScreeningToolResponsesWithPendingServiceRequests(ctx context.Context, clientID, programID string) ([]*gorm.ScreeningToolResponse, error)

GetScreeningToolResponsesWithPendingServiceRequests mocks the implementation of GetScreeningToolResponsesWithPendingServiceRequests method

func (*GormMock) GetScreeningToolResponsesWithin24Hours

func (gm *GormMock) GetScreeningToolResponsesWithin24Hours(ctx context.Context, clientID, programID string) ([]*gorm.ScreeningToolResponse, error)

GetScreeningToolResponsesWithin24Hours mocks the implementation of GetScreeningToolResponsesWithin24Hours method

func (*GormMock) GetScreeningToolServiceRequestOfRespondents

func (gm *GormMock) GetScreeningToolServiceRequestOfRespondents(ctx context.Context, facilityID, programID string, screeningToolID string, searchTerm string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)

GetScreeningToolServiceRequestOfRespondents mocks the implementation of getting screening tool service requests by respondents

func (*GormMock) GetSecurityQuestionByID

func (gm *GormMock) GetSecurityQuestionByID(ctx context.Context, securityQuestionID *string) (*gorm.SecurityQuestion, error)

GetSecurityQuestionByID mocks the implementation of getting a security question by ID

func (*GormMock) GetSecurityQuestionResponse

func (gm *GormMock) GetSecurityQuestionResponse(ctx context.Context, questionID string, userID string) (*gorm.SecurityQuestionResponse, error)

GetSecurityQuestionResponse mocks the get security question implementation

func (*GormMock) GetSecurityQuestions

func (gm *GormMock) GetSecurityQuestions(ctx context.Context, flavour feedlib.Flavour) ([]*gorm.SecurityQuestion, error)

GetSecurityQuestions mocks the implementation of getting all the security questions.

func (*GormMock) GetServiceRequests

func (gm *GormMock) GetServiceRequests(ctx context.Context, requestType, requestStatus *string, facilityID string, programID string, pagination *domain.Pagination) ([]*gorm.ClientServiceRequest, *domain.Pagination, error)

GetServiceRequests mocks the implementation of getting service requests by type

func (*GormMock) GetServiceRequestsForKenyaEMR

func (gm *GormMock) GetServiceRequestsForKenyaEMR(ctx context.Context, facilityID string, lastSyncTime time.Time) ([]*gorm.ClientServiceRequest, error)

GetServiceRequestsForKenyaEMR mocks the getting of service requests attached to a specific facility for use by KenyaEMR

func (*GormMock) GetSharedHealthDiaryEntries

func (gm *GormMock) GetSharedHealthDiaryEntries(ctx context.Context, clientID string, facilityID string) ([]*gorm.ClientHealthDiaryEntry, error)

GetSharedHealthDiaryEntries mocks the implementation of getting the most recently shared health diary entires by the client to a health care worker

func (*GormMock) GetStaffFacilities

func (gm *GormMock) GetStaffFacilities(ctx context.Context, staffFacility gorm.StaffFacilities, pagination *domain.Pagination) ([]*gorm.StaffFacilities, *domain.Pagination, error)

GetStaffFacilities mocks the implementation of getting a list of staff facilities

func (*GormMock) GetStaffIdentifiers

func (gm *GormMock) GetStaffIdentifiers(ctx context.Context, staffID string, identifierType *string) ([]*gorm.Identifier, error)

CheckIfFacilityExistsInProgram mocks the implementation of CheckIfFacilityExistsInProgram method

func (*GormMock) GetStaffPendingServiceRequestsCount

func (gm *GormMock) GetStaffPendingServiceRequestsCount(ctx context.Context, facilityID string, programID string) (*domain.ServiceRequestsCount, error)

GetStaffPendingServiceRequestsCount mocks the implementation getting staffs pin reset requests

func (*GormMock) GetStaffProfile

func (gm *GormMock) GetStaffProfile(ctx context.Context, userID string, programID string) (*gorm.StaffProfile, error)

GetStaffProfile mocks the method for fetching a staff profile using the user ID

func (*GormMock) GetStaffProfileByStaffID

func (gm *GormMock) GetStaffProfileByStaffID(ctx context.Context, staffID string) (*gorm.StaffProfile, error)

GetStaffProfileByStaffID mocks the implementation getting staff profile by staff ID

func (*GormMock) GetStaffServiceRequestByID

func (gm *GormMock) GetStaffServiceRequestByID(ctx context.Context, serviceRequestID string) (*gorm.StaffServiceRequest, error)

GetStaffServiceRequestByID mocks the implementation of GetStaffServiceRequestByID method

func (*GormMock) GetStaffServiceRequests

func (gm *GormMock) GetStaffServiceRequests(ctx context.Context, requestType, requestStatus *string, facilityID string, pagination *domain.Pagination) ([]*gorm.StaffServiceRequest, *domain.Pagination, error)

GetStaffServiceRequests mocks the implementation of getting staffs requests

func (*GormMock) GetStaffUserPrograms

func (gm *GormMock) GetStaffUserPrograms(ctx context.Context, userID string) ([]*gorm.Program, error)

GetStaffUserPrograms retrieves all programs associated with a staff user

func (*GormMock) GetSurveysWithServiceRequests

func (gm *GormMock) GetSurveysWithServiceRequests(ctx context.Context, facilityID, programID string) ([]*gorm.UserSurvey, error)

GetSurveysWithServiceRequests mocks the implementation of getting surveys with service requests

func (*GormMock) GetUserClientProfiles

func (gm *GormMock) GetUserClientProfiles(ctx context.Context, userID string) ([]*gorm.Client, error)

GetUserClientProfiles mocks the implementation of GetUserClientProfiles method

func (*GormMock) GetUserPINByUserID

func (gm *GormMock) GetUserPINByUserID(ctx context.Context, userID string) (*gorm.PINData, error)

GetUserPINByUserID mocks the implementation of retrieving a user pin by user ID

func (*GormMock) GetUserProfileByPhoneNumber

func (gm *GormMock) GetUserProfileByPhoneNumber(ctx context.Context, phoneNumber string) (*gorm.User, error)

GetUserProfileByPhoneNumber mocks the implementation of retrieving a user profile by phonenumber

func (*GormMock) GetUserProfileByPushToken

func (gm *GormMock) GetUserProfileByPushToken(ctx context.Context, pushToken string) (*gorm.User, error)

GetUserProfileByPushToken mocks the implementation of get user profile by push token

func (*GormMock) GetUserProfileByStaffID

func (gm *GormMock) GetUserProfileByStaffID(ctx context.Context, staffID string) (*gorm.User, error)

GetUserProfileByStaffID mocks the implementation of getting a user profile by staff ID

func (*GormMock) GetUserProfileByUserID

func (gm *GormMock) GetUserProfileByUserID(ctx context.Context, userID *string) (*gorm.User, error)

GetUserProfileByUserID mocks the implementation of retrieving a user profile by user ID

func (*GormMock) GetUserProfileByUsername

func (gm *GormMock) GetUserProfileByUsername(ctx context.Context, username string) (*gorm.User, error)

GetUserProfileByUsername retrieves a user using their username

func (*GormMock) GetUserSecurityQuestionsResponses

func (gm *GormMock) GetUserSecurityQuestionsResponses(ctx context.Context, userID, flavour string) ([]*gorm.SecurityQuestionResponse, error)

GetUserSecurityQuestionsResponses mocks the implementation of getting the user's responded security questions

func (*GormMock) GetUserStaffProfiles

func (gm *GormMock) GetUserStaffProfiles(ctx context.Context, userID string) ([]*gorm.StaffProfile, error)

GetUserStaffProfiles mocks the implementation of GetUserStaffProfiles method

func (*GormMock) GetUserSurveyForms

func (gm *GormMock) GetUserSurveyForms(ctx context.Context, params map[string]interface{}) ([]*gorm.UserSurvey, error)

GetUserSurveyForms mocks the implementation of getting user survey forms

func (*GormMock) GetValidClientJWT

func (gm *GormMock) GetValidClientJWT(ctx context.Context, jti string) (*gorm.OauthClientJWT, error)

GetValidClientJWT retrieves a JWT that is still valid i.e not expired

func (*GormMock) InactivateFacility

func (gm *GormMock) InactivateFacility(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)

InactivateFacility mocks the implementation of inactivating the active status of a particular facility

func (*GormMock) InvalidatePIN

func (gm *GormMock) InvalidatePIN(ctx context.Context, userID string) (bool, error)

InvalidatePIN mocks the implementation of invalidating the pin

func (*GormMock) ListAppointments

func (gm *GormMock) ListAppointments(ctx context.Context, params *gorm.Appointment, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*gorm.Appointment, *domain.Pagination, error)

ListAppointments Retrieves appointments using the provided parameters and filters

func (*GormMock) ListAvailableNotificationTypes

func (gm *GormMock) ListAvailableNotificationTypes(ctx context.Context, params *gorm.Notification) ([]enums.NotificationType, error)

ListAvailableNotificationTypes retrieves the distinct notification types available for a user

func (GormMock) ListBookings

func (gm GormMock) ListBookings(ctx context.Context, clientID string, bookingState enums.BookingState, pagination *domain.Pagination) ([]*gorm.Booking, *domain.Pagination, error)

ListBookings is used to mock the implementation of listing bookings

func (*GormMock) ListClientsCaregivers

func (gm *GormMock) ListClientsCaregivers(ctx context.Context, clientID string, pagination *domain.Pagination) ([]*gorm.CaregiverClient, *domain.Pagination, error)

ListClientsCaregivers mocks the implementation of listing clients caregivers

func (*GormMock) ListCommunities

func (gm *GormMock) ListCommunities(ctx context.Context, programID string, organisationID string) ([]*gorm.Community, error)

ListCommunities mocks the implementation of listing communities

func (*GormMock) ListFacilities

func (gm *GormMock) ListFacilities(ctx context.Context, searchTerm *string, filter []*domain.FiltersParam, pagination *domain.Pagination) ([]*gorm.Facility, *domain.Pagination, error)

ListFacilities mocks the implementation of `gorm's` ListFacilities method.

func (*GormMock) ListNotifications

func (gm *GormMock) ListNotifications(ctx context.Context, params *gorm.Notification, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*gorm.Notification, *domain.Pagination, error)

ListNotifications Retrieves notifications using the provided parameters and filters

func (*GormMock) ListOrganisations

func (gm *GormMock) ListOrganisations(ctx context.Context, pagination *domain.Pagination) ([]*gorm.Organisation, *domain.Pagination, error)

ListOrganisations mocks the implementation of listing organisations

func (*GormMock) ListProgramFacilities

func (gm *GormMock) ListProgramFacilities(ctx context.Context, programID, searchTerm *string, filter []*domain.FiltersParam, pagination *domain.Pagination) ([]*gorm.Facility, *domain.Pagination, error)

ListProgramFacilities mocks the implementation of ListProgramFacilities method.

func (*GormMock) ListPrograms

func (gm *GormMock) ListPrograms(ctx context.Context, organisationID *string, pagination *domain.Pagination) ([]*gorm.Program, *domain.Pagination, error)

ListPrograms mocks the implementation of getting programs

func (*GormMock) ListSurveyRespondents

func (gm *GormMock) ListSurveyRespondents(ctx context.Context, params *gorm.UserSurvey, facilityID string, pagination *domain.Pagination) ([]*gorm.UserSurvey, *domain.Pagination, error)

ListSurveyRespondents mocks the implementation of listing survey respondents

func (*GormMock) ReactivateFacility

func (gm *GormMock) ReactivateFacility(ctx context.Context, identifier *gorm.FacilityIdentifier) (bool, error)

ReactivateFacility mocks the implementation of re-activating the active status of a particular facility

func (*GormMock) RegisterCaregiver

func (gm *GormMock) RegisterCaregiver(ctx context.Context, user *gorm.User, contact *gorm.Contact, caregiver *gorm.Caregiver) error

RegisterCaregiver registers a new caregiver

func (*GormMock) RegisterClient

func (gm *GormMock) RegisterClient(ctx context.Context, user *gorm.User, contact *gorm.Contact, identifier *gorm.Identifier, client *gorm.Client) (*gorm.Client, error)

RegisterClient mocks the implementation of registering a client

func (*GormMock) RegisterExistingUserAsCaregiver

func (gm *GormMock) RegisterExistingUserAsCaregiver(ctx context.Context, caregiver *gorm.Caregiver) (*gorm.Caregiver, error)

RegisterExistingUserAsCaregiver mocks the implementation of registering an existing user as a caregiver

func (*GormMock) RegisterExistingUserAsClient

func (gm *GormMock) RegisterExistingUserAsClient(ctx context.Context, identifier *gorm.Identifier, client *gorm.Client) (*gorm.Client, error)

RegisterExistingUserAsClient mocks the implementation of registering an existing user as a client

func (*GormMock) RegisterExistingUserAsStaff

func (gm *GormMock) RegisterExistingUserAsStaff(ctx context.Context, identifier *gorm.Identifier, staff *gorm.StaffProfile) (*gorm.StaffProfile, error)

RegisterExistingUserAsStaff mocks the implementation of registering an existing user as staff

func (*GormMock) RegisterStaff

func (gm *GormMock) RegisterStaff(ctx context.Context, user *gorm.User, contact *gorm.Contact, identifier *gorm.Identifier, staffProfile *gorm.StaffProfile) (*gorm.StaffProfile, error)

RegisterStaff mocks the implementation of registering a staff

func (*GormMock) RemoveFacilitiesFromClientProfile

func (gm *GormMock) RemoveFacilitiesFromClientProfile(ctx context.Context, clientID string, facilities []string) error

RemoveFacilitiesFromClientProfile mocks the implementation of removing facilities from a client profile

func (*GormMock) RemoveFacilitiesFromStaffProfile

func (gm *GormMock) RemoveFacilitiesFromStaffProfile(ctx context.Context, staffID string, facilities []string) error

RemoveFacilitiesFromStaffProfile mocks the implementation of removing facilities from a staff profile

func (*GormMock) ResolveStaffServiceRequest

func (gm *GormMock) ResolveStaffServiceRequest(ctx context.Context, staffID *string, serviceRequestID *string, verificationStatus string) (bool, error)

ResolveStaffServiceRequest mocks the implementation resolving staff service requests

func (*GormMock) RetrieveFacility

func (gm *GormMock) RetrieveFacility(ctx context.Context, id *string, isActive bool) (*gorm.Facility, error)

RetrieveFacility mocks the implementation of `gorm's` RetrieveFacility method.

func (*GormMock) RetrieveFacilityByIdentifier

func (gm *GormMock) RetrieveFacilityByIdentifier(ctx context.Context, identifier *gorm.FacilityIdentifier, isActive bool) (*gorm.Facility, error)

RetrieveFacilityByIdentifier mocks the implementation of `gorm's` RetrieveFacility method.

func (*GormMock) RetrieveFacilityIdentifiersByFacilityID

func (gm *GormMock) RetrieveFacilityIdentifiersByFacilityID(ctx context.Context, facilityID *string) ([]*gorm.FacilityIdentifier, error)

RetrieveFacilityIdentifiersByFacilityID mocks the implementation of getting facility identifier by facility id

func (*GormMock) SaveFeedback

func (gm *GormMock) SaveFeedback(ctx context.Context, feedback *gorm.Feedback) error

SaveFeedback mocks the implementation of saving feedback into the database

func (*GormMock) SaveOTP

func (gm *GormMock) SaveOTP(ctx context.Context, otpInput *gorm.UserOTP) error

SaveOTP mocks the implementation for saving an OTP

func (*GormMock) SavePin

func (gm *GormMock) SavePin(ctx context.Context, pinData *gorm.PINData) (bool, error)

SavePin mocks the implementation of saving the pin to the database

func (*GormMock) SaveSecurityQuestionResponse

func (gm *GormMock) SaveSecurityQuestionResponse(ctx context.Context, securityQuestionResponse []*gorm.SecurityQuestionResponse) error

SaveSecurityQuestionResponse mocks the implementation of saving a security question response

func (*GormMock) SaveTemporaryUserPin

func (gm *GormMock) SaveTemporaryUserPin(ctx context.Context, pinData *gorm.PINData) (bool, error)

SaveTemporaryUserPin mocks the implementation of saving a temporary user pin

func (*GormMock) SearchCaregiverUser

func (gm *GormMock) SearchCaregiverUser(ctx context.Context, searchParameter string) ([]*gorm.Caregiver, error)

SearchCaregiverUser mocks the searching of caregiver user

func (*GormMock) SearchClientProfile

func (gm *GormMock) SearchClientProfile(ctx context.Context, searchTerm string) ([]*gorm.Client, error)

SearchClientProfile mocks the implementation of searching for client profiles.

func (*GormMock) SearchClientServiceRequests

func (gm *GormMock) SearchClientServiceRequests(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*gorm.ClientServiceRequest, error)

SearchClientServiceRequests mocks the implementation of searching client service requests

func (*GormMock) SearchOrganisation

func (gm *GormMock) SearchOrganisation(ctx context.Context, searchParameter string) ([]*gorm.Organisation, error)

SearchOrganisation mocks the implementation of searching for organisations

func (*GormMock) SearchPlatformCaregivers

func (gm *GormMock) SearchPlatformCaregivers(ctx context.Context, searchParameter string) ([]*gorm.Caregiver, error)

SearchPlatformCaregivers mocks the searching of caregiver user

func (*GormMock) SearchPrograms

func (gm *GormMock) SearchPrograms(ctx context.Context, searchParameter string, organisationID string, pagination *domain.Pagination) ([]*gorm.Program, *domain.Pagination, error)

SearchPrograms mocks the implementation of searching programs

func (*GormMock) SearchStaffProfile

func (gm *GormMock) SearchStaffProfile(ctx context.Context, searchParameter string, programID *string) ([]*gorm.StaffProfile, error)

SearchStaffProfile mocks the implementation of getting staff profile using their staff number.

func (*GormMock) SearchStaffServiceRequests

func (gm *GormMock) SearchStaffServiceRequests(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*gorm.StaffServiceRequest, error)

SearchStaffServiceRequests mocks the implementation of searching client service requests

func (*GormMock) SetInProgressBy

func (gm *GormMock) SetInProgressBy(ctx context.Context, requestID, staffID string) (bool, error)

SetInProgressBy mocks the implementation of the `SetInProgressBy` update method

func (*GormMock) UpdateAccessToken

func (gm *GormMock) UpdateAccessToken(ctx context.Context, code *gorm.AccessToken, updateData map[string]interface{}) error

UpdateAccessToken updates the details of a given access token

func (*GormMock) UpdateAppointment

func (gm *GormMock) UpdateAppointment(ctx context.Context, appointment *gorm.Appointment, updateData map[string]interface{}) (*gorm.Appointment, error)

UpdateAppointment updates the details of an appointment requires the ID or appointment_uuid to be provided

func (*GormMock) UpdateAuthorizationCode

func (gm *GormMock) UpdateAuthorizationCode(ctx context.Context, code *gorm.AuthorizationCode, updateData map[string]interface{}) error

UpdateAuthorizationCode updates the details of a given code

func (GormMock) UpdateBooking

func (gm GormMock) UpdateBooking(ctx context.Context, booking *gorm.Booking, updateData map[string]interface{}) error

UpdateBooking mocks the implementation of updating booking model

func (*GormMock) UpdateCaregiver

func (gm *GormMock) UpdateCaregiver(ctx context.Context, caregiver *gorm.Caregiver, updates map[string]interface{}) error

UpdateCaregiver mocks the implementation of updating a caregiver

func (*GormMock) UpdateCaregiverClient

func (gm *GormMock) UpdateCaregiverClient(ctx context.Context, caregiverClient *gorm.CaregiverClient, updates map[string]interface{}) error

UpdateCaregiverClient mocks the accepting of caregiver consent

func (*GormMock) UpdateClient

func (gm *GormMock) UpdateClient(ctx context.Context, client *gorm.Client, updates map[string]interface{}) (*gorm.Client, error)

UpdateClient updates details for a particular client

func (*GormMock) UpdateClientCaregiver

func (gm *GormMock) UpdateClientCaregiver(ctx context.Context, caregiverInput *dto.CaregiverInput) error

UpdateClientCaregiver mocks the implementation of updating a caregiver

func (*GormMock) UpdateClientIdentifier

func (gm *GormMock) UpdateClientIdentifier(ctx context.Context, clientID string, identifierType string, identifierValue string, programID string) error

UpdateClientIdentifier mocks the implementation of updating a client identifier

func (*GormMock) UpdateClientServiceRequest

func (gm *GormMock) UpdateClientServiceRequest(ctx context.Context, serviceRequest *gorm.ClientServiceRequest, updateData map[string]interface{}) error

UpdateClientServiceRequest updates a client service request

func (*GormMock) UpdateFacility

func (gm *GormMock) UpdateFacility(ctx context.Context, facility *gorm.Facility, updateData map[string]interface{}) error

UpdateFacility mocks the implementation of updating a facility

func (*GormMock) UpdateFailedSecurityQuestionsAnsweringAttempts

func (gm *GormMock) UpdateFailedSecurityQuestionsAnsweringAttempts(ctx context.Context, userID string, failCount int) error

UpdateFailedSecurityQuestionsAnsweringAttempts mocks the implementation of resetting failed security attempts

func (*GormMock) UpdateHealthDiary

func (gm *GormMock) UpdateHealthDiary(ctx context.Context, clientHealthDiaryEntry *gorm.ClientHealthDiaryEntry, updateData map[string]interface{}) error

UpdateHealthDiary mocks the implementation of updating the share status of a health diary entry when the client opts for the sharing

func (*GormMock) UpdateIsCorrectSecurityQuestionResponse

func (gm *GormMock) UpdateIsCorrectSecurityQuestionResponse(ctx context.Context, userID string, isCorrectSecurityQuestionResponse bool) (bool, error)

UpdateIsCorrectSecurityQuestionResponse updates the is_correct security question response

func (*GormMock) UpdateNotification

func (gm *GormMock) UpdateNotification(ctx context.Context, notification *gorm.Notification, updateData map[string]interface{}) error

UpdateNotification updates a notification with the new data

func (*GormMock) UpdateProgram

func (gm *GormMock) UpdateProgram(ctx context.Context, program *gorm.Program, updateData map[string]interface{}) error

UpdateProgram updates the program details

func (*GormMock) UpdateRefreshToken

func (gm *GormMock) UpdateRefreshToken(ctx context.Context, code *gorm.RefreshToken, updateData map[string]interface{}) error

UpdateRefreshToken updates the details of a given refresh token

func (*GormMock) UpdateServiceRequests

func (gm *GormMock) UpdateServiceRequests(ctx context.Context, payload []*gorm.ClientServiceRequest) (bool, error)

UpdateServiceRequests mocks the implementation of updating service requests from KenyaEMR to MyCareHub

func (*GormMock) UpdateStaff

func (gm *GormMock) UpdateStaff(ctx context.Context, staff *gorm.StaffProfile, updates map[string]interface{}) (*gorm.StaffProfile, error)

UpdateStaff mock the implementation of updating a staff profile

func (*GormMock) UpdateUser

func (gm *GormMock) UpdateUser(ctx context.Context, user *gorm.User, updateData map[string]interface{}) error

UpdateUser mocks the implementation of updating a user profile

func (*GormMock) UpdateUserContact

func (gm *GormMock) UpdateUserContact(ctx context.Context, userContact *gorm.Contact, updates map[string]interface{}) error

UpdateUserContact mocks the implementation of updating a user contact

func (*GormMock) UpdateUserPinChangeRequiredStatus

func (gm *GormMock) UpdateUserPinChangeRequiredStatus(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error

UpdateUserPinChangeRequiredStatus mocks the implementation of updating a user pin change required state

func (*GormMock) UpdateUserPinUpdateRequiredStatus

func (gm *GormMock) UpdateUserPinUpdateRequiredStatus(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error

UpdateUserPinUpdateRequiredStatus mocks updating a user `pin update required status`

func (*GormMock) UpdateUserSurveys

func (gm *GormMock) UpdateUserSurveys(ctx context.Context, survey *gorm.UserSurvey, updateData map[string]interface{}) error

UpdateUserSurveys mocks the implementation of `gorm's` UpdateUserSurveys method.

func (*GormMock) VerifyOTP

func (gm *GormMock) VerifyOTP(ctx context.Context, payload *dto.VerifyOTPInput) (bool, error)

VerifyOTP mocks the implementation of verify otp

Jump to

Keyboard shortcuts

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