Documentation
¶
Index ¶
- type PostgresMock
- func (gm *PostgresMock) AcceptTerms(ctx context.Context, userID *string, termsID *int) (bool, error)
- func (gm *PostgresMock) AddCaregiverToClient(ctx context.Context, clientCaregiver *domain.CaregiverClient) error
- func (gm *PostgresMock) AddFacilitiesToClientProfile(ctx context.Context, clientID string, facilities []string) error
- func (gm *PostgresMock) AddFacilitiesToStaffProfile(ctx context.Context, staffID string, facilities []string) error
- func (gm *PostgresMock) AddFacilityToProgram(ctx context.Context, programID string, facilityIDs []string) ([]*domain.Facility, error)
- func (gm *PostgresMock) CanRecordHeathDiary(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) CheckAppointmentExistsByExternalID(ctx context.Context, externalID string) (bool, error)
- func (gm *PostgresMock) CheckCaregiverExists(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) CheckClientExists(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) CheckFacilityExistsByIdentifier(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
- func (gm *PostgresMock) CheckIdentifierExists(ctx context.Context, identifierType enums.UserIdentifierType, ...) (bool, error)
- func (gm *PostgresMock) CheckIfClientExistsInProgram(ctx context.Context, userID, programID string) (bool, error)
- func (gm *PostgresMock) CheckIfClientHasPendingSurveyServiceRequest(ctx context.Context, clientID string, projectID int, formID string) (bool, error)
- func (gm *PostgresMock) CheckIfClientHasUnresolvedServiceRequests(ctx context.Context, clientID string, serviceRequestType string) (bool, error)
- func (gm *PostgresMock) CheckIfFacilityExistsInProgram(ctx context.Context, programID, facilityID string) (bool, error)
- func (gm *PostgresMock) CheckIfPhoneNumberExists(ctx context.Context, phone string, isOptedIn bool, flavour feedlib.Flavour) (bool, error)
- func (gm *PostgresMock) CheckIfProgramNameExists(ctx context.Context, organisationID string, programName string) (bool, error)
- func (gm *PostgresMock) CheckIfStaffHasUnresolvedServiceRequests(ctx context.Context, staffID string, serviceRequestType string) (bool, error)
- func (gm *PostgresMock) CheckIfSuperUserExists(ctx context.Context) (bool, error)
- func (gm *PostgresMock) CheckIfUsernameExists(ctx context.Context, username string) (bool, error)
- func (gm *PostgresMock) CheckOrganisationExists(ctx context.Context, organisationID string) (bool, error)
- func (gm *PostgresMock) CheckPhoneExists(ctx context.Context, phone string) (bool, error)
- func (gm *PostgresMock) CheckStaffExists(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) CheckStaffExistsInProgram(ctx context.Context, userID, programID string) (bool, error)
- func (gm *PostgresMock) CheckUserHasPin(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) CompleteOnboardingTour(ctx context.Context, userID string, flavour feedlib.Flavour) (bool, error)
- func (gm *PostgresMock) CreateAccessToken(ctx context.Context, token *domain.AccessToken) error
- func (gm *PostgresMock) CreateAppointment(ctx context.Context, appointment domain.Appointment) error
- func (gm *PostgresMock) CreateAuthorizationCode(ctx context.Context, code *domain.AuthorizationCode) error
- func (gm *PostgresMock) CreateBooking(ctx context.Context, booking *domain.Booking) (*domain.Booking, error)
- func (gm *PostgresMock) CreateCaregiver(ctx context.Context, caregiver domain.Caregiver) (*domain.Caregiver, error)
- func (gm *PostgresMock) CreateClient(ctx context.Context, client domain.ClientProfile, ...) (*domain.ClientProfile, error)
- func (gm *PostgresMock) CreateClientCaregiver(ctx context.Context, caregiverInput *dto.CaregiverInput) error
- func (gm *PostgresMock) CreateCommunity(ctx context.Context, community *domain.Community) (*domain.Community, error)
- func (gm *PostgresMock) CreateFacilities(ctx context.Context, facilities []*domain.Facility) ([]*domain.Facility, error)
- func (gm *PostgresMock) CreateHealthDiaryEntry(ctx context.Context, healthDiaryInput *domain.ClientHealthDiaryEntry) (*domain.ClientHealthDiaryEntry, error)
- func (gm *PostgresMock) CreateIdentifier(ctx context.Context, identifier domain.Identifier) (*domain.Identifier, error)
- func (gm *PostgresMock) CreateMetric(ctx context.Context, payload *domain.Metric) error
- func (gm *PostgresMock) CreateOauthClient(ctx context.Context, client *domain.OauthClient) error
- func (gm *PostgresMock) CreateOauthClientJWT(ctx context.Context, jwt *domain.OauthClientJWT) error
- func (gm *PostgresMock) CreateOrUpdateSession(ctx context.Context, session *domain.Session) error
- func (gm *PostgresMock) CreateOrganisation(ctx context.Context, organisation *domain.Organisation, ...) (*domain.Organisation, error)
- func (gm *PostgresMock) CreateProgram(ctx context.Context, program *dto.ProgramInput) (*domain.Program, error)
- func (gm *PostgresMock) CreateRefreshToken(ctx context.Context, token *domain.RefreshToken) error
- func (gm *PostgresMock) CreateScreeningTool(ctx context.Context, payload *domain.ScreeningTool) error
- func (gm *PostgresMock) CreateScreeningToolResponse(ctx context.Context, input *domain.QuestionnaireScreeningToolResponse) (*string, error)
- func (gm *PostgresMock) CreateSecurityQuestions(ctx context.Context, securityQuestions []*domain.SecurityQuestion) ([]*domain.SecurityQuestion, error)
- func (gm *PostgresMock) CreateServiceRequest(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
- func (gm *PostgresMock) CreateStaffServiceRequest(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
- func (gm *PostgresMock) CreateTermsOfService(ctx context.Context, termsOfService *domain.TermsOfService) (*domain.TermsOfService, error)
- func (gm *PostgresMock) CreateUser(ctx context.Context, user domain.User) (*domain.User, error)
- func (gm *PostgresMock) CreateUserSurveys(ctx context.Context, survey []*dto.UserSurveyInput) error
- func (gm *PostgresMock) DeleteAccessToken(ctx context.Context, signature string) error
- func (gm *PostgresMock) DeleteClientProfile(ctx context.Context, clientID string, userID *string) error
- func (gm *PostgresMock) DeleteCommunity(ctx context.Context, communityID string) error
- func (gm *PostgresMock) DeleteFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
- func (gm *PostgresMock) DeleteOrganisation(ctx context.Context, organisation *domain.Organisation) error
- func (gm *PostgresMock) DeleteRefreshToken(ctx context.Context, signature string) error
- func (gm *PostgresMock) DeleteStaffProfile(ctx context.Context, staffID string) error
- func (gm *PostgresMock) FetchFacilities(ctx context.Context) ([]*domain.Facility, error)
- func (gm *PostgresMock) FindContacts(ctx context.Context, contactType, contactValue string) ([]*domain.Contact, error)
- func (gm *PostgresMock) GenerateRetryOTP(ctx context.Context, payload *dto.SendRetryOTPPayload) (string, error)
- func (gm *PostgresMock) GetAccessToken(ctx context.Context, token domain.AccessToken) (*domain.AccessToken, error)
- func (gm *PostgresMock) GetAllScreeningTools(ctx context.Context, pagination *domain.Pagination) ([]*domain.ScreeningTool, *domain.Pagination, error)
- func (gm *PostgresMock) GetAppointment(ctx context.Context, params domain.Appointment) (*domain.Appointment, error)
- func (gm *PostgresMock) GetAppointmentByClientID(ctx context.Context, clientID string) (*domain.Appointment, error)
- func (gm *PostgresMock) GetAppointmentServiceRequests(ctx context.Context, lastSyncTime time.Time, mflCode string) ([]domain.AppointmentServiceRequests, error)
- func (gm *PostgresMock) GetAuthorizationCode(ctx context.Context, code string) (*domain.AuthorizationCode, error)
- func (gm *PostgresMock) GetAvailableScreeningTools(ctx context.Context, clientID string, screeningTool domain.ScreeningTool, ...) ([]*domain.ScreeningTool, error)
- func (gm *PostgresMock) GetCaregiverByUserID(ctx context.Context, userID string) (*domain.Caregiver, error)
- func (gm *PostgresMock) GetCaregiverManagedClients(ctx context.Context, userID string, pagination *domain.Pagination) ([]*domain.ManagedClient, *domain.Pagination, error)
- func (gm *PostgresMock) GetCaregiverProfileByCaregiverID(ctx context.Context, caregiverID string) (*domain.CaregiverProfile, error)
- func (gm *PostgresMock) GetCaregiverProfileByUserID(ctx context.Context, organisationID string, clientID string) (*domain.CaregiverProfile, error)
- func (gm *PostgresMock) GetCaregiversClient(ctx context.Context, caregiverClient domain.CaregiverClient) ([]*domain.CaregiverClient, error)
- func (gm *PostgresMock) GetClientCaregiver(ctx context.Context, caregiverID string) (*domain.Caregiver, error)
- func (gm *PostgresMock) GetClientFacilities(ctx context.Context, input dto.ClientFacilityInput, ...) ([]*domain.Facility, *domain.Pagination, error)
- func (gm *PostgresMock) GetClientHealthDiaryEntries(ctx context.Context, clientID string, moodType *enums.Mood, shared *bool) ([]*domain.ClientHealthDiaryEntry, error)
- func (gm *PostgresMock) GetClientHealthDiaryQuote(ctx context.Context, limit int) ([]*domain.ClientHealthDiaryQuote, error)
- func (gm *PostgresMock) GetClientIdentifiers(ctx context.Context, clientID string) ([]*domain.Identifier, error)
- func (gm *PostgresMock) GetClientJWT(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
- func (gm *PostgresMock) GetClientProfile(ctx context.Context, userID string, programID string) (*domain.ClientProfile, error)
- func (gm *PostgresMock) GetClientProfileByClientID(ctx context.Context, clientID string) (*domain.ClientProfile, error)
- func (gm *PostgresMock) GetClientProfilesByIdentifier(ctx context.Context, identifierType, value string) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) GetClientScreeningToolServiceRequestByToolType(ctx context.Context, clientID string, questionID string, status string) (*domain.ServiceRequest, error)
- func (gm *PostgresMock) GetClientServiceRequestByID(ctx context.Context, serviceRequestID string) (*domain.ServiceRequest, error)
- func (gm *PostgresMock) GetClientServiceRequests(ctx context.Context, requestType, status, clientID, facilityID string) ([]*domain.ServiceRequest, error)
- func (gm *PostgresMock) GetClientUserPrograms(ctx context.Context, userID string) ([]*domain.Program, error)
- func (gm *PostgresMock) GetClientsByFilterParams(ctx context.Context, facilityID *string, ...) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) GetClientsByParams(ctx context.Context, params gorm.Client, lastSyncTime *time.Time) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) GetClientsInAFacility(ctx context.Context, facilityID string) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) GetCommunityByID(ctx context.Context, communityID string) (*domain.Community, error)
- func (gm *PostgresMock) GetContactByUserID(ctx context.Context, userID *string, contactType string) (*domain.Contact, error)
- func (gm *PostgresMock) GetCurrentTerms(ctx context.Context) (*domain.TermsOfService, error)
- func (gm *PostgresMock) GetFacilitiesWithoutFHIRID(ctx context.Context) ([]*domain.Facility, error)
- func (gm *PostgresMock) GetFacilityRespondedScreeningTools(ctx context.Context, facilityID, programID string, ...) ([]*domain.ScreeningTool, *domain.Pagination, error)
- func (gm *PostgresMock) GetFacilityStaffs(ctx context.Context, facilityID string) ([]*domain.StaffProfile, error)
- func (gm *PostgresMock) GetHealthDiaryEntryByID(ctx context.Context, healthDiaryEntryID string) (*domain.ClientHealthDiaryEntry, error)
- func (gm *PostgresMock) GetNotification(ctx context.Context, notificationID string) (*domain.Notification, error)
- func (gm *PostgresMock) GetOTP(ctx context.Context, phoneNumber string, flavour feedlib.Flavour) (*domain.OTP, error)
- func (gm *PostgresMock) GetOauthClient(ctx context.Context, id string) (*domain.OauthClient, error)
- func (gm *PostgresMock) GetOrCreateContact(ctx context.Context, contact *domain.Contact) (*domain.Contact, error)
- func (gm *PostgresMock) GetOrCreateNextOfKin(ctx context.Context, person *dto.NextOfKinPayload, clientID, contactID string) error
- func (gm *PostgresMock) GetOrganisation(ctx context.Context, id string) (*domain.Organisation, error)
- func (gm *PostgresMock) GetPendingServiceRequestsCount(ctx context.Context, facilityID string, programID string) (*domain.ServiceRequestsCountResponse, error)
- func (gm *PostgresMock) GetProgramByID(ctx context.Context, programID string) (*domain.Program, error)
- func (gm *PostgresMock) GetProgramClientProfileByIdentifier(ctx context.Context, programID, identifierType, value string) (*domain.ClientProfile, error)
- func (gm *PostgresMock) GetProgramFacilities(ctx context.Context, programID string) ([]*domain.Facility, error)
- func (gm *PostgresMock) GetRecentHealthDiaryEntries(ctx context.Context, lastSyncTime time.Time, client *domain.ClientProfile) ([]*domain.ClientHealthDiaryEntry, error)
- func (gm *PostgresMock) GetRefreshToken(ctx context.Context, token domain.RefreshToken) (*domain.RefreshToken, error)
- func (gm *PostgresMock) GetScreeningToolByID(ctx context.Context, toolID string) (*domain.ScreeningTool, error)
- func (gm *PostgresMock) GetScreeningToolRespondents(ctx context.Context, facilityID, programID string, screeningToolID string, ...) ([]*domain.ScreeningToolRespondent, *domain.Pagination, error)
- func (gm *PostgresMock) GetScreeningToolResponseByID(ctx context.Context, id string) (*domain.QuestionnaireScreeningToolResponse, error)
- func (gm *PostgresMock) GetScreeningToolResponsesWithPendingServiceRequests(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
- func (gm *PostgresMock) GetScreeningToolResponsesWithin24Hours(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
- func (gm *PostgresMock) GetSecurityQuestionByID(ctx context.Context, securityQuestionID *string) (*domain.SecurityQuestion, error)
- func (gm *PostgresMock) GetSecurityQuestionResponse(ctx context.Context, questionID string, userID string) (*domain.SecurityQuestionResponse, error)
- func (gm *PostgresMock) GetSecurityQuestions(ctx context.Context, flavour feedlib.Flavour) ([]*domain.SecurityQuestion, error)
- func (gm *PostgresMock) GetServiceRequests(ctx context.Context, requestType, requestStatus *string, facilityID string, ...) ([]*domain.ServiceRequest, *domain.Pagination, error)
- func (gm *PostgresMock) GetServiceRequestsForKenyaEMR(ctx context.Context, payload *dto.ServiceRequestPayload) ([]*domain.ServiceRequest, error)
- func (gm *PostgresMock) GetSharedHealthDiaryEntries(ctx context.Context, clientID string, facilityID string) ([]*domain.ClientHealthDiaryEntry, error)
- func (gm *PostgresMock) GetStaffFacilities(ctx context.Context, input dto.StaffFacilityInput, ...) ([]*domain.Facility, *domain.Pagination, error)
- func (gm *PostgresMock) GetStaffProfile(ctx context.Context, userID string, programID string) (*domain.StaffProfile, error)
- func (gm *PostgresMock) GetStaffProfileByStaffID(ctx context.Context, staffID string) (*domain.StaffProfile, error)
- func (gm *PostgresMock) GetStaffServiceRequestByID(ctx context.Context, serviceRequestID string) (*domain.ServiceRequest, error)
- func (gm *PostgresMock) GetStaffUserPrograms(ctx context.Context, userID string) ([]*domain.Program, error)
- func (gm *PostgresMock) GetSurveyServiceRequestUser(ctx context.Context, facilityID string, projectID int, formID string, ...) ([]*domain.SurveyServiceRequestUser, *domain.Pagination, error)
- func (gm *PostgresMock) GetSurveysWithServiceRequests(ctx context.Context, facilityID, programID string) ([]*dto.SurveysWithServiceRequest, error)
- func (gm *PostgresMock) GetUserClientProfiles(ctx context.Context, userID string) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) GetUserFacilities(ctx context.Context, user *domain.User, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
- func (gm *PostgresMock) GetUserPINByUserID(ctx context.Context, userID string) (*domain.UserPIN, error)
- func (gm *PostgresMock) GetUserProfileByPhoneNumber(ctx context.Context, phoneNumber string) (*domain.User, error)
- func (gm *PostgresMock) GetUserProfileByPushToken(ctx context.Context, pushToken string) (*domain.User, error)
- func (gm *PostgresMock) GetUserProfileByUserID(ctx context.Context, userID string) (*domain.User, error)
- func (gm *PostgresMock) GetUserProfileByUsername(ctx context.Context, username string) (*domain.User, error)
- func (gm *PostgresMock) GetUserSecurityQuestionsResponses(ctx context.Context, userID, flavour string) ([]*domain.SecurityQuestionResponse, error)
- func (gm *PostgresMock) GetUserStaffProfiles(ctx context.Context, userID string) ([]*domain.StaffProfile, error)
- func (gm *PostgresMock) GetUserSurveyForms(ctx context.Context, params map[string]interface{}) ([]*domain.UserSurvey, error)
- func (gm *PostgresMock) GetValidClientJWT(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
- func (gm *PostgresMock) InactivateFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
- func (gm *PostgresMock) InvalidatePIN(ctx context.Context, userID string) (bool, error)
- func (gm *PostgresMock) ListAppointments(ctx context.Context, params *domain.Appointment, ...) ([]*domain.Appointment, *domain.Pagination, error)
- func (gm *PostgresMock) ListAvailableNotificationTypes(ctx context.Context, params *domain.Notification) ([]enums.NotificationType, error)
- func (gm *PostgresMock) ListBookings(ctx context.Context, clientID string, bookingState enums.BookingState, ...) ([]*domain.Booking, *domain.Pagination, error)
- func (gm *PostgresMock) ListClientsCaregivers(ctx context.Context, clientID string, pagination *domain.Pagination) (*domain.ClientCaregivers, *domain.Pagination, error)
- func (gm *PostgresMock) ListCommunities(ctx context.Context, programID string, organisationID string) ([]*domain.Community, error)
- func (gm *PostgresMock) ListFacilities(ctx context.Context, searchTerm *string, filterInput []*dto.FiltersInput, ...) ([]*domain.Facility, *domain.Pagination, error)
- func (gm *PostgresMock) ListNotifications(ctx context.Context, params *domain.Notification, ...) ([]*domain.Notification, *domain.Pagination, error)
- func (gm *PostgresMock) ListOrganisations(ctx context.Context, pagination *domain.Pagination) ([]*domain.Organisation, *domain.Pagination, error)
- func (gm *PostgresMock) ListProgramFacilities(ctx context.Context, programID, searchTerm *string, ...) ([]*domain.Facility, *domain.Pagination, error)
- func (gm *PostgresMock) ListPrograms(ctx context.Context, organisationID *string, pagination *domain.Pagination) ([]*domain.Program, *domain.Pagination, error)
- func (gm *PostgresMock) ListSurveyRespondents(ctx context.Context, params *domain.UserSurvey, facilityID string, ...) ([]*domain.SurveyRespondent, *domain.Pagination, error)
- func (gm *PostgresMock) ReactivateFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
- func (gm *PostgresMock) RegisterCaregiver(ctx context.Context, input *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
- func (gm *PostgresMock) RegisterClient(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
- func (gm *PostgresMock) RegisterExistingUserAsCaregiver(ctx context.Context, payload *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
- func (gm *PostgresMock) RegisterExistingUserAsClient(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
- func (gm *PostgresMock) RegisterExistingUserAsStaff(ctx context.Context, input *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
- func (gm *PostgresMock) RegisterStaff(ctx context.Context, staff *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
- func (gm *PostgresMock) RemoveFacilitiesFromClientProfile(ctx context.Context, clientID string, facilities []string) error
- func (gm *PostgresMock) RemoveFacilitiesFromStaffProfile(ctx context.Context, staffID string, facilities []string) error
- func (gm *PostgresMock) ResolveServiceRequest(ctx context.Context, staffID *string, serviceRequestID *string, status string, ...) error
- func (gm *PostgresMock) ResolveStaffServiceRequest(ctx context.Context, staffID *string, serviceRequestID *string, ...) (bool, error)
- func (gm *PostgresMock) RetrieveFacility(ctx context.Context, id *string, isActive bool) (*domain.Facility, error)
- func (gm *PostgresMock) RetrieveFacilityByIdentifier(ctx context.Context, identifier *dto.FacilityIdentifierInput, isActive bool) (*domain.Facility, error)
- func (gm *PostgresMock) SaveFeedback(ctx context.Context, feedback *domain.FeedbackResponse) error
- func (gm *PostgresMock) SaveNotification(ctx context.Context, payload *domain.Notification) error
- func (gm *PostgresMock) SaveOTP(ctx context.Context, otpInput *domain.OTP) error
- func (gm *PostgresMock) SavePin(ctx context.Context, pin *domain.UserPIN) (bool, error)
- func (gm *PostgresMock) SaveSecurityQuestionResponse(ctx context.Context, ...) error
- func (gm *PostgresMock) SaveTemporaryUserPin(ctx context.Context, pinData *domain.UserPIN) (bool, error)
- func (gm *PostgresMock) SearchCaregiverUser(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
- func (gm *PostgresMock) SearchClientProfile(ctx context.Context, searchTerm string) ([]*domain.ClientProfile, error)
- func (gm *PostgresMock) SearchClientServiceRequests(ctx context.Context, searchParameter string, requestType string, ...) ([]*domain.ServiceRequest, error)
- func (gm *PostgresMock) SearchOrganisation(ctx context.Context, searchParameter string) ([]*domain.Organisation, error)
- func (gm *PostgresMock) SearchPlatformCaregivers(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
- func (gm *PostgresMock) SearchPrograms(ctx context.Context, searchParameter string, organisationID string, ...) ([]*domain.Program, *domain.Pagination, error)
- func (gm *PostgresMock) SearchStaffProfile(ctx context.Context, searchParameter string, programID *string) ([]*domain.StaffProfile, error)
- func (gm *PostgresMock) SearchStaffServiceRequests(ctx context.Context, searchParameter string, requestType string, ...) ([]*domain.ServiceRequest, error)
- func (gm *PostgresMock) SetInProgressBy(ctx context.Context, requestID, staffID string) (bool, error)
- func (gm *PostgresMock) UpdateAccessToken(ctx context.Context, code *domain.AccessToken, ...) error
- func (gm *PostgresMock) UpdateAppointment(ctx context.Context, appointment *domain.Appointment, ...) (*domain.Appointment, error)
- func (gm *PostgresMock) UpdateAuthorizationCode(ctx context.Context, code *domain.AuthorizationCode, ...) error
- func (gm *PostgresMock) UpdateBooking(ctx context.Context, booking *domain.Booking, ...) error
- func (gm *PostgresMock) UpdateCaregiver(ctx context.Context, caregiver *domain.CaregiverProfile, ...) error
- func (gm *PostgresMock) UpdateCaregiverClient(ctx context.Context, caregiverClient *domain.CaregiverClient, ...) error
- func (gm *PostgresMock) UpdateClient(ctx context.Context, client *domain.ClientProfile, ...) (*domain.ClientProfile, error)
- func (gm *PostgresMock) UpdateClientCaregiver(ctx context.Context, caregiverInput *dto.CaregiverInput) error
- func (gm *PostgresMock) UpdateClientIdentifier(ctx context.Context, clientID string, identifierType string, ...) error
- func (gm *PostgresMock) UpdateClientServiceRequest(ctx context.Context, clientServiceRequest *domain.ServiceRequest, ...) error
- func (gm *PostgresMock) UpdateFacility(ctx context.Context, facility *domain.Facility, ...) error
- func (gm *PostgresMock) UpdateFailedSecurityQuestionsAnsweringAttempts(ctx context.Context, userID string, failCount int) error
- func (gm *PostgresMock) UpdateHealthDiary(ctx context.Context, clientHealthDiaryEntry *domain.ClientHealthDiaryEntry, ...) error
- func (gm *PostgresMock) UpdateIsCorrectSecurityQuestionResponse(ctx context.Context, userID string, isCorrectSecurityQuestionResponse bool) (bool, error)
- func (gm *PostgresMock) UpdateNotification(ctx context.Context, notification *domain.Notification, ...) error
- func (gm *PostgresMock) UpdateProgram(ctx context.Context, program *domain.Program, ...) error
- func (gm *PostgresMock) UpdateRefreshToken(ctx context.Context, code *domain.RefreshToken, ...) error
- func (gm *PostgresMock) UpdateServiceRequests(ctx context.Context, payload *domain.UpdateServiceRequestsPayload) (bool, error)
- func (gm *PostgresMock) UpdateStaff(ctx context.Context, staff *domain.StaffProfile, ...) error
- func (gm *PostgresMock) UpdateUser(ctx context.Context, user *domain.User, updateData map[string]interface{}) error
- func (gm *PostgresMock) UpdateUserContact(ctx context.Context, contact *domain.Contact, ...) error
- func (gm *PostgresMock) UpdateUserPinChangeRequiredStatus(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
- func (gm *PostgresMock) UpdateUserPinUpdateRequiredStatus(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
- func (gm *PostgresMock) UpdateUserSurveys(ctx context.Context, survey *domain.UserSurvey, ...) error
- func (gm *PostgresMock) VerifyOTP(ctx context.Context, payload *dto.VerifyOTPInput) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresMock ¶
type PostgresMock struct {
MockCreateUserFn func(ctx context.Context, user domain.User) (*domain.User, error)
MockCreateClientFn func(ctx context.Context, client domain.ClientProfile, contactID, identifierID string) (*domain.ClientProfile, error)
MockCreateIdentifierFn func(ctx context.Context, identifier domain.Identifier) (*domain.Identifier, error)
MockListFacilitiesFn func(ctx context.Context, searchTerm *string, filterInput []*dto.FiltersInput, paginationsInput *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
MockRetrieveFacilityFn func(ctx context.Context, id *string, isActive bool) (*domain.Facility, error)
MockListProgramFacilitiesFn func(ctx context.Context, programID, searchTerm *string, filterInput []*dto.FiltersInput, paginationsInput *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
MockDeleteFacilityFn func(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
MockRetrieveFacilityByIdentifierFn func(ctx context.Context, identifier *dto.FacilityIdentifierInput, isActive bool) (*domain.Facility, error)
MockGetUserProfileByUsernameFn func(ctx context.Context, username string) (*domain.User, error)
MockGetUserProfileByPhoneNumberFn func(ctx context.Context, phoneNumber string) (*domain.User, error)
MockGetUserPINByUserIDFn func(ctx context.Context, userID string) (*domain.UserPIN, error)
MockInactivateFacilityFn func(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
MockReactivateFacilityFn func(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
MockGetUserProfileByUserIDFn func(ctx context.Context, userID string) (*domain.User, error)
MockGetCaregiverByUserIDFn func(ctx context.Context, userID string) (*domain.Caregiver, error)
MockSaveTemporaryUserPinFn func(ctx context.Context, pinData *domain.UserPIN) (bool, error)
MockGetCurrentTermsFn func(ctx context.Context) (*domain.TermsOfService, error)
MockAcceptTermsFn func(ctx context.Context, userID *string, termsID *int) (bool, error)
MockSavePinFn func(ctx context.Context, pin *domain.UserPIN) (bool, error)
MockGetSecurityQuestionsFn func(ctx context.Context, flavour feedlib.Flavour) ([]*domain.SecurityQuestion, error)
MockSaveOTPFn func(ctx context.Context, otpInput *domain.OTP) 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)
MockGetSecurityQuestionByIDFn func(ctx context.Context, securityQuestionID *string) (*domain.SecurityQuestion, error)
MockSaveSecurityQuestionResponseFn func(ctx context.Context, securityQuestionResponse []*dto.SecurityQuestionResponseInput) error
MockGetSecurityQuestionResponseFn func(ctx context.Context, questionID string, userID string) (*domain.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)
MockGetClientProfileFn func(ctx context.Context, userID string, programID string) (*domain.ClientProfile, error)
MockGetStaffProfileFn func(ctx context.Context, userID string, programID string) (*domain.StaffProfile, error)
MockCheckUserHasPinFn func(ctx context.Context, userID string) (bool, error)
MockGenerateRetryOTPFn func(ctx context.Context, payload *dto.SendRetryOTPPayload) (string, error)
MockCompleteOnboardingTourFn func(ctx context.Context, userID string, flavour feedlib.Flavour) (bool, error)
MockGetOTPFn func(ctx context.Context, phoneNumber string, flavour feedlib.Flavour) (*domain.OTP, error)
MockGetUserSecurityQuestionsResponsesFn func(ctx context.Context, userID, flavour string) ([]*domain.SecurityQuestionResponse, error)
MockInvalidatePINFn func(ctx context.Context, userID string) (bool, error)
MockGetContactByUserIDFn func(ctx context.Context, userID *string, contactType string) (*domain.Contact, error)
MockFindContactsFn func(ctx context.Context, contactType, contactValue string) ([]*domain.Contact, error)
MockUpdateIsCorrectSecurityQuestionResponseFn func(ctx context.Context, userID string, isCorrectSecurityQuestionResponse bool) (bool, error)
MockFetchFacilitiesFn func(ctx context.Context) ([]*domain.Facility, error)
MockCreateHealthDiaryEntryFn func(ctx context.Context, healthDiaryInput *domain.ClientHealthDiaryEntry) (*domain.ClientHealthDiaryEntry, error)
MockCreateServiceRequestFn func(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
MockCanRecordHeathDiaryFn func(ctx context.Context, userID string) (bool, error)
MockGetClientHealthDiaryQuoteFn func(ctx context.Context, limit int) ([]*domain.ClientHealthDiaryQuote, error)
MockGetClientHealthDiaryEntriesFn func(ctx context.Context, clientID string, moodType *enums.Mood, shared *bool) ([]*domain.ClientHealthDiaryEntry, error)
MockCreateClientCaregiverFn func(ctx context.Context, caregiverInput *dto.CaregiverInput) error
MockGetClientCaregiverFn func(ctx context.Context, caregiverID string) (*domain.Caregiver, error)
MockUpdateClientCaregiverFn func(ctx context.Context, caregiverInput *dto.CaregiverInput) error
MockUpdateFacilityFn func(ctx context.Context, facility *domain.Facility, updateData map[string]interface{}) error
MockInProgressByFn func(ctx context.Context, requestID string, staffID string) (bool, error)
MockGetClientProfileByClientIDFn func(ctx context.Context, clientID string) (*domain.ClientProfile, error)
MockGetPendingServiceRequestsCountFn func(ctx context.Context, facilityID string, programID string) (*domain.ServiceRequestsCountResponse, error)
MockGetServiceRequestsFn func(ctx context.Context, requestType, requestStatus *string, facilityID string, programID string, flavour feedlib.Flavour, pagination *domain.Pagination) ([]*domain.ServiceRequest, *domain.Pagination, error)
MockResolveServiceRequestFn func(ctx context.Context, staffID *string, serviceRequestID *string, status string, action []string, comment *string) error
MockCreateCommunityFn func(ctx context.Context, community *domain.Community) (*domain.Community, error)
MockCheckIfUsernameExistsFn func(ctx context.Context, username string) (bool, error)
MockGetUsersWithSurveyServiceRequestFn func(ctx context.Context, facilityID string, projectID int, formID string, pagination *domain.Pagination) ([]*domain.SurveyServiceRequestUser, *domain.Pagination, error)
MockGetCommunityByIDFn func(ctx context.Context, communityID string) (*domain.Community, error)
MockCheckIdentifierExists func(ctx context.Context, identifierType enums.UserIdentifierType, identifierValue string) (bool, error)
MockCheckFacilityExistsByIdentifier func(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
MockGetOrCreateNextOfKin func(ctx context.Context, person *dto.NextOfKinPayload, clientID, contactID string) error
MockGetOrCreateContactFn func(ctx context.Context, contact *domain.Contact) (*domain.Contact, error)
MockGetClientsInAFacilityFn func(ctx context.Context, facilityID string) ([]*domain.ClientProfile, error)
MockGetRecentHealthDiaryEntriesFn func(ctx context.Context, lastSyncTime time.Time, client *domain.ClientProfile) ([]*domain.ClientHealthDiaryEntry, error)
MockGetClientsByParams func(ctx context.Context, params gorm.Client, lastSyncTime *time.Time) ([]*domain.ClientProfile, error)
MockGetClientIdentifiers func(ctx context.Context, clientID string) ([]*domain.Identifier, error)
MockGetServiceRequestsForKenyaEMRFn func(ctx context.Context, payload *dto.ServiceRequestPayload) ([]*domain.ServiceRequest, error)
MockCreateAppointment func(ctx context.Context, appointment domain.Appointment) error
MockUpdateAppointmentFn func(ctx context.Context, appointment *domain.Appointment, updateData map[string]interface{}) (*domain.Appointment, error)
MockSearchStaffProfileFn func(ctx context.Context, searchParameter string, programID *string) ([]*domain.StaffProfile, error)
MockUpdateHealthDiaryFn func(ctx context.Context, clientHealthDiaryEntry *domain.ClientHealthDiaryEntry, updateData map[string]interface{}) error
MockUpdateServiceRequestsFn func(ctx context.Context, payload *domain.UpdateServiceRequestsPayload) (bool, error)
MockListAppointments func(ctx context.Context, params *domain.Appointment, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*domain.Appointment, *domain.Pagination, error)
MockGetProgramClientProfileByIdentifierFn func(ctx context.Context, programID, identifierType, value string) (*domain.ClientProfile, error)
MockGetClientProfilesByIdentifierFn func(ctx context.Context, identifierType, value string) ([]*domain.ClientProfile, error)
MockUpdateUserPinChangeRequiredStatusFn func(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
MockSearchClientProfileFn func(ctx context.Context, searchParameter string) ([]*domain.ClientProfile, error)
MockCheckIfClientHasUnresolvedServiceRequestsFn func(ctx context.Context, clientID string, serviceRequestType string) (bool, error)
MockUpdateUserSurveysFn func(ctx context.Context, survey *domain.UserSurvey, updateData map[string]interface{}) error
MockUpdateUserPinUpdateRequiredStatusFn func(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
MockGetHealthDiaryEntryByIDFn func(ctx context.Context, healthDiaryEntryID string) (*domain.ClientHealthDiaryEntry, error)
MockUpdateClientFn func(ctx context.Context, client *domain.ClientProfile, updates map[string]interface{}) (*domain.ClientProfile, error)
MockUpdateFailedSecurityQuestionsAnsweringAttemptsFn func(ctx context.Context, userID string, failCount int) error
MockGetFacilitiesWithoutFHIRIDFn func(ctx context.Context) ([]*domain.Facility, error)
MockGetClientServiceRequestByIDFn func(ctx context.Context, id string) (*domain.ServiceRequest, error)
MockUpdateUserFn func(ctx context.Context, user *domain.User, updateData map[string]interface{}) error
MockGetStaffProfileByStaffIDFn func(ctx context.Context, staffID string) (*domain.StaffProfile, error)
MockResolveStaffServiceRequestFn func(ctx context.Context, staffID *string, serviceRequestID *string, verificationStatus string) (bool, error)
MockCreateStaffServiceRequestFn func(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
MockGetAppointmentServiceRequestsFn func(ctx context.Context, lastSyncTime time.Time, mflCode string) ([]domain.AppointmentServiceRequests, error)
MockGetClientAppointmentByIDFn func(ctx context.Context, appointmentID string) (*domain.Appointment, error)
MockGetAppointmentByAppointmentUUIDFn func(ctx context.Context, appointmentUUID string) (*domain.Appointment, error)
MockGetClientServiceRequestsFn func(ctx context.Context, requestType, status, clientID, facilityID string) ([]*domain.ServiceRequest, error)
MockGetAppointmentByClientIDFn func(ctx context.Context, clientID string) (*domain.Appointment, error)
MockCheckAppointmentExistsByExternalIDFn func(ctx context.Context, externalID string) (bool, error)
MockGetUserSurveyFormsFn func(ctx context.Context, params map[string]interface{}) ([]*domain.UserSurvey, error)
MockListNotificationsFn func(ctx context.Context, params *domain.Notification, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*domain.Notification, *domain.Pagination, error)
MockListAvailableNotificationTypesFn func(ctx context.Context, params *domain.Notification) ([]enums.NotificationType, error)
MockSaveNotificationFn func(ctx context.Context, payload *domain.Notification) error
MockGetClientScreeningToolServiceRequestByToolTypeFn func(ctx context.Context, clientID, toolType, status string) (*domain.ServiceRequest, error)
MockGetAppointmentFn func(ctx context.Context, params domain.Appointment) (*domain.Appointment, error)
MockGetFacilityStaffsFn func(ctx context.Context, facilityID string) ([]*domain.StaffProfile, error)
MockCheckIfStaffHasUnresolvedServiceRequestsFn func(ctx context.Context, staffID string, serviceRequestType string) (bool, error)
MockDeleteClientProfileFn func(ctx context.Context, clientID string, userID *string) error
MockDeleteStaffProfileFn func(ctx context.Context, staffID string) error
MockUpdateNotificationFn func(ctx context.Context, notification *domain.Notification, updateData map[string]interface{}) error
MockGetNotificationFn func(ctx context.Context, notificationID string) (*domain.Notification, error)
MockGetClientsByFilterParamsFn func(ctx context.Context, facilityID *string, filterParams *dto.ClientFilterParamsInput) ([]*domain.ClientProfile, error)
MockCreateUserSurveyFn func(ctx context.Context, userSurvey []*dto.UserSurveyInput) error
MockCreateMetricFn func(ctx context.Context, payload *domain.Metric) error
MockUpdateClientServiceRequestFn func(ctx context.Context, clientServiceRequest *domain.ServiceRequest, updateData map[string]interface{}) error
MockSaveFeedbackFn func(ctx context.Context, feedback *domain.FeedbackResponse) error
MockSearchClientServiceRequestsFn func(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*domain.ServiceRequest, error)
MockSearchStaffServiceRequestsFn func(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*domain.ServiceRequest, error)
MockRegisterClientFn func(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
MockRegisterStaffFn func(ctx context.Context, staffRegistrationPayload *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
MockRegisterExistingUserAsStaffFn func(ctx context.Context, payload *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
MockDeleteCommunityFn func(ctx context.Context, communityID string) error
MockCreateScreeningToolFn func(ctx context.Context, input *domain.ScreeningTool) error
MockCreateScreeningToolResponseFn func(ctx context.Context, input *domain.QuestionnaireScreeningToolResponse) (*string, error)
MockGetScreeningToolByIDFn func(ctx context.Context, toolID string) (*domain.ScreeningTool, error)
MockGetAvailableScreeningToolsFn func(ctx context.Context, clientID string, screeningTool domain.ScreeningTool, screeningToolIDs []string) ([]*domain.ScreeningTool, error)
MockGetScreeningToolResponsesWithin24HoursFn func(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
MockGetScreeningToolResponsesWithPendingServiceRequestsFn func(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
MockGetFacilityRespondedScreeningToolsFn func(ctx context.Context, facilityID, programID string, pagination *domain.Pagination) ([]*domain.ScreeningTool, *domain.Pagination, error)
MockListSurveyRespondentsFn func(ctx context.Context, params *domain.UserSurvey, facilityID string, pagination *domain.Pagination) ([]*domain.SurveyRespondent, *domain.Pagination, error)
MockGetScreeningToolRespondentsFn func(ctx context.Context, facilityID, programID string, screeningToolID string, searchTerm string, paginationInput *dto.PaginationsInput) ([]*domain.ScreeningToolRespondent, *domain.Pagination, error)
MockGetScreeningToolResponseByIDFn func(ctx context.Context, id string) (*domain.QuestionnaireScreeningToolResponse, error)
MockGetSurveysWithServiceRequestsFn func(ctx context.Context, facilityID, programID string) ([]*dto.SurveysWithServiceRequest, error)
MockGetStaffFacilitiesFn func(ctx context.Context, input dto.StaffFacilityInput, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
MockGetClientFacilitiesFn func(ctx context.Context, input dto.ClientFacilityInput, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
MockUpdateStaffFn func(ctx context.Context, staff *domain.StaffProfile, updates map[string]interface{}) error
MockAddFacilitiesToStaffProfileFn func(ctx context.Context, staffID string, facilities []string) error
MockAddFacilitiesToClientProfileFn func(ctx context.Context, clientID string, facilities []string) error
MockGetUserFacilitiesFn func(ctx context.Context, user *domain.User, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
MockRegisterCaregiverFn func(ctx context.Context, input *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
MockCreateCaregiverFn func(ctx context.Context, caregiver domain.Caregiver) (*domain.Caregiver, error)
MockSearchCaregiverUserFn func(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
MockSearchPlatformCaregiversFn func(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
MockRemoveFacilitiesFromClientProfileFn func(ctx context.Context, clientID string, facilities []string) error
MockAddCaregiverToClientFn func(ctx context.Context, clientCaregiver *domain.CaregiverClient) error
MockRemoveFacilitiesFromStaffProfileFn func(ctx context.Context, staffID string, facilities []string) error
MockGetOrganisationFn func(ctx context.Context, id string) (*domain.Organisation, error)
MockGetCaregiverManagedClientsFn func(ctx context.Context, userID string, pagination *domain.Pagination) ([]*domain.ManagedClient, *domain.Pagination, error)
MockListClientsCaregiversFn func(ctx context.Context, clientID string, pagination *domain.Pagination) (*domain.ClientCaregivers, *domain.Pagination, error)
MockUpdateCaregiverClientFn func(ctx context.Context, caregiverClient *domain.CaregiverClient, updateData map[string]interface{}) error
MockCreateProgramFn func(ctx context.Context, program *dto.ProgramInput) (*domain.Program, error)
MockCheckOrganisationExistsFn func(ctx context.Context, organisationID string) (bool, error)
MockCheckIfProgramNameExistsFn func(ctx context.Context, organisationID string, programName string) (bool, error)
MockDeleteOrganisationFn func(ctx context.Context, organisation *domain.Organisation) error
MockCreateOrganisationFn func(ctx context.Context, organisation *domain.Organisation, programs []*domain.Program) (*domain.Organisation, error)
MockAddFacilityToProgramFn func(ctx context.Context, programID string, facilityIDs []string) ([]*domain.Facility, error)
MockListOrganisationsFn func(ctx context.Context, pagination *domain.Pagination) ([]*domain.Organisation, *domain.Pagination, error)
MockGetStaffUserProgramsFn func(ctx context.Context, userID string) ([]*domain.Program, error)
MockGetClientUserProgramsFn func(ctx context.Context, userID string) ([]*domain.Program, error)
MockGetProgramFacilitiesFn func(ctx context.Context, programID string) ([]*domain.Facility, error)
MockGetProgramByIDFn func(ctx context.Context, programID string) (*domain.Program, error)
MockRegisterExistingUserAsClientFn func(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
MockGetCaregiverProfileByUserIDFn func(ctx context.Context, userID string, organisationID string) (*domain.CaregiverProfile, error)
MockUpdateCaregiverFn func(ctx context.Context, caregiver *domain.CaregiverProfile, updates map[string]interface{}) error
MockGetCaregiversClientFn func(ctx context.Context, caregiverClient domain.CaregiverClient) ([]*domain.CaregiverClient, error)
MockGetCaregiverProfileByCaregiverIDFn func(ctx context.Context, caregiverID string) (*domain.CaregiverProfile, error)
MockRegisterExistingUserAsCaregiverFn func(ctx context.Context, input *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
MockUpdateClientIdentifierFn func(ctx context.Context, clientID string, identifierType string, identifierValue string, programID string) error
MockUpdateUserContactFn func(ctx context.Context, contact *domain.Contact, updateData map[string]interface{}) error
MockSearchProgramsFn func(ctx context.Context, searchParameter string, organisationID string, pagination *domain.Pagination) ([]*domain.Program, *domain.Pagination, error)
MockListProgramsFn func(ctx context.Context, organisationID *string, pagination *domain.Pagination) ([]*domain.Program, *domain.Pagination, error)
MockCheckIfSuperUserExistsFn func(ctx context.Context) (bool, error)
MockSearchOrganisationsFn func(ctx context.Context, searchParameter string) ([]*domain.Organisation, error)
MockCreateFacilitiesFn func(ctx context.Context, facilities []*domain.Facility) ([]*domain.Facility, error)
MockListCommunitiesFn func(ctx context.Context, programID string, organisationID string) ([]*domain.Community, error)
MockCreateSecurityQuestionsFn func(ctx context.Context, securityQuestions []*domain.SecurityQuestion) ([]*domain.SecurityQuestion, error)
MockCreateTermsOfServiceFn func(ctx context.Context, termsOfService *domain.TermsOfService) (*domain.TermsOfService, error)
MockCheckPhoneExistsFn func(ctx context.Context, phone string) (bool, error)
MockUpdateProgramFn func(ctx context.Context, program *domain.Program, updateData map[string]interface{}) error
MockGetStaffServiceRequestByIDFn func(ctx context.Context, id string) (*domain.ServiceRequest, error)
MockCreateOauthClientJWT func(ctx context.Context, jwt *domain.OauthClientJWT) error
MockCreateOauthClient func(ctx context.Context, client *domain.OauthClient) error
MockGetClientJWT func(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
MockGetOauthClient func(ctx context.Context, id string) (*domain.OauthClient, error)
MockGetValidClientJWT func(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
MockCreateOrUpdateSessionFn func(ctx context.Context, session *domain.Session) error
MockCreateAuthorizationCodeFn func(ctx context.Context, code *domain.AuthorizationCode) error
MockGetAuthorizationCodeFn func(ctx context.Context, code string) (*domain.AuthorizationCode, error)
MockUpdateAuthorizationCodeFn func(ctx context.Context, code *domain.AuthorizationCode, updateData map[string]interface{}) error
MockCreateAccessTokenFn func(ctx context.Context, token *domain.AccessToken) error
MockCreateRefreshTokenFn func(ctx context.Context, token *domain.RefreshToken) error
MockDeleteAccessTokenFn func(ctx context.Context, signature string) error
MockDeleteRefreshTokenFn func(ctx context.Context, signature string) error
MockGetAccessTokenFn func(ctx context.Context, token domain.AccessToken) (*domain.AccessToken, error)
MockGetRefreshTokenFn func(ctx context.Context, token domain.RefreshToken) (*domain.RefreshToken, error)
MockUpdateAccessTokenFn func(ctx context.Context, code *domain.AccessToken, updateData map[string]interface{}) error
MockUpdateRefreshTokenFn func(ctx context.Context, code *domain.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) (*domain.User, error)
MockCheckStaffExistsInProgramFn func(ctx context.Context, userID, programID string) (bool, error)
MockCheckIfFacilityExistsInProgramFn func(ctx context.Context, programID, facilityID string) (bool, error)
MockCheckIfClientExistsInProgramFn func(ctx context.Context, userID, programID string) (bool, error)
MockGetUserClientProfilesFn func(ctx context.Context, userID string) ([]*domain.ClientProfile, error)
MockGetUserStaffProfilesFn func(ctx context.Context, userID string) ([]*domain.StaffProfile, error)
MockCreateBookingFn func(ctx context.Context, booking *domain.Booking) (*domain.Booking, error)
MockUpdateBookingFn func(ctx context.Context, booking *domain.Booking, updateData map[string]interface{}) error
MockListBookingsFn func(ctx context.Context, clientID string, bookingState enums.BookingState, pagination *domain.Pagination) ([]*domain.Booking, *domain.Pagination, error)
MockGetAllScreeningToolsFn func(ctx context.Context, pagination *domain.Pagination) ([]*domain.ScreeningTool, *domain.Pagination, error)
}
PostgresMock struct implements mocks of `postgres's` internal methods.
func NewPostgresMock ¶
func NewPostgresMock() *PostgresMock
NewPostgresMock initializes a new instance of `GormMock` then mocking the case of success.
func (*PostgresMock) AcceptTerms ¶
func (gm *PostgresMock) AcceptTerms(ctx context.Context, userID *string, termsID *int) (bool, error)
AcceptTerms mocks the implementation of accept current terms of service
func (*PostgresMock) AddCaregiverToClient ¶
func (gm *PostgresMock) AddCaregiverToClient(ctx context.Context, clientCaregiver *domain.CaregiverClient) error
AddCaregiverToClient mocks the implementation of adding a caregiver to a client
func (*PostgresMock) AddFacilitiesToClientProfile ¶
func (gm *PostgresMock) AddFacilitiesToClientProfile(ctx context.Context, clientID string, facilities []string) error
AddFacilitiesToClientProfile mocks the implementation of adding facilities to a client profile
func (*PostgresMock) AddFacilitiesToStaffProfile ¶
func (gm *PostgresMock) AddFacilitiesToStaffProfile(ctx context.Context, staffID string, facilities []string) error
AddFacilitiesToStaffProfile mocks the implementation of adding facilities to a staff profile
func (*PostgresMock) AddFacilityToProgram ¶
func (gm *PostgresMock) AddFacilityToProgram(ctx context.Context, programID string, facilityIDs []string) ([]*domain.Facility, error)
AddFacilityToProgram mocks the implementation of adding a facility to a program
func (*PostgresMock) CanRecordHeathDiary ¶
CanRecordHeathDiary mocks the implementation of checking if a user can record a health diary
func (*PostgresMock) CheckAppointmentExistsByExternalID ¶
func (gm *PostgresMock) CheckAppointmentExistsByExternalID(ctx context.Context, externalID string) (bool, error)
CheckAppointmentExistsByExternalID checks if an appointment with the external id exists
func (*PostgresMock) CheckCaregiverExists ¶
CheckCaregiverExists checks if there is a caregiver profile that exists for a user
func (*PostgresMock) CheckClientExists ¶
CheckClientExists checks if there is a client profile that exists for a user
func (*PostgresMock) CheckFacilityExistsByIdentifier ¶
func (gm *PostgresMock) CheckFacilityExistsByIdentifier(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
CheckFacilityExistsByIdentifier mocks checking a facility by mfl codes
func (*PostgresMock) CheckIdentifierExists ¶
func (gm *PostgresMock) CheckIdentifierExists(ctx context.Context, identifierType enums.UserIdentifierType, identifierValue string) (bool, error)
CheckIdentifierExists mocks checking an identifier exists
func (*PostgresMock) CheckIfClientExistsInProgram ¶
func (gm *PostgresMock) CheckIfClientExistsInProgram(ctx context.Context, userID, programID string) (bool, error)
CheckStaffExistsInProgram mocks the implementation of CheckStaffExistsInProgram method
func (*PostgresMock) CheckIfClientHasPendingSurveyServiceRequest ¶
func (gm *PostgresMock) CheckIfClientHasPendingSurveyServiceRequest(ctx context.Context, clientID string, projectID int, formID string) (bool, error)
CheckIfClientHasPendingSurveyServiceRequest mocks the implementation of CheckIfClientHasPendingSurveyServiceRequest method
func (*PostgresMock) CheckIfClientHasUnresolvedServiceRequests ¶
func (gm *PostgresMock) CheckIfClientHasUnresolvedServiceRequests(ctx context.Context, clientID string, serviceRequestType string) (bool, error)
CheckIfClientHasUnresolvedServiceRequests mocks the implementation of checking if a client has an unresolved service request
func (*PostgresMock) CheckIfFacilityExistsInProgram ¶
func (gm *PostgresMock) CheckIfFacilityExistsInProgram(ctx context.Context, programID, facilityID string) (bool, error)
CheckIfFacilityExistsInProgram mocks the implementation of CheckIfFacilityExistsInProgram method
func (*PostgresMock) CheckIfPhoneNumberExists ¶
func (gm *PostgresMock) 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 (*PostgresMock) CheckIfProgramNameExists ¶
func (gm *PostgresMock) CheckIfProgramNameExists(ctx context.Context, organisationID string, programName string) (bool, error)
CheckIfProgramNameExists mocks the implementation checking if an organisation is associated with a program
func (*PostgresMock) CheckIfStaffHasUnresolvedServiceRequests ¶
func (gm *PostgresMock) CheckIfStaffHasUnresolvedServiceRequests(ctx context.Context, staffID string, serviceRequestType string) (bool, error)
CheckIfStaffHasUnresolvedServiceRequests mocks the implementation of checking if a staff has unresolved service requests
func (*PostgresMock) CheckIfSuperUserExists ¶
func (gm *PostgresMock) CheckIfSuperUserExists(ctx context.Context) (bool, error)
CheckIfSuperUserExists mocks the implementation of checking if a superuser exists
func (*PostgresMock) CheckIfUsernameExists ¶
CheckIfUsernameExists mocks the implementation of checking whether a username exists
func (*PostgresMock) CheckOrganisationExists ¶
func (gm *PostgresMock) CheckOrganisationExists(ctx context.Context, organisationID string) (bool, error)
CheckOrganisationExists mocks the implementation checking if the an organisation exists
func (*PostgresMock) CheckPhoneExists ¶
CheckPhoneExists mocks the implementation of CheckPhoneExists method
func (*PostgresMock) CheckStaffExists ¶
CheckStaffExists checks if there is a staff profile that exists for a user
func (*PostgresMock) CheckStaffExistsInProgram ¶
func (gm *PostgresMock) CheckStaffExistsInProgram(ctx context.Context, userID, programID string) (bool, error)
CheckStaffExistsInProgram mocks the implementation of CheckStaffExistsInProgram method
func (*PostgresMock) CheckUserHasPin ¶
CheckUserHasPin mocks the method for checking if a user has a pin
func (*PostgresMock) CompleteOnboardingTour ¶
func (gm *PostgresMock) 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 (*PostgresMock) CreateAccessToken ¶
func (gm *PostgresMock) CreateAccessToken(ctx context.Context, token *domain.AccessToken) error
CreateAccessToken creates a new access token.
func (*PostgresMock) CreateAppointment ¶
func (gm *PostgresMock) CreateAppointment(ctx context.Context, appointment domain.Appointment) error
CreateAppointment creates a new appointment
func (*PostgresMock) CreateAuthorizationCode ¶
func (gm *PostgresMock) CreateAuthorizationCode(ctx context.Context, code *domain.AuthorizationCode) error
CreateAuthorizationCode creates a new authorization code.
func (*PostgresMock) CreateBooking ¶
func (gm *PostgresMock) CreateBooking(ctx context.Context, booking *domain.Booking) (*domain.Booking, error)
CreateBooking mocks the implementation of booking for a service
func (*PostgresMock) CreateCaregiver ¶
func (gm *PostgresMock) CreateCaregiver(ctx context.Context, caregiver domain.Caregiver) (*domain.Caregiver, error)
CreateCaregiver creates a caregiver record using the provided input
func (*PostgresMock) CreateClient ¶
func (gm *PostgresMock) CreateClient(ctx context.Context, client domain.ClientProfile, contactID, identifierID string) (*domain.ClientProfile, error)
CreateClient creates a new client
func (*PostgresMock) CreateClientCaregiver ¶
func (gm *PostgresMock) CreateClientCaregiver(ctx context.Context, caregiverInput *dto.CaregiverInput) error
CreateClientCaregiver mocks the implementation of creating a caregiver
func (*PostgresMock) CreateCommunity ¶
func (gm *PostgresMock) CreateCommunity(ctx context.Context, community *domain.Community) (*domain.Community, error)
CreateCommunity mocks the implementation of creating a channel
func (*PostgresMock) CreateFacilities ¶
func (gm *PostgresMock) CreateFacilities(ctx context.Context, facilities []*domain.Facility) ([]*domain.Facility, error)
CreateFacilities Mocks the implementation of CreateFacilities method
func (*PostgresMock) CreateHealthDiaryEntry ¶
func (gm *PostgresMock) CreateHealthDiaryEntry(ctx context.Context, healthDiaryInput *domain.ClientHealthDiaryEntry) (*domain.ClientHealthDiaryEntry, error)
CreateHealthDiaryEntry mocks the method for creating a health diary entry
func (*PostgresMock) CreateIdentifier ¶
func (gm *PostgresMock) CreateIdentifier(ctx context.Context, identifier domain.Identifier) (*domain.Identifier, error)
CreateIdentifier creates a new identifier
func (*PostgresMock) CreateMetric ¶
CreateMetric saves a metric to the database
func (*PostgresMock) CreateOauthClient ¶
func (gm *PostgresMock) CreateOauthClient(ctx context.Context, client *domain.OauthClient) error
CreateOauthClient creates a new oauth client
func (*PostgresMock) CreateOauthClientJWT ¶
func (gm *PostgresMock) CreateOauthClientJWT(ctx context.Context, jwt *domain.OauthClientJWT) error
CreateOauthClientJWT creates a new oauth jwt client
func (*PostgresMock) CreateOrUpdateSession ¶
CreateOrUpdateSession creates a new session or updates an existing session
func (*PostgresMock) CreateOrganisation ¶
func (gm *PostgresMock) CreateOrganisation(ctx context.Context, organisation *domain.Organisation, programs []*domain.Program) (*domain.Organisation, error)
CreateOrganisation mocks the implementation of creating an organisation
func (*PostgresMock) CreateProgram ¶
func (gm *PostgresMock) CreateProgram(ctx context.Context, program *dto.ProgramInput) (*domain.Program, error)
CreateProgram mocks the implementation of creating a program
func (*PostgresMock) CreateRefreshToken ¶
func (gm *PostgresMock) CreateRefreshToken(ctx context.Context, token *domain.RefreshToken) error
CreateRefreshToken creates a new refresh token.
func (*PostgresMock) CreateScreeningTool ¶
func (gm *PostgresMock) CreateScreeningTool(ctx context.Context, payload *domain.ScreeningTool) error
CreateScreeningTool mocks the implementation of creating a screening tool
func (*PostgresMock) CreateScreeningToolResponse ¶
func (gm *PostgresMock) CreateScreeningToolResponse(ctx context.Context, input *domain.QuestionnaireScreeningToolResponse) (*string, error)
CreateScreeningToolResponse mocks the implementation of creating a screening tool response
func (*PostgresMock) CreateSecurityQuestions ¶
func (gm *PostgresMock) CreateSecurityQuestions(ctx context.Context, securityQuestions []*domain.SecurityQuestion) ([]*domain.SecurityQuestion, error)
CreateSecurityQuestions mocks the implementation of CreateSecurityQuestions method
func (*PostgresMock) CreateServiceRequest ¶
func (gm *PostgresMock) CreateServiceRequest(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
CreateServiceRequest mocks creating a service request method
func (*PostgresMock) CreateStaffServiceRequest ¶
func (gm *PostgresMock) CreateStaffServiceRequest(ctx context.Context, serviceRequestInput *dto.ServiceRequestInput) error
CreateStaffServiceRequest mocks the implementation creating a staff's service request
func (*PostgresMock) CreateTermsOfService ¶
func (gm *PostgresMock) CreateTermsOfService(ctx context.Context, termsOfService *domain.TermsOfService) (*domain.TermsOfService, error)
CreateTermsOfService mocks the implementation of CreateTermsOfService method
func (*PostgresMock) CreateUser ¶
CreateUser creates a new user
func (*PostgresMock) CreateUserSurveys ¶
func (gm *PostgresMock) CreateUserSurveys(ctx context.Context, survey []*dto.UserSurveyInput) error
CreateUserSurveys mocks the implementation of creating a user survey
func (*PostgresMock) DeleteAccessToken ¶
func (gm *PostgresMock) DeleteAccessToken(ctx context.Context, signature string) error
DeleteAccessToken retrieves an access token using the signature
func (*PostgresMock) DeleteClientProfile ¶
func (gm *PostgresMock) DeleteClientProfile(ctx context.Context, clientID string, userID *string) error
DeleteClientProfile mocks the implementation of deleting a client user
func (*PostgresMock) DeleteCommunity ¶
func (gm *PostgresMock) DeleteCommunity(ctx context.Context, communityID string) error
DeleteCommunity deletes the specified community from the database
func (*PostgresMock) DeleteFacility ¶
func (gm *PostgresMock) DeleteFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
DeleteFacility mocks the implementation of deleting a facility by ID
func (*PostgresMock) DeleteOrganisation ¶
func (gm *PostgresMock) DeleteOrganisation(ctx context.Context, organisation *domain.Organisation) error
DeleteOrganisation mocks the implementation of deleting an organisation
func (*PostgresMock) DeleteRefreshToken ¶
func (gm *PostgresMock) DeleteRefreshToken(ctx context.Context, signature string) error
DeleteRefreshToken retrieves a refresh token using the signature
func (*PostgresMock) DeleteStaffProfile ¶
func (gm *PostgresMock) DeleteStaffProfile(ctx context.Context, staffID string) error
DeleteStaffProfile mocks the implementation of deleting a staff
func (*PostgresMock) FetchFacilities ¶
FetchFacilities mocks the implementation of fetching facility
func (*PostgresMock) FindContacts ¶
func (gm *PostgresMock) FindContacts(ctx context.Context, contactType, contactValue string) ([]*domain.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 (*PostgresMock) GenerateRetryOTP ¶
func (gm *PostgresMock) GenerateRetryOTP(ctx context.Context, payload *dto.SendRetryOTPPayload) (string, error)
GenerateRetryOTP mock the implementtation of generating a retry OTP
func (*PostgresMock) GetAccessToken ¶
func (gm *PostgresMock) GetAccessToken(ctx context.Context, token domain.AccessToken) (*domain.AccessToken, error)
GetAccessToken retrieves an access token using the signature
func (*PostgresMock) GetAllScreeningTools ¶
func (gm *PostgresMock) GetAllScreeningTools(ctx context.Context, pagination *domain.Pagination) ([]*domain.ScreeningTool, *domain.Pagination, error)
GetAllScreeningTools mocks the implementation of getting all screening tools
func (*PostgresMock) GetAppointment ¶
func (gm *PostgresMock) GetAppointment(ctx context.Context, params domain.Appointment) (*domain.Appointment, error)
GetAppointment fetches an appointment by the external ID
func (*PostgresMock) GetAppointmentByClientID ¶
func (gm *PostgresMock) GetAppointmentByClientID(ctx context.Context, clientID string) (*domain.Appointment, error)
GetAppointmentByClientID mocks the implementation of getting a client appointment by id
func (*PostgresMock) GetAppointmentServiceRequests ¶
func (gm *PostgresMock) GetAppointmentServiceRequests(ctx context.Context, lastSyncTime time.Time, mflCode string) ([]domain.AppointmentServiceRequests, error)
GetAppointmentServiceRequests mocks the implementation of getting appointments and service requests
func (*PostgresMock) GetAuthorizationCode ¶
func (gm *PostgresMock) GetAuthorizationCode(ctx context.Context, code string) (*domain.AuthorizationCode, error)
GetAuthorizationCode retrieves an authorization code using the code
func (*PostgresMock) GetAvailableScreeningTools ¶
func (gm *PostgresMock) GetAvailableScreeningTools(ctx context.Context, clientID string, screeningTool domain.ScreeningTool, screeningToolIDs []string) ([]*domain.ScreeningTool, error)
GetAvailableScreeningTools mocks the implementation of getting available screening tools
func (*PostgresMock) GetCaregiverByUserID ¶
func (gm *PostgresMock) GetCaregiverByUserID(ctx context.Context, userID string) (*domain.Caregiver, error)
GetCaregiverByUserID returns the caregiver record of the provided user ID
func (*PostgresMock) GetCaregiverManagedClients ¶
func (gm *PostgresMock) GetCaregiverManagedClients(ctx context.Context, userID string, pagination *domain.Pagination) ([]*domain.ManagedClient, *domain.Pagination, error)
GetCaregiverManagedClients mocks the implementation of getting caregiver's managed clients
func (*PostgresMock) GetCaregiverProfileByCaregiverID ¶
func (gm *PostgresMock) GetCaregiverProfileByCaregiverID(ctx context.Context, caregiverID string) (*domain.CaregiverProfile, error)
GetCaregiverProfileByCaregiverID mocks the implementation of getting a caregiver profile by caregiver id
func (*PostgresMock) GetCaregiverProfileByUserID ¶
func (gm *PostgresMock) GetCaregiverProfileByUserID(ctx context.Context, organisationID string, clientID string) (*domain.CaregiverProfile, error)
GetCaregiverProfileByUserID mocks the implementation of getting a caregiver profile
func (*PostgresMock) GetCaregiversClient ¶
func (gm *PostgresMock) GetCaregiversClient(ctx context.Context, caregiverClient domain.CaregiverClient) ([]*domain.CaregiverClient, error)
GetCaregiversClient mocks the implementation of getting caregivers clients
func (*PostgresMock) GetClientCaregiver ¶
func (gm *PostgresMock) GetClientCaregiver(ctx context.Context, caregiverID string) (*domain.Caregiver, error)
GetClientCaregiver mocks the implementation of getting all caregivers for a client
func (*PostgresMock) GetClientFacilities ¶
func (gm *PostgresMock) GetClientFacilities(ctx context.Context, input dto.ClientFacilityInput, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
GetClientFacilities mocks the implementation of getting client facilities
func (*PostgresMock) GetClientHealthDiaryEntries ¶
func (gm *PostgresMock) GetClientHealthDiaryEntries(ctx context.Context, clientID string, moodType *enums.Mood, shared *bool) ([]*domain.ClientHealthDiaryEntry, error)
GetClientHealthDiaryEntries mocks the implementation of getting all health diary entries that belong to a specific user
func (*PostgresMock) GetClientHealthDiaryQuote ¶
func (gm *PostgresMock) GetClientHealthDiaryQuote(ctx context.Context, limit int) ([]*domain.ClientHealthDiaryQuote, error)
GetClientHealthDiaryQuote mocks the implementation of fetching client health diary quote
func (*PostgresMock) GetClientIdentifiers ¶
func (gm *PostgresMock) GetClientIdentifiers(ctx context.Context, clientID string) ([]*domain.Identifier, error)
GetClientIdentifiers retrieves client's ccc number
func (*PostgresMock) GetClientJWT ¶
func (gm *PostgresMock) GetClientJWT(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
GetClientJWT retrieves a JWT by unique JTI
func (*PostgresMock) GetClientProfile ¶
func (gm *PostgresMock) GetClientProfile(ctx context.Context, userID string, programID string) (*domain.ClientProfile, error)
GetClientProfile mocks the method for fetching a client profile using the user ID
func (*PostgresMock) GetClientProfileByClientID ¶
func (gm *PostgresMock) GetClientProfileByClientID(ctx context.Context, clientID string) (*domain.ClientProfile, error)
GetClientProfileByClientID mocks the implementation of getting a client by client id
func (*PostgresMock) GetClientProfilesByIdentifier ¶
func (gm *PostgresMock) GetClientProfilesByIdentifier(ctx context.Context, identifierType, value string) ([]*domain.ClientProfile, error)
GetClientProfilesByIdentifier mocks the implementation of getting client profiles using identifiers
func (*PostgresMock) GetClientScreeningToolServiceRequestByToolType ¶
func (gm *PostgresMock) GetClientScreeningToolServiceRequestByToolType(ctx context.Context, clientID string, questionID string, status string) (*domain.ServiceRequest, error)
GetClientScreeningToolServiceRequestByToolType mocks the implementation of getting client screening tool service request by question ID
func (*PostgresMock) GetClientServiceRequestByID ¶
func (gm *PostgresMock) GetClientServiceRequestByID(ctx context.Context, serviceRequestID string) (*domain.ServiceRequest, error)
GetClientServiceRequestByID mocks the implementation of getting a service request by ID
func (*PostgresMock) GetClientServiceRequests ¶
func (gm *PostgresMock) GetClientServiceRequests(ctx context.Context, requestType, status, clientID, facilityID string) ([]*domain.ServiceRequest, error)
GetClientServiceRequests mocks the implementation of getting system generated client service requests
func (*PostgresMock) GetClientUserPrograms ¶
func (gm *PostgresMock) GetClientUserPrograms(ctx context.Context, userID string) ([]*domain.Program, error)
GetClientUserPrograms retrieves all programs associated with a client user
func (*PostgresMock) GetClientsByFilterParams ¶
func (gm *PostgresMock) GetClientsByFilterParams(ctx context.Context, facilityID *string, filterParams *dto.ClientFilterParamsInput) ([]*domain.ClientProfile, error)
GetClientsByFilterParams mocks the implementation of getting clients by filter params
func (*PostgresMock) GetClientsByParams ¶
func (gm *PostgresMock) GetClientsByParams(ctx context.Context, params gorm.Client, lastSyncTime *time.Time) ([]*domain.ClientProfile, error)
GetClientsByParams retrieves client profiles matching the provided parameters
func (*PostgresMock) GetClientsInAFacility ¶
func (gm *PostgresMock) GetClientsInAFacility(ctx context.Context, facilityID string) ([]*domain.ClientProfile, error)
GetClientsInAFacility mocks getting all the clients in a facility
func (*PostgresMock) GetCommunityByID ¶
func (gm *PostgresMock) GetCommunityByID(ctx context.Context, communityID string) (*domain.Community, error)
GetCommunityByID mocks the implementation of getting the community by ID
func (*PostgresMock) GetContactByUserID ¶
func (gm *PostgresMock) GetContactByUserID(ctx context.Context, userID *string, contactType string) (*domain.Contact, error)
GetContactByUserID mocks the implementation of fetching a contact by userID
func (*PostgresMock) GetCurrentTerms ¶
func (gm *PostgresMock) GetCurrentTerms(ctx context.Context) (*domain.TermsOfService, error)
GetCurrentTerms mocks the implementation of getting all the current terms of service.
func (*PostgresMock) GetFacilitiesWithoutFHIRID ¶
GetFacilitiesWithoutFHIRID mocks the implementation of getting a facility without FHIR Organisation
func (*PostgresMock) GetFacilityRespondedScreeningTools ¶
func (gm *PostgresMock) GetFacilityRespondedScreeningTools(ctx context.Context, facilityID, programID string, pagination *domain.Pagination) ([]*domain.ScreeningTool, *domain.Pagination, error)
GetFacilityRespondedScreeningTools mocks the implementation of getting responded screening tools
func (*PostgresMock) GetFacilityStaffs ¶
func (gm *PostgresMock) GetFacilityStaffs(ctx context.Context, facilityID string) ([]*domain.StaffProfile, error)
GetFacilityStaffs returns a list of staff at a particular facility
func (*PostgresMock) GetHealthDiaryEntryByID ¶
func (gm *PostgresMock) GetHealthDiaryEntryByID(ctx context.Context, healthDiaryEntryID string) (*domain.ClientHealthDiaryEntry, error)
GetHealthDiaryEntryByID mocks the implementation of getting health diary entry bu a given ID
func (*PostgresMock) GetNotification ¶
func (gm *PostgresMock) GetNotification(ctx context.Context, notificationID string) (*domain.Notification, error)
GetNotification retrieve a notification using the provided ID
func (*PostgresMock) GetOTP ¶
func (gm *PostgresMock) GetOTP(ctx context.Context, phoneNumber string, flavour feedlib.Flavour) (*domain.OTP, error)
GetOTP mocks the implementation of fetching an OTP
func (*PostgresMock) GetOauthClient ¶
func (gm *PostgresMock) GetOauthClient(ctx context.Context, id string) (*domain.OauthClient, error)
GetOauthClient retrieves a client by ID
func (*PostgresMock) GetOrCreateContact ¶
func (gm *PostgresMock) GetOrCreateContact(ctx context.Context, contact *domain.Contact) (*domain.Contact, error)
GetOrCreateContact mocks creating a contact
func (*PostgresMock) GetOrCreateNextOfKin ¶
func (gm *PostgresMock) GetOrCreateNextOfKin(ctx context.Context, person *dto.NextOfKinPayload, clientID, contactID string) error
GetOrCreateNextOfKin mocks creating a next of kin
func (*PostgresMock) GetOrganisation ¶
func (gm *PostgresMock) GetOrganisation(ctx context.Context, id string) (*domain.Organisation, error)
GetOrganisation retrieves an organisation using the provided id
func (*PostgresMock) GetPendingServiceRequestsCount ¶
func (gm *PostgresMock) GetPendingServiceRequestsCount(ctx context.Context, facilityID string, programID string) (*domain.ServiceRequestsCountResponse, error)
GetPendingServiceRequestsCount mocks the implementation of getting the service requests count
func (*PostgresMock) GetProgramByID ¶
func (gm *PostgresMock) GetProgramByID(ctx context.Context, programID string) (*domain.Program, error)
GetProgramByID mocks the implementation of getting a program by ID
func (*PostgresMock) GetProgramClientProfileByIdentifier ¶
func (gm *PostgresMock) GetProgramClientProfileByIdentifier(ctx context.Context, programID, identifierType, value string) (*domain.ClientProfile, error)
GetProgramClientProfileByIdentifier mocks the implementation of getting a client profile using the CCC number
func (*PostgresMock) GetProgramFacilities ¶
func (gm *PostgresMock) GetProgramFacilities(ctx context.Context, programID string) ([]*domain.Facility, error)
GetProgramFacilities mocks the implementation of getting program facilities
func (*PostgresMock) GetRecentHealthDiaryEntries ¶
func (gm *PostgresMock) GetRecentHealthDiaryEntries(ctx context.Context, lastSyncTime time.Time, client *domain.ClientProfile) ([]*domain.ClientHealthDiaryEntry, error)
GetRecentHealthDiaryEntries mocks getting the most recent health diary entry
func (*PostgresMock) GetRefreshToken ¶
func (gm *PostgresMock) GetRefreshToken(ctx context.Context, token domain.RefreshToken) (*domain.RefreshToken, error)
GetRefreshToken retrieves a refresh token using the signature
func (*PostgresMock) GetScreeningToolByID ¶
func (gm *PostgresMock) GetScreeningToolByID(ctx context.Context, toolID string) (*domain.ScreeningTool, error)
GetScreeningToolByID mocks the implementation of getting a screening tool by ID
func (*PostgresMock) GetScreeningToolRespondents ¶
func (gm *PostgresMock) GetScreeningToolRespondents(ctx context.Context, facilityID, programID string, screeningToolID string, searchTerm string, paginationInput *dto.PaginationsInput) ([]*domain.ScreeningToolRespondent, *domain.Pagination, error)
GetScreeningToolRespondents mocks the implementation of getting screening tool respondents
func (*PostgresMock) GetScreeningToolResponseByID ¶
func (gm *PostgresMock) GetScreeningToolResponseByID(ctx context.Context, id string) (*domain.QuestionnaireScreeningToolResponse, error)
GetScreeningToolResponseByID mocks the implementation of getting a screening tool response by ID
func (*PostgresMock) GetScreeningToolResponsesWithPendingServiceRequests ¶
func (gm *PostgresMock) GetScreeningToolResponsesWithPendingServiceRequests(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
GetScreeningToolResponsesWithPendingServiceRequests mocks the implementation of GetScreeningToolResponsesWithPendingServiceRequests method
func (*PostgresMock) GetScreeningToolResponsesWithin24Hours ¶
func (gm *PostgresMock) GetScreeningToolResponsesWithin24Hours(ctx context.Context, clientID, programID string) ([]*domain.QuestionnaireScreeningToolResponse, error)
GetScreeningToolResponsesWithin24Hours mocks the implementation of GetScreeningToolResponsesWithin24Hours method
func (*PostgresMock) GetSecurityQuestionByID ¶
func (gm *PostgresMock) GetSecurityQuestionByID(ctx context.Context, securityQuestionID *string) (*domain.SecurityQuestion, error)
GetSecurityQuestionByID mocks the implementation of getting a security question by ID
func (*PostgresMock) GetSecurityQuestionResponse ¶
func (gm *PostgresMock) GetSecurityQuestionResponse(ctx context.Context, questionID string, userID string) (*domain.SecurityQuestionResponse, error)
GetSecurityQuestionResponse mocks the get security question implementation
func (*PostgresMock) GetSecurityQuestions ¶
func (gm *PostgresMock) GetSecurityQuestions(ctx context.Context, flavour feedlib.Flavour) ([]*domain.SecurityQuestion, error)
GetSecurityQuestions mocks the implementation of getting all the security questions.
func (*PostgresMock) GetServiceRequests ¶
func (gm *PostgresMock) GetServiceRequests(ctx context.Context, requestType, requestStatus *string, facilityID string, programID string, flavour feedlib.Flavour, pagination *domain.Pagination) ([]*domain.ServiceRequest, *domain.Pagination, error)
GetServiceRequests mocks the implementation of getting all service requests for a client
func (*PostgresMock) GetServiceRequestsForKenyaEMR ¶
func (gm *PostgresMock) GetServiceRequestsForKenyaEMR(ctx context.Context, payload *dto.ServiceRequestPayload) ([]*domain.ServiceRequest, error)
GetServiceRequestsForKenyaEMR mocks the getting of red flag service requests for use by KenyaEMR
func (*PostgresMock) GetSharedHealthDiaryEntries ¶
func (gm *PostgresMock) GetSharedHealthDiaryEntries(ctx context.Context, clientID string, facilityID string) ([]*domain.ClientHealthDiaryEntry, error)
GetSharedHealthDiaryEntries mocks the implementation of getting the most recently shared health diary entires by the client to a health care worker
func (*PostgresMock) GetStaffFacilities ¶
func (gm *PostgresMock) GetStaffFacilities(ctx context.Context, input dto.StaffFacilityInput, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
GetStaffFacilities mocks the implementation of getting staff facilities
func (*PostgresMock) GetStaffProfile ¶
func (gm *PostgresMock) GetStaffProfile(ctx context.Context, userID string, programID string) (*domain.StaffProfile, error)
GetStaffProfile mocks the method for fetching a staff profile using the user ID
func (*PostgresMock) GetStaffProfileByStaffID ¶
func (gm *PostgresMock) GetStaffProfileByStaffID(ctx context.Context, staffID string) (*domain.StaffProfile, error)
GetStaffProfileByStaffID mocks the implementation getting staff profile by staff ID
func (*PostgresMock) GetStaffServiceRequestByID ¶
func (gm *PostgresMock) GetStaffServiceRequestByID(ctx context.Context, serviceRequestID string) (*domain.ServiceRequest, error)
GetStaffServiceRequestByID mocks the implementation of getting a service request by ID
func (*PostgresMock) GetStaffUserPrograms ¶
func (gm *PostgresMock) GetStaffUserPrograms(ctx context.Context, userID string) ([]*domain.Program, error)
GetStaffUserPrograms retrieves all programs associated with a staff user
func (*PostgresMock) GetSurveyServiceRequestUser ¶
func (gm *PostgresMock) GetSurveyServiceRequestUser(ctx context.Context, facilityID string, projectID int, formID string, pagination *domain.Pagination) ([]*domain.SurveyServiceRequestUser, *domain.Pagination, error)
GetSurveyServiceRequestUser mocks the implementation of getting users with survey service request
func (*PostgresMock) GetSurveysWithServiceRequests ¶
func (gm *PostgresMock) GetSurveysWithServiceRequests(ctx context.Context, facilityID, programID string) ([]*dto.SurveysWithServiceRequest, error)
GetSurveysWithServiceRequests mocks the implementation of getting surveys with service requests
func (*PostgresMock) GetUserClientProfiles ¶
func (gm *PostgresMock) GetUserClientProfiles(ctx context.Context, userID string) ([]*domain.ClientProfile, error)
GetUserClientProfiles mocks the implementation of GetUserClientProfiles method
func (*PostgresMock) GetUserFacilities ¶
func (gm *PostgresMock) GetUserFacilities(ctx context.Context, user *domain.User, pagination *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
GetUserFacilities mocks the implementation of getting user facilities
func (*PostgresMock) GetUserPINByUserID ¶
func (gm *PostgresMock) GetUserPINByUserID(ctx context.Context, userID string) (*domain.UserPIN, error)
GetUserPINByUserID mocks the get user pin by ID implementation
func (*PostgresMock) GetUserProfileByPhoneNumber ¶
func (gm *PostgresMock) GetUserProfileByPhoneNumber(ctx context.Context, phoneNumber string) (*domain.User, error)
GetUserProfileByPhoneNumber mocks the implementation of fetching a user profile by phonenumber
func (*PostgresMock) GetUserProfileByPushToken ¶
func (gm *PostgresMock) GetUserProfileByPushToken(ctx context.Context, pushToken string) (*domain.User, error)
GetUserProfileByPushToken mocks the retrieving of user profile by push token
func (*PostgresMock) GetUserProfileByUserID ¶
func (gm *PostgresMock) GetUserProfileByUserID(ctx context.Context, userID string) (*domain.User, error)
GetUserProfileByUserID mocks the implementation of fetching a user profile by userID
func (*PostgresMock) GetUserProfileByUsername ¶
func (gm *PostgresMock) GetUserProfileByUsername(ctx context.Context, username string) (*domain.User, error)
GetUserProfileByUsername retrieves a user using their username
func (*PostgresMock) GetUserSecurityQuestionsResponses ¶
func (gm *PostgresMock) GetUserSecurityQuestionsResponses(ctx context.Context, userID, flavour string) ([]*domain.SecurityQuestionResponse, error)
GetUserSecurityQuestionsResponses mocks the implementation of getting the user's responded security questions
func (*PostgresMock) GetUserStaffProfiles ¶
func (gm *PostgresMock) GetUserStaffProfiles(ctx context.Context, userID string) ([]*domain.StaffProfile, error)
GetUserStaffProfiles mocks the implementation of GetUserStaffProfiles method
func (*PostgresMock) GetUserSurveyForms ¶
func (gm *PostgresMock) GetUserSurveyForms(ctx context.Context, params map[string]interface{}) ([]*domain.UserSurvey, error)
GetUserSurveyForms mocks the implementation of getting user survey forms
func (*PostgresMock) GetValidClientJWT ¶
func (gm *PostgresMock) GetValidClientJWT(ctx context.Context, jti string) (*domain.OauthClientJWT, error)
GetValidClientJWT retrieves a JWT that is still valid i.e not expired
func (*PostgresMock) InactivateFacility ¶
func (gm *PostgresMock) InactivateFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
InactivateFacility mocks the implementation of inactivating the active status of a particular facility
func (*PostgresMock) InvalidatePIN ¶
InvalidatePIN mocks the implementation of invalidating a user pin
func (*PostgresMock) ListAppointments ¶
func (gm *PostgresMock) ListAppointments(ctx context.Context, params *domain.Appointment, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*domain.Appointment, *domain.Pagination, error)
ListAppointments lists appointments based on provided criteria
func (*PostgresMock) ListAvailableNotificationTypes ¶
func (gm *PostgresMock) ListAvailableNotificationTypes(ctx context.Context, params *domain.Notification) ([]enums.NotificationType, error)
ListAvailableNotificationTypes retrieves the distinct notification types available for a user
func (*PostgresMock) ListBookings ¶
func (gm *PostgresMock) ListBookings(ctx context.Context, clientID string, bookingState enums.BookingState, pagination *domain.Pagination) ([]*domain.Booking, *domain.Pagination, error)
ListBookings is used to mock the implementation of listing client bookings
func (*PostgresMock) ListClientsCaregivers ¶
func (gm *PostgresMock) ListClientsCaregivers(ctx context.Context, clientID string, pagination *domain.Pagination) (*domain.ClientCaregivers, *domain.Pagination, error)
ListClientsCaregivers mocks the implementation of listing clients caregivers
func (*PostgresMock) ListCommunities ¶
func (gm *PostgresMock) ListCommunities(ctx context.Context, programID string, organisationID string) ([]*domain.Community, error)
ListCommunities mocks the implementation of listing communities
func (*PostgresMock) ListFacilities ¶
func (gm *PostgresMock) ListFacilities(ctx context.Context, searchTerm *string, filterInput []*dto.FiltersInput, paginationsInput *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
ListFacilities mocks the implementation of `gorm's` GetFacilities method
func (*PostgresMock) ListNotifications ¶
func (gm *PostgresMock) ListNotifications(ctx context.Context, params *domain.Notification, filters []*firebasetools.FilterParam, pagination *domain.Pagination) ([]*domain.Notification, *domain.Pagination, error)
ListNotifications lists notifications based on the provided parameters
func (*PostgresMock) ListOrganisations ¶
func (gm *PostgresMock) ListOrganisations(ctx context.Context, pagination *domain.Pagination) ([]*domain.Organisation, *domain.Pagination, error)
ListOrganisations mocks the implementation of listing organisations
func (*PostgresMock) ListProgramFacilities ¶
func (gm *PostgresMock) ListProgramFacilities(ctx context.Context, programID, searchTerm *string, filterInput []*dto.FiltersInput, paginationsInput *domain.Pagination) ([]*domain.Facility, *domain.Pagination, error)
ListProgramFacilities mocks the implementation of ListProgramFacilities method.
func (*PostgresMock) ListPrograms ¶
func (gm *PostgresMock) ListPrograms(ctx context.Context, organisationID *string, pagination *domain.Pagination) ([]*domain.Program, *domain.Pagination, error)
ListPrograms mocks the implementation of getting programs
func (*PostgresMock) ListSurveyRespondents ¶
func (gm *PostgresMock) ListSurveyRespondents(ctx context.Context, params *domain.UserSurvey, facilityID string, pagination *domain.Pagination) ([]*domain.SurveyRespondent, *domain.Pagination, error)
ListSurveyRespondents mocks the implementation of listing survey respondents
func (*PostgresMock) ReactivateFacility ¶
func (gm *PostgresMock) ReactivateFacility(ctx context.Context, identifier *dto.FacilityIdentifierInput) (bool, error)
ReactivateFacility mocks the implementation of re-activating the active status of a particular facility
func (*PostgresMock) RegisterCaregiver ¶
func (gm *PostgresMock) RegisterCaregiver(ctx context.Context, input *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
RegisterCaregiver registers a new caregiver on the platform
func (*PostgresMock) RegisterClient ¶
func (gm *PostgresMock) RegisterClient(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
RegisterClient mocks the implementation of registering a client
func (*PostgresMock) RegisterExistingUserAsCaregiver ¶
func (gm *PostgresMock) RegisterExistingUserAsCaregiver(ctx context.Context, payload *domain.CaregiverRegistration) (*domain.CaregiverProfile, error)
RegisterExistingUserAsCaregiver mocks the implementation of registering an existing user as a caregiver
func (*PostgresMock) RegisterExistingUserAsClient ¶
func (gm *PostgresMock) RegisterExistingUserAsClient(ctx context.Context, payload *domain.ClientRegistrationPayload) (*domain.ClientProfile, error)
RegisterExistingUserAsClient mocks the implementation of registering an existing user as a client
func (*PostgresMock) RegisterExistingUserAsStaff ¶
func (gm *PostgresMock) RegisterExistingUserAsStaff(ctx context.Context, input *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
RegisterExistingUserAsStaff mocks the implementation of registering an existing user as staff
func (*PostgresMock) RegisterStaff ¶
func (gm *PostgresMock) RegisterStaff(ctx context.Context, staff *domain.StaffRegistrationPayload) (*domain.StaffProfile, error)
RegisterStaff mocks the implementation of registering a staff
func (*PostgresMock) RemoveFacilitiesFromClientProfile ¶
func (gm *PostgresMock) RemoveFacilitiesFromClientProfile(ctx context.Context, clientID string, facilities []string) error
RemoveFacilitiesFromClientProfile mocks the implementation of removing facilities from a client profile
func (*PostgresMock) RemoveFacilitiesFromStaffProfile ¶
func (gm *PostgresMock) RemoveFacilitiesFromStaffProfile(ctx context.Context, staffID string, facilities []string) error
RemoveFacilitiesFromStaffProfile mocks the implementation of removing facilities from a staff profile
func (*PostgresMock) ResolveServiceRequest ¶
func (gm *PostgresMock) ResolveServiceRequest(ctx context.Context, staffID *string, serviceRequestID *string, status string, action []string, comment *string) error
ResolveServiceRequest mocks the implementation of resolving a service request
func (*PostgresMock) ResolveStaffServiceRequest ¶
func (gm *PostgresMock) ResolveStaffServiceRequest(ctx context.Context, staffID *string, serviceRequestID *string, verificationStatus string) (bool, error)
ResolveStaffServiceRequest mocks the implementation resolving staff service requests
func (*PostgresMock) RetrieveFacility ¶
func (gm *PostgresMock) RetrieveFacility(ctx context.Context, id *string, isActive bool) (*domain.Facility, error)
RetrieveFacility mocks the implementation of `gorm's` RetrieveFacility method.
func (*PostgresMock) RetrieveFacilityByIdentifier ¶
func (gm *PostgresMock) RetrieveFacilityByIdentifier(ctx context.Context, identifier *dto.FacilityIdentifierInput, isActive bool) (*domain.Facility, error)
RetrieveFacilityByIdentifier mocks the implementation of `gorm's` RetrieveFacilityByIdentifier method.
func (*PostgresMock) SaveFeedback ¶
func (gm *PostgresMock) SaveFeedback(ctx context.Context, feedback *domain.FeedbackResponse) error
SaveFeedback mocks the implementation of saving feedback into the database
func (*PostgresMock) SaveNotification ¶
func (gm *PostgresMock) SaveNotification(ctx context.Context, payload *domain.Notification) error
SaveNotification saves the notifications to the database
func (*PostgresMock) SaveSecurityQuestionResponse ¶
func (gm *PostgresMock) SaveSecurityQuestionResponse(ctx context.Context, securityQuestionResponse []*dto.SecurityQuestionResponseInput) error
SaveSecurityQuestionResponse saves the response of a security question
func (*PostgresMock) SaveTemporaryUserPin ¶
func (gm *PostgresMock) SaveTemporaryUserPin(ctx context.Context, pinData *domain.UserPIN) (bool, error)
SaveTemporaryUserPin mocks the implementation of saving a temporary user pin
func (*PostgresMock) SearchCaregiverUser ¶
func (gm *PostgresMock) SearchCaregiverUser(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
SearchCaregiverUser mocks the implementation of searching caregivers
func (*PostgresMock) SearchClientProfile ¶
func (gm *PostgresMock) SearchClientProfile(ctx context.Context, searchTerm string) ([]*domain.ClientProfile, error)
SearchClientProfile mocks the implementation of searching for client profiles. It returns clients profiles whose parts of the CCC number matches
func (*PostgresMock) SearchClientServiceRequests ¶
func (gm *PostgresMock) SearchClientServiceRequests(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*domain.ServiceRequest, error)
SearchClientServiceRequests mocks the implementation of searching client service requests
func (*PostgresMock) SearchOrganisation ¶
func (gm *PostgresMock) SearchOrganisation(ctx context.Context, searchParameter string) ([]*domain.Organisation, error)
SearchOrganisation mocks the implementation of searching organisations
func (*PostgresMock) SearchPlatformCaregivers ¶
func (gm *PostgresMock) SearchPlatformCaregivers(ctx context.Context, searchParameter string) ([]*domain.CaregiverProfile, error)
SearchPlatformCaregivers mocks the implementation of searching caregivers
func (*PostgresMock) SearchPrograms ¶
func (gm *PostgresMock) SearchPrograms(ctx context.Context, searchParameter string, organisationID string, pagination *domain.Pagination) ([]*domain.Program, *domain.Pagination, error)
SearchPrograms mocks the implementation of searching programs
func (*PostgresMock) SearchStaffProfile ¶
func (gm *PostgresMock) SearchStaffProfile(ctx context.Context, searchParameter string, programID *string) ([]*domain.StaffProfile, error)
SearchStaffProfile mocks the implementation of getting staff profile using their staff number.
func (*PostgresMock) SearchStaffServiceRequests ¶
func (gm *PostgresMock) SearchStaffServiceRequests(ctx context.Context, searchParameter string, requestType string, facilityID string) ([]*domain.ServiceRequest, error)
SearchStaffServiceRequests mocks the implementation of searching client service requests
func (*PostgresMock) SetInProgressBy ¶
func (gm *PostgresMock) SetInProgressBy(ctx context.Context, requestID, staffID string) (bool, error)
SetInProgressBy mocks the implementation of the `SetInProgressBy` update method
func (*PostgresMock) UpdateAccessToken ¶
func (gm *PostgresMock) UpdateAccessToken(ctx context.Context, code *domain.AccessToken, updateData map[string]interface{}) error
UpdateAccessToken updates the details of a given access token
func (*PostgresMock) UpdateAppointment ¶
func (gm *PostgresMock) UpdateAppointment(ctx context.Context, appointment *domain.Appointment, updateData map[string]interface{}) (*domain.Appointment, error)
UpdateAppointment updates an appointment
func (*PostgresMock) UpdateAuthorizationCode ¶
func (gm *PostgresMock) UpdateAuthorizationCode(ctx context.Context, code *domain.AuthorizationCode, updateData map[string]interface{}) error
UpdateAuthorizationCode updates the details of a given code
func (*PostgresMock) UpdateBooking ¶
func (gm *PostgresMock) UpdateBooking(ctx context.Context, booking *domain.Booking, updateData map[string]interface{}) error
UpdateBooking mocks the implementation of updating booking record
func (*PostgresMock) UpdateCaregiver ¶
func (gm *PostgresMock) UpdateCaregiver(ctx context.Context, caregiver *domain.CaregiverProfile, updates map[string]interface{}) error
UpdateCaregiver mocks the implementation of updating a caregiver
func (*PostgresMock) UpdateCaregiverClient ¶
func (gm *PostgresMock) UpdateCaregiverClient(ctx context.Context, caregiverClient *domain.CaregiverClient, updateData map[string]interface{}) error
UpdateCaregiverClient mocks the action of updating a caregiver client details for either client or caregiver.
func (*PostgresMock) UpdateClient ¶
func (gm *PostgresMock) UpdateClient(ctx context.Context, client *domain.ClientProfile, updates map[string]interface{}) (*domain.ClientProfile, error)
UpdateClient updates the client details for a particular client
func (*PostgresMock) UpdateClientCaregiver ¶
func (gm *PostgresMock) UpdateClientCaregiver(ctx context.Context, caregiverInput *dto.CaregiverInput) error
UpdateClientCaregiver mocks the implementation of updating a caregiver
func (*PostgresMock) UpdateClientIdentifier ¶
func (gm *PostgresMock) UpdateClientIdentifier(ctx context.Context, clientID string, identifierType string, identifierValue string, programID string) error
UpdateClientIdentifier mocks the implementation of updating a client's identifiers
func (*PostgresMock) UpdateClientServiceRequest ¶
func (gm *PostgresMock) UpdateClientServiceRequest(ctx context.Context, clientServiceRequest *domain.ServiceRequest, updateData map[string]interface{}) error
UpdateClientServiceRequest updates a service request
func (*PostgresMock) UpdateFacility ¶
func (gm *PostgresMock) UpdateFacility(ctx context.Context, facility *domain.Facility, updateData map[string]interface{}) error
UpdateFacility mocks the implementation of updating a facility
func (*PostgresMock) UpdateFailedSecurityQuestionsAnsweringAttempts ¶
func (gm *PostgresMock) UpdateFailedSecurityQuestionsAnsweringAttempts(ctx context.Context, userID string, failCount int) error
UpdateFailedSecurityQuestionsAnsweringAttempts mocks the implementation of resetting failed security attempts
func (*PostgresMock) UpdateHealthDiary ¶
func (gm *PostgresMock) UpdateHealthDiary(ctx context.Context, clientHealthDiaryEntry *domain.ClientHealthDiaryEntry, updateData map[string]interface{}) error
UpdateHealthDiary mocks the implementation of updating the share status a health diary entry when the client opts for the sharing
func (*PostgresMock) UpdateIsCorrectSecurityQuestionResponse ¶
func (gm *PostgresMock) UpdateIsCorrectSecurityQuestionResponse(ctx context.Context, userID string, isCorrectSecurityQuestionResponse bool) (bool, error)
UpdateIsCorrectSecurityQuestionResponse updates the IsCorrectSecurityQuestion response
func (*PostgresMock) UpdateNotification ¶
func (gm *PostgresMock) UpdateNotification(ctx context.Context, notification *domain.Notification, updateData map[string]interface{}) error
UpdateNotification updates the notification with the provided notification details
func (*PostgresMock) UpdateProgram ¶
func (gm *PostgresMock) UpdateProgram(ctx context.Context, program *domain.Program, updateData map[string]interface{}) error
UpdateProgram mocks the implementation of updating a program
func (*PostgresMock) UpdateRefreshToken ¶
func (gm *PostgresMock) UpdateRefreshToken(ctx context.Context, code *domain.RefreshToken, updateData map[string]interface{}) error
UpdateRefreshToken updates the details of a given refresh token
func (*PostgresMock) UpdateServiceRequests ¶
func (gm *PostgresMock) UpdateServiceRequests(ctx context.Context, payload *domain.UpdateServiceRequestsPayload) (bool, error)
UpdateServiceRequests mocks the implementation of updating service requests
func (*PostgresMock) UpdateStaff ¶
func (gm *PostgresMock) UpdateStaff(ctx context.Context, staff *domain.StaffProfile, updates map[string]interface{}) error
UpdateStaff mocks the implementation of updating the staff profile
func (*PostgresMock) UpdateUser ¶
func (gm *PostgresMock) UpdateUser(ctx context.Context, user *domain.User, updateData map[string]interface{}) error
UpdateUser mocks the implementation of updating a user profile
func (*PostgresMock) UpdateUserContact ¶
func (gm *PostgresMock) UpdateUserContact(ctx context.Context, contact *domain.Contact, updateData map[string]interface{}) error
UpdateUserContact mocks the implementation of updating a user's contact
func (*PostgresMock) UpdateUserPinChangeRequiredStatus ¶
func (gm *PostgresMock) 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 (*PostgresMock) UpdateUserPinUpdateRequiredStatus ¶
func (gm *PostgresMock) UpdateUserPinUpdateRequiredStatus(ctx context.Context, userID string, flavour feedlib.Flavour, status bool) error
UpdateUserPinUpdateRequiredStatus mocks updating a user `pin update required status`
func (*PostgresMock) UpdateUserSurveys ¶
func (gm *PostgresMock) UpdateUserSurveys(ctx context.Context, survey *domain.UserSurvey, updateData map[string]interface{}) error
UpdateUserSurveys mocks the implementation of `gorm's` UpdateUserSurveys method.
func (*PostgresMock) VerifyOTP ¶
func (gm *PostgresMock) VerifyOTP(ctx context.Context, payload *dto.VerifyOTPInput) (bool, error)
VerifyOTP mocks the implementation of verify otp