resolvers

package
v0.0.0-...-a97fee2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeModelPlanForAnalyzedAudit

func AnalyzeModelPlanForAnalyzedAudit(
	ctx context.Context,
	store *storage.Store,
	logger *zap.Logger,
	dayToAnalyze time.Time,
	modelPlanID uuid.UUID,
) (*models.AnalyzedAudit, error)

AnalyzeModelPlanForAnalyzedAudit analyzes a model plan based on a specific day. it analyzes all desired sections and stores the result to the database

func AnalyzedAuditGetByModelPlanIDsAndDate

func AnalyzedAuditGetByModelPlanIDsAndDate(
	_ context.Context,
	store *storage.Store,
	logger *zap.Logger,

	modelPlanIDs []uuid.UUID,
	date time.Time,
) ([]*models.AnalyzedAudit, error)

AnalyzedAuditGetByModelPlanIDsAndDate returns all AnalyzedAudits for a specific date and collection of model plan ids. When possible, the data loader version of this script should be favored.

func ApplyChanges

func ApplyChanges(changes map[string]interface{}, to interface{}) error

ApplyChanges applies arbitrary changes from a map to a struct Code largely copied from GQLGen's docs on changesets https://gqlgen.com/reference/changesets/

func AuditChangeCollectionByIDAndTable

func AuditChangeCollectionByIDAndTable(logger *zap.Logger, tableName string, primaryKey uuid.UUID, store *storage.Store) ([]*models.AuditChange, error)

AuditChangeCollectionByIDAndTable returns changes based on tablename and primary key

func BaseStructPreCreate

func BaseStructPreCreate(logger *zap.Logger, bs models.IBaseStruct, principal authentication.Principal, store *storage.Store, checkAccess bool) error

BaseStructPreCreate is called before an object is created to make sure the user has permissions to do so

func BaseStructPreDelete

func BaseStructPreDelete(logger *zap.Logger, bs models.IBaseStruct, principal authentication.Principal, store *storage.Store, checkAccess bool) error

BaseStructPreDelete is called before an object is deleted to make sure the user has permissions to do so

func BaseStructPreUpdate

func BaseStructPreUpdate(logger *zap.Logger, bs models.IBaseStruct, changes map[string]interface{}, principal authentication.Principal, store *storage.Store, applyChanges bool, checkAccess bool) error

BaseStructPreUpdate applies incoming changes from to a TaskList Section, and validates it's status It modifies the base struct object bs that is passed to it.

func BaseTaskListSectionPreUpdate

func BaseTaskListSectionPreUpdate(logger *zap.Logger, tls models.IBaseTaskListSection, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) error

BaseTaskListSectionPreUpdate applies incoming changes from to a TaskList Section, and validates it's status

func CreateDiscussionReply

func CreateDiscussionReply(
	ctx context.Context,
	logger *zap.Logger,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	input *model.DiscussionReplyCreateInput,
	principal authentication.Principal,
	store *storage.Store,
	getAccountInformation userhelpers.GetAccountInfoFunc,
) (*models.DiscussionReply, error)

CreateDiscussionReply implements resolver logic to create a Discussion reply object

func CreatePlanDiscussion

func CreatePlanDiscussion(
	ctx context.Context,
	logger *zap.Logger,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	input *model.PlanDiscussionCreateInput,
	principal authentication.Principal,
	store *storage.Store,
	getAccountInformation userhelpers.GetAccountInfoFunc,
) (*models.PlanDiscussion, error)

CreatePlanDiscussion implements resolver logic to create a plan Discussion object. It will also save any Mentions to the tag table

func CurrentUserAccountGet

func CurrentUserAccountGet(ctx context.Context) (*authentication.UserAccount, error)

CurrentUserAccountGet Gets the account of the current user in the database

func CurrentUserLaunchDarklySettingsGet

func CurrentUserLaunchDarklySettingsGet(ctx context.Context, ldClient *ldclient.LDClient) (*model.LaunchDarklySettings, error)

CurrentUserLaunchDarklySettingsGet returns the launch darkly settings for the current user

func CurrentUserNotificationsGet

func CurrentUserNotificationsGet(ctx context.Context, np sqlutils.NamedPreparer) (*models.UserNotifications, error)

CurrentUserNotificationsGet returns the notifications for the Current User

func DailyDigestNotificationSend

func DailyDigestNotificationSend(
	ctx context.Context,
	np sqlutils.NamedPreparer,
	logger *zap.Logger,

	dateAnalyzed time.Time,
	userID uuid.UUID,
	getPreferencesFunc notifications.GetUserNotificationPreferencesFunc,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,

) error

DailyDigestNotificationSend sends a single email for a user for a given day based on their favorited models It will also call the notification package for Daily Digest Complete Activity

func DeleteDiscussionReply

func DeleteDiscussionReply(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store) (*models.DiscussionReply, error)

DeleteDiscussionReply implements resolver logic to Delete a Discussion reply object Deprecated: THIS IS NOT USED by the front end. If it is ever used, make sure to handle tags

func DeletePlanDiscussion

func DeletePlanDiscussion(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store) (*models.PlanDiscussion, error)

DeletePlanDiscussion implements resolver logic to Delete a plan Discussion object Deprecated: THIS IS NOT USED by the front end. If it is ever used, make sure to handle tags

func DiscussionReplyCollectionByDiscusionIDLOADER

func DiscussionReplyCollectionByDiscusionIDLOADER(ctx context.Context, discussionID uuid.UUID) ([]*models.DiscussionReply, error)

DiscussionReplyCollectionByDiscusionIDLOADER implements resolver logic to get Discussion Reply by a model plan ID using a data loader

func DiscussionReplyGetByID

func DiscussionReplyGetByID(_ context.Context, store *storage.Store, logger *zap.Logger, discussionReplyID uuid.UUID) (*models.DiscussionReply, error)

DiscussionReplyGetByID returns a single discussion reply from the database for a given discussionReplyID

func ExistingModelCollectionGet

func ExistingModelCollectionGet(logger *zap.Logger, store *storage.Store) ([]*models.ExistingModel, error)

ExistingModelCollectionGet returns all existing models

func ExistingModelGetByIDLOADER

func ExistingModelGetByIDLOADER(ctx context.Context, id int) (*models.ExistingModel, error)

ExistingModelGetByIDLOADER implements resolver logic to get Existing Model by a model plan ID using a data loader

func ExistingModelLinkGetByID

func ExistingModelLinkGetByID(logger *zap.Logger, store *storage.Store, principal authentication.Principal, id uuid.UUID) (*models.ExistingModelLink, error)

ExistingModelLinkGetByID returns an existing model link by its id

func ExistingModelLinkGetByModelPlanIDAndFieldNameLOADER

func ExistingModelLinkGetByModelPlanIDAndFieldNameLOADER(ctx context.Context, modelPlanID uuid.UUID, fieldName models.ExisitingModelLinkFieldType) ([]*models.ExistingModelLink, error)

ExistingModelLinkGetByModelPlanIDAndFieldNameLOADER implements resolver logic to get Existing Model Link by a model plan ID using a data loader

func ExistingModelLinkGetModel

func ExistingModelLinkGetModel(ctx context.Context, link *models.ExistingModelLink) (models.LinkedExistingModel, error)

ExistingModelLinkGetModel conditionally returns either an ExistingModel, or a ModelPlan that is connected in an existing model link

func ExistingModelLinksGetByModelPlanIDAndFieldNameLOADER

func ExistingModelLinksGetByModelPlanIDAndFieldNameLOADER(ctx context.Context, modelPlanID uuid.UUID, fieldName models.ExisitingModelLinkFieldType) (*models.ExistingModelLinks, error)

ExistingModelLinksGetByModelPlanIDAndFieldNameLOADER implements resolver logic to get Existing Model Link by a model plan ID using a data loader

func ExistingModelLinksNameArray

func ExistingModelLinksNameArray(ctx context.Context, modelPlanID uuid.UUID, fieldName models.ExisitingModelLinkFieldType) ([]string, error)

func ExistingModelLinksUpdate

func ExistingModelLinksUpdate(logger *zap.Logger, store *storage.Store, principal authentication.Principal, modelPlanID uuid.UUID, fieldName models.ExisitingModelLinkFieldType, existingModelIDs []int, currentModelPlanIDs []uuid.UUID) (*models.ExistingModelLinks, error)

ExistingModelLinksUpdate creates or deletes existing model links based on the list provided.

func GetMostRecentDiscussionRoleSelection

func GetMostRecentDiscussionRoleSelection(
	logger *zap.Logger,
	store *storage.Store,
	principal authentication.Principal,
) (*models.DiscussionRoleSelection, error)

GetMostRecentDiscussionRoleSelection implements resolver logic to get the most recent user role selection

func GetTaskListSectionLocks

func GetTaskListSectionLocks(modelPlanID uuid.UUID) ([]*model.TaskListSectionLockStatus, error)

GetTaskListSectionLocks is a convenience relay method to call the corresponding method on a resolver implementation

func IsPlanCollaborator

func IsPlanCollaborator(logger *zap.Logger, principal authentication.Principal, store *storage.Store, modelPlanID uuid.UUID) (bool, error)

IsPlanCollaborator checks if a user is a collaborator on model plan is a favorite.

func IsPlanFavorited

func IsPlanFavorited(logger *zap.Logger, principal authentication.Principal, store *storage.Store, modelPlanID uuid.UUID) (bool, error)

IsPlanFavorited checks if a model plan is a favorite.

func LockTaskListSection

func LockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section models.TaskListSection, principal authentication.Principal) (bool, error)

LockTaskListSection is a convenience relay method to call the corresponding method on a resolver implementation

func ModelPlanCollection

func ModelPlanCollection(logger *zap.Logger, principal authentication.Principal, store *storage.Store, filter model.ModelPlanFilter) ([]*models.ModelPlan, error)

ModelPlanCollection implements resolver logic to get a list of model plans by who's a collaborator on them (TODO)

func ModelPlanCreate

func ModelPlanCreate(
	ctx context.Context,
	logger *zap.Logger,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	modelName string,
	store *storage.Store,
	principal authentication.Principal,
	getAccountInformation userhelpers.GetAccountInfoFunc,
) (*models.ModelPlan, error)

ModelPlanCreate implements resolver logic to create a model plan, and send relevant notifications about it's creation It also creates a record for all the task list items at the same time. It utilizes transactions to ensure that the data can be rolled back if there is an error at any point along the way.

func ModelPlanGetByID

func ModelPlanGetByID(logger *zap.Logger, id uuid.UUID, store *storage.Store) (*models.ModelPlan, error)

ModelPlanGetByID implements resolver logic to get a model plan by its ID

func ModelPlanGetByIDLOADER

func ModelPlanGetByIDLOADER(ctx context.Context, id uuid.UUID) (*models.ModelPlan, error)

ModelPlanGetByIDLOADER implements resolver logic to get Model Plan by a model plan ID using a data loader

func ModelPlanGetSampleModel

func ModelPlanGetSampleModel(logger *zap.Logger, store *storage.Store) (*models.ModelPlan, error)

ModelPlanGetSampleModel returns the sample model plan

func ModelPlanNameHistory

func ModelPlanNameHistory(logger *zap.Logger, modelPlanID uuid.UUID, sortDir models.SortDirection, store *storage.Store) ([]string, error)

ModelPlanNameHistory returns a slice of AuditChanges, with the only values returned being the model_name field

func ModelPlanShare

func ModelPlanShare(
	ctx context.Context,
	logger *zap.Logger,
	store *storage.Store,
	principal authentication.Principal,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	modelPlanID uuid.UUID,
	viewFilter *models.ModelViewFilter,
	usernames []string,
	optionalMessage *string,
	getAccountInformation userhelpers.GetAccountInfoFunc,
) (bool, error)

ModelPlanShare implements resolver logic to share a model plan with a list of emails

func ModelPlanUpdate

func ModelPlanUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.ModelPlan, error)

ModelPlanUpdate implements resolver logic to update a model plan

func NDAAgreementGetByUserID

func NDAAgreementGetByUserID(logger *zap.Logger, principal authentication.Principal, store *storage.Store) (*model.NDAInfo, error)

NDAAgreementGetByUserID returns an EUA agreement by eua

func NDAAgreementUpdateOrCreate

func NDAAgreementUpdateOrCreate(logger *zap.Logger, agree bool, principal authentication.Principal, store *storage.Store) (*model.NDAInfo, error)

NDAAgreementUpdateOrCreate either writes an entry to the nda table, or updates an existing one

func NewDBConfig

func NewDBConfig() storage.DBConfig

NewDBConfig returns a DBConfig struct with values from appconfig

func OnLockTaskListSectionContext

func OnLockTaskListSectionContext(
	ps pubsub.PubSub,
	modelPlanID uuid.UUID,
	principal authentication.Principal,
	onDisconnect <-chan struct{},
) (<-chan *model.TaskListSectionLockStatusChanged, error)

OnLockTaskListSectionContext maintains a webhook monitoring changes to task list sections. Once that webhook dies it will auto-unlock any section locked by that EUAID.

func OperationaSolutionsAndPossibleGetByOPNeedIDLOADER

func OperationaSolutionsAndPossibleGetByOPNeedIDLOADER(ctx context.Context, operationalNeedID uuid.UUID, includeNotNeeded bool) ([]*models.OperationalSolution, error)

OperationaSolutionsAndPossibleGetByOPNeedIDLOADER returns operational Solutions and possible Operational Solutions based on a specific operational Need ID using a Data Loader

func OperationalNeedCollectionGetByModelPlanID

func OperationalNeedCollectionGetByModelPlanID(logger *zap.Logger, modelPlanID uuid.UUID, store *storage.Store) ([]*models.OperationalNeed, error)

OperationalNeedCollectionGetByModelPlanID returns possible and existing OperationalNeeds associated to a model plan

func OperationalNeedCollectionGetByModelPlanIDLOADER

func OperationalNeedCollectionGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) ([]*models.OperationalNeed, error)

OperationalNeedCollectionGetByModelPlanIDLOADER returns possible and existing OperationalNeeds associated to a model plan

func OperationalNeedCustomUpdateByID

func OperationalNeedCustomUpdateByID(logger *zap.Logger, operationNeedID uuid.UUID, customNeedType *string, needed bool, principal authentication.Principal, store *storage.Store) (*models.OperationalNeed, error)

OperationalNeedCustomUpdateByID updates an Operational Need by it's ID. Note, we don't allow updating a need type, except customNeedTypes

func OperationalNeedGetByID

func OperationalNeedGetByID(logger *zap.Logger, id uuid.UUID, store *storage.Store) (*models.OperationalNeed, error)

OperationalNeedGetByID returns an operational Need by it's ID

func OperationalNeedInsertOrUpdateCustom

func OperationalNeedInsertOrUpdateCustom(logger *zap.Logger, modelPlanID uuid.UUID, customNeedType string, needed bool, principal authentication.Principal, store *storage.Store) (*models.OperationalNeed, error)

OperationalNeedInsertOrUpdateCustom adds or updates a Custom Operational Need

func OperationalSolutionCreate

func OperationalSolutionCreate(
	ctx context.Context,
	store *storage.Store,
	logger *zap.Logger,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	operationNeedID uuid.UUID,
	solutionType *models.OperationalSolutionKey,
	changes map[string]interface{},
	principal authentication.Principal,
) (*models.OperationalSolution, error)

OperationalSolutionCreate calls a DB method to create an operational solution

func OperationalSolutionGetByID

func OperationalSolutionGetByID(logger *zap.Logger, id uuid.UUID, store *storage.Store) (*models.OperationalSolution, error)

OperationalSolutionGetByID returns an operational Solution by it's ID

func OperationalSolutionSubtaskDelete

func OperationalSolutionSubtaskDelete(
	logger *zap.Logger,
	store *storage.Store,
	principal authentication.Principal,
	id uuid.UUID,
) (int, error)

OperationalSolutionSubtaskDelete implements resolver logic to delete an operational solution subtask

func OperationalSolutionSubtaskGetByID

func OperationalSolutionSubtaskGetByID(
	logger *zap.Logger,
	store *storage.Store,
	subtaskID uuid.UUID,
) (*models.OperationalSolutionSubtask, error)

OperationalSolutionSubtaskGetByID implements the resolver logic to get an operational solution subtask by ID

func OperationalSolutionSubtaskGetBySolutionIDLOADER

func OperationalSolutionSubtaskGetBySolutionIDLOADER(ctx context.Context, solutionID uuid.UUID) ([]*models.OperationalSolutionSubtask, error)

OperationalSolutionSubtaskGetBySolutionIDLOADER implements resolver logic to get Operational Solution Subtask by a model plan ID using a data loader

func OperationalSolutionSubtasksCreate

func OperationalSolutionSubtasksCreate(
	logger *zap.Logger,
	store *storage.Store,
	inputs []*model.CreateOperationalSolutionSubtaskInput,
	solutionID uuid.UUID,
	principal authentication.Principal,
) ([]*models.OperationalSolutionSubtask, error)

OperationalSolutionSubtasksCreate implements resolver logic to create an operational solution subtask in the database

func OperationalSolutionSubtasksUpdateByID

func OperationalSolutionSubtasksUpdateByID(
	logger *zap.Logger,
	store *storage.Store,
	principal authentication.Principal,
	subtasksChanges []*model.UpdateOperationalSolutionSubtaskInput,
) ([]*models.OperationalSolutionSubtask, error)

OperationalSolutionSubtasksUpdateByID implements the resolver logic to update a collection of operational solution subtasks by ID

func OperationalSolutionUpdate

func OperationalSolutionUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.OperationalSolution, error)

OperationalSolutionUpdate updates an operational Solution by it's ID

func PlanBasicsGetByModelPlanIDLOADER

func PlanBasicsGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanBasics, error)

PlanBasicsGetByModelPlanIDLOADER implements resolver logic to get plan basics by a model plan ID using a data loader

func PlanBeneficiariesGetByModelPlanIDLOADER

func PlanBeneficiariesGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanBeneficiaries, error)

PlanBeneficiariesGetByModelPlanIDLOADER implements resolver logic to get Plan Beneficiaries by a model plan ID using a data loader

func PlanBeneficiariesUpdate

func PlanBeneficiariesUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanBeneficiaries, error)

PlanBeneficiariesUpdate updates a plan Beneficiary buisness object

func PlanCRCreate

func PlanCRCreate(logger *zap.Logger, input *model.PlanCRCreateInput, principal authentication.Principal, store *storage.Store) (*models.PlanCR, error)

PlanCRCreate creates a new plan_cr_tdl record in the database

func PlanCRDelete

func PlanCRDelete(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store) (*models.PlanCR, error)

PlanCRDelete deletes a plan cr_tdl record in the database

func PlanCRGet

func PlanCRGet(logger *zap.Logger, id uuid.UUID, store *storage.Store) (*models.PlanCR, error)

PlanCRGet returns a plan_cr_tdl record in the database

func PlanCRUpdate

func PlanCRUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanCR, error)

PlanCRUpdate updates a plan_cr_tdl record in the database

func PlanCRsGetByModelPlanID

func PlanCRsGetByModelPlanID(logger *zap.Logger, modelPlanID uuid.UUID, store *storage.Store) ([]*models.PlanCR, error)

PlanCRsGetByModelPlanID returns plan_cr_tdl records related to a model plan

func PlanCollaboratorCreate

func PlanCollaboratorCreate(
	ctx context.Context,
	np sqlutils.NamedPreparer,
	store *storage.Store,
	logger *zap.Logger,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	input *model.PlanCollaboratorCreateInput,
	principal authentication.Principal,
	checkAccess bool,
	getAccountInformation userhelpers.GetAccountInfoFunc,
	createNotification bool,
) (*models.PlanCollaborator, *models.PlanFavorite, error)

CreatePlanCollaboratorTransaction implements resolver logic to create a plan collaborator If the email service or email template service is not provided this method will not

send the collaborator a notification email

A plan favorite is created for the collaborating user when the user is added as a collaborator The transaction object does not commit or rollback in the scope of this function

func PlanCollaboratorDelete

func PlanCollaboratorDelete(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store) (*models.PlanCollaborator, error)

PlanCollaboratorDelete implements resolver logic to delete a plan collaborator

func PlanCollaboratorGetByID

func PlanCollaboratorGetByID(ctx context.Context, id uuid.UUID) (*models.PlanCollaborator, error)

PlanCollaboratorGetByID implements resolver logic to fetch a plan collaborator by ID. It requires the ctx to have a DataLoader embedded.

func PlanCollaboratorGetByModelPlanIDLOADER

func PlanCollaboratorGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) ([]*models.PlanCollaborator, error)

PlanCollaboratorGetByModelPlanIDLOADER implements resolver logic to get Plan Collaborator by a model plan ID using a data loader

func PlanCollaboratorUpdate

func PlanCollaboratorUpdate(logger *zap.Logger, id uuid.UUID, newRoles []models.TeamRole, principal authentication.Principal, store *storage.Store) (*models.PlanCollaborator, error)

PlanCollaboratorUpdate implements resolver logic to update a plan collaborator

func PlanDiscussionGetByID

func PlanDiscussionGetByID(_ context.Context, store *storage.Store, logger *zap.Logger, discussionID uuid.UUID) (*models.PlanDiscussion, error)

PlanDiscussionGetByID returns a single discussion from the database for a given discussionID

func PlanDiscussionGetByModelPlanIDLOADER

func PlanDiscussionGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) ([]*models.PlanDiscussion, error)

PlanDiscussionGetByModelPlanIDLOADER implements resolver logic to get Plan Discussion by a model plan ID using a data loader

func PlanDocumentCreate

func PlanDocumentCreate(logger *zap.Logger, input *model.PlanDocumentInput, principal authentication.Principal, store *storage.Store, s3Client *upload.S3Client) (*models.PlanDocument, error)

PlanDocumentCreate implements resolver logic to upload the specified file to S3 and create a matching plan document entity in the database.

func PlanDocumentCreateLinked

func PlanDocumentCreateLinked(logger *zap.Logger, input model.PlanDocumentLinkInput, principal authentication.Principal, store *storage.Store) (*models.PlanDocument, error)

PlanDocumentCreateLinked creates a plan document which is a link to an external URL instead of an Uploaded file

func PlanDocumentDelete

func PlanDocumentDelete(logger *zap.Logger, s3Client *upload.S3Client, id uuid.UUID, principal authentication.Principal, store *storage.Store) (int, error)

PlanDocumentDelete implements resolver logic to update a plan document object

func PlanDocumentNumLinkedSolutions

func PlanDocumentNumLinkedSolutions(logger *zap.Logger, principal authentication.Principal, store *storage.Store, documentID uuid.UUID) (int, error)

PlanDocumentNumLinkedSolutions implements resolver logic to retrieve the number of linked solutions for a document by ID

func PlanDocumentRead

func PlanDocumentRead(logger *zap.Logger, store *storage.Store, s3Client *upload.S3Client, id uuid.UUID) (*models.PlanDocument, error)

PlanDocumentRead implements resolver logic to fetch a plan document object by ID

func PlanDocumentSolutionLinkRemove

func PlanDocumentSolutionLinkRemove(logger *zap.Logger, solutionID uuid.UUID, documentIDs []uuid.UUID, store *storage.Store, principal authentication.Principal) (bool, error)

PlanDocumentSolutionLinkRemove implements resolver logic to delete a plan document solution link

func PlanDocumentSolutionLinksCreate

func PlanDocumentSolutionLinksCreate(logger *zap.Logger, store *storage.Store, solutionID uuid.UUID, documentIDs []uuid.UUID, principal authentication.Principal) ([]*models.PlanDocumentSolutionLink, error)

PlanDocumentSolutionLinksCreate implements resolver logic to create a collection of new plan document solution links

func PlanDocumentSolutionLinksGetBySolutionID

func PlanDocumentSolutionLinksGetBySolutionID(logger *zap.Logger, id uuid.UUID, store *storage.Store) ([]*models.PlanDocumentSolutionLink, error)

PlanDocumentSolutionLinksGetBySolutionID implements resolver logic to get plan document solution links associated with a plan ID

func PlanDocumentsReadByModelPlanID

func PlanDocumentsReadByModelPlanID(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store, s3Client *upload.S3Client) ([]*models.PlanDocument, error)

PlanDocumentsReadByModelPlanID implements resolver logic to fetch a plan document object by model plan ID

func PlanDocumentsReadBySolutionID

func PlanDocumentsReadBySolutionID(
	logger *zap.Logger,
	id uuid.UUID,
	principal authentication.Principal,
	store *storage.Store,
	s3Client *upload.S3Client,
) ([]*models.PlanDocument, error)

PlanDocumentsReadBySolutionID implements resolver logic to fetch a plan document object by solution ID

func PlanFavoriteCreate

func PlanFavoriteCreate(np sqlutils.NamedPreparer, logger *zap.Logger, principal authentication.Principal, userAccountID uuid.UUID, store *storage.Store, modelPlanID uuid.UUID) (*models.PlanFavorite, error)

PlanFavoriteCreate creates a new plan favorite record in the database

func PlanFavoriteDelete

func PlanFavoriteDelete(logger *zap.Logger, principal authentication.Principal, store *storage.Store, modelPlanID uuid.UUID) (*models.PlanFavorite, error)

PlanFavoriteDelete deletes a plan favorite record in the database

func PlanFavoriteGet

func PlanFavoriteGet(logger *zap.Logger, principal authentication.Principal, store *storage.Store, modelPlandID uuid.UUID) (*models.PlanFavorite, error)

PlanFavoriteGet returns a plan favorite record

func PlanGeneralCharacteristicsGetByModelPlanIDLOADER

func PlanGeneralCharacteristicsGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanGeneralCharacteristics, error)

PlanGeneralCharacteristicsGetByModelPlanIDLOADER implements resolver logic to get plan general characteristics by a model plan ID using a data loader

func PlanGeneralCharacteristicsGetExistingModelName

func PlanGeneralCharacteristicsGetExistingModelName(ctx context.Context, planGeneralCharacteristics *models.PlanGeneralCharacteristics) (*string, error)

func PlanOpsEvalAndLearningGetByModelPlanIDLOADER

func PlanOpsEvalAndLearningGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanOpsEvalAndLearning, error)

PlanOpsEvalAndLearningGetByModelPlanIDLOADER implements resolver logic to get Plan Operations Evaluation And Learning by a model plan ID using a data loader

func PlanOpsEvalAndLearningUpdate

func PlanOpsEvalAndLearningUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanOpsEvalAndLearning, error)

PlanOpsEvalAndLearningUpdate updates a PlanOpsEvalAndLearning buisness object

func PlanParticipantsAndProvidersGetByModelPlanIDLOADER

func PlanParticipantsAndProvidersGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanParticipantsAndProviders, error)

PlanParticipantsAndProvidersGetByModelPlanIDLOADER implements resolver logic to get Plan Participants and Providers by a model plan ID using a data loader

func PlanParticipantsAndProvidersUpdate

func PlanParticipantsAndProvidersUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanParticipantsAndProviders, error)

PlanParticipantsAndProvidersUpdate updates a plan ProvidersAndParticipants buisness object

func PlanPaymentsGetByModelPlanIDLOADER

func PlanPaymentsGetByModelPlanIDLOADER(ctx context.Context, modelPlanID uuid.UUID) (*models.PlanPayments, error)

PlanPaymentsGetByModelPlanIDLOADER implements resolver logic to get Plan Payments by a model plan ID using a data loader

func PlanPaymentsRead

func PlanPaymentsRead(
	logger *zap.Logger,
	store *storage.Store,
	id uuid.UUID,
) (*models.PlanPayments, error)

PlanPaymentsRead handles requests to find a Plan Payment by ID

func PlanPaymentsUpdate

func PlanPaymentsUpdate(
	logger *zap.Logger,
	store *storage.Store,
	id uuid.UUID,
	changes map[string]interface{},
	principal authentication.Principal,
) (*models.PlanPayments, error)

PlanPaymentsUpdate handles requests to update a Plan Payment

func PlanTDLCreate

func PlanTDLCreate(logger *zap.Logger, input *model.PlanTDLCreateInput, principal authentication.Principal, store *storage.Store) (*models.PlanTDL, error)

PlanTDLCreate creates a new plan_cr_tdl record in the database

func PlanTDLDelete

func PlanTDLDelete(logger *zap.Logger, id uuid.UUID, principal authentication.Principal, store *storage.Store) (*models.PlanTDL, error)

PlanTDLDelete deletes a plan cr_tdl record in the database

func PlanTDLGet

func PlanTDLGet(logger *zap.Logger, id uuid.UUID, store *storage.Store) (*models.PlanTDL, error)

PlanTDLGet returns a plan_cr_tdl record in the database

func PlanTDLUpdate

func PlanTDLUpdate(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanTDL, error)

PlanTDLUpdate updates a plan_cr_tdl record in the database

func PlanTDLsGetByModelPlanID

func PlanTDLsGetByModelPlanID(logger *zap.Logger, modelPlanID uuid.UUID, store *storage.Store) ([]*models.PlanTDL, error)

PlanTDLsGetByModelPlanID returns plan_cr_tdl records related to a model plan

func PossibleOperationalNeedCollectionGet

func PossibleOperationalNeedCollectionGet(logger *zap.Logger, store *storage.Store) ([]*models.PossibleOperationalNeed, error)

PossibleOperationalNeedCollectionGet returns all possible OperationalNeeds

func PossibleOperationalSolutionCollectionGetAll

func PossibleOperationalSolutionCollectionGetAll(logger *zap.Logger, store *storage.Store) ([]*models.PossibleOperationalSolution, error)

PossibleOperationalSolutionCollectionGetAll returns all possible operational Solutions linked to Operational Need Type

func PossibleOperationalSolutionCollectionGetByNeedType

func PossibleOperationalSolutionCollectionGetByNeedType(logger *zap.Logger, needType models.OperationalNeedKey, store *storage.Store) ([]*models.PossibleOperationalSolution, error)

PossibleOperationalSolutionCollectionGetByNeedType returns all possible operational Solutions linked to Operational Need Type

func PossibleOperationalSolutionContactsGetByPossibleSolutionID

func PossibleOperationalSolutionContactsGetByPossibleSolutionID(ctx context.Context, possibleSolutionID int) ([]*models.PossibleOperationalSolutionContact, error)

PossibleOperationalSolutionContactsGetByPossibleSolutionID returns all the contacts associated with a possible operational solution it uses a data loader to ensure efficient querying

func PossibleOperationalSolutionGetByID

func PossibleOperationalSolutionGetByID(logger *zap.Logger, store *storage.Store, id int) (*models.PossibleOperationalSolution, error)

PossibleOperationalSolutionGetByID returns a possible operational Solutions according to it's id

func ReadyForClearanceRead

func ReadyForClearanceRead(
	logger *zap.Logger,
	store *storage.Store,
	modelPlanID uuid.UUID,
) (*model.PrepareForClearance, error)

ReadyForClearanceRead handles requests to read a information about a Model Plan's "Ready for Clearance" section

func ReportAProblem

func ReportAProblem(
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	principal authentication.Principal,
	input model.ReportAProblemInput,
) (bool, error)

ReportAProblem is the resolver to send an email with a problem report

func SendFeedbackEmail

func SendFeedbackEmail(
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	principal authentication.Principal,
	input model.SendFeedbackEmailInput,
) (bool, error)

SendFeedbackEmail sends a feedback email to the mint team

func SubscribeTaskListSectionLockChanges

func SubscribeTaskListSectionLockChanges(
	ps pubsub.PubSub,
	modelPlanID uuid.UUID,
	principal authentication.Principal,
	onDisconnect <-chan struct{},
) (<-chan *model.TaskListSectionLockStatusChanged, error)

SubscribeTaskListSectionLockChanges is a convenience relay method to call the corresponding method on a resolver implementation

func TagCollectionCreate

func TagCollectionCreate(np sqlutils.NamedPreparer, logger *zap.Logger, principal authentication.Principal,
	taggedField string, taggedTable string, taggedContentID uuid.UUID, mentions []*models.HTMLMention) ([]*models.Tag, error)

TagCollectionCreate converts an array of mentions, and creates an array in the database for unique tags.

func TagCollectionGet

func TagCollectionGet(
	logger *zap.Logger,
	store *storage.Store,
	taggedTable string,
	taggedField string,
	taggedContentID uuid.UUID) ([]*models.Tag, error)

TagCollectionGet retrieves all the tags for a specific entry and table

func TaggedContentGet

func TaggedContentGet(
	logger *zap.Logger,
	store *storage.Store,
	rawContent string,
	taggedTable string,
	taggedField string,
	taggedContentID uuid.UUID) (*models.TaggedContent, error)

TaggedContentGet returns the tag content of a parent object

func TaggedEntityGet

func TaggedEntityGet(
	ctx context.Context,
	store *storage.Store,
	tagType models.TagType,
	EntityUUID *uuid.UUID,
	EntityIntID *int,
) (models.TaggedEntity, error)

TaggedEntityGet returns a Tagged Entity based on the table it refers to as well as the ID

func UnlockAllTaskListSections

func UnlockAllTaskListSections(ps pubsub.PubSub, modelPlanID uuid.UUID) ([]*model.TaskListSectionLockStatus, error)

UnlockAllTaskListSections is a convenience relay method to call the corresponding method on a resolver implementation

func UnlockTaskListSection

func UnlockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section models.TaskListSection, userID uuid.UUID, actionType model.ActionType) (bool, error)

UnlockTaskListSection is a convenience relay method to call the corresponding method on a resolver implementation

func UpdateDiscussionReply

func UpdateDiscussionReply(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.DiscussionReply, error)

UpdateDiscussionReply implements resolver logic to update a Discussion reply object Deprecated: THIS IS NOT USED by the front end. If it is ever used, make sure to handle tags

func UpdatePlanBasics

func UpdatePlanBasics(
	logger *zap.Logger,
	id uuid.UUID,
	changes map[string]interface{},
	principal authentication.Principal,
	store *storage.Store,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
) (*models.PlanBasics, error)

UpdatePlanBasics implements resolver logic to update a plan basics object

func UpdatePlanDiscussion

func UpdatePlanDiscussion(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanDiscussion, error)

UpdatePlanDiscussion implements resolver logic to update a plan Discussion object Deprecated: THIS IS NOT USED by the front end. If it is ever used, make sure to handle tags

func UpdatePlanGeneralCharacteristics

func UpdatePlanGeneralCharacteristics(logger *zap.Logger, id uuid.UUID, changes map[string]interface{}, principal authentication.Principal, store *storage.Store) (*models.PlanGeneralCharacteristics, error)

UpdatePlanGeneralCharacteristics implements resolver logic to update a plan general characteristics object

func UpdateTaggedHTMLMentionsAndRawContent

func UpdateTaggedHTMLMentionsAndRawContent(ctx context.Context, store *storage.Store, tHTML *models.TaggedHTML, getAccountInformation userhelpers.GetAccountInfoFunc) error

UpdateTaggedHTMLMentionsAndRawContent updates the tagged html with the correct entity ids, and updates the RAW HTMl with the new representation of the mentions Both the raw content as well as the the individual mentions are updated as a result of this method The databaseID will be updated every time regardless of it was set in the html tag.

func UserAccountGetByIDLOADER

func UserAccountGetByIDLOADER(ctx context.Context, id uuid.UUID) (*authentication.UserAccount, error)

UserAccountGetByIDLOADER returns a user account by it's internal ID, utilizing a data loader

func UserAccountGetByUsername

func UserAccountGetByUsername(logger *zap.Logger, store *storage.Store, userName string) (*authentication.UserAccount, error)

UserAccountGetByUsername returns a user account by it's userName

func UserAccountsGetByIDs

func UserAccountsGetByIDs(logger *zap.Logger, store *storage.Store, ids []uuid.UUID) ([]*authentication.UserAccount, error)

UserAccountsGetByIDs returns a list of user account by it's internal ID

func UserNotificationPreferencesGetByUserID

func UserNotificationPreferencesGetByUserID(ctx context.Context, userID uuid.UUID) (*models.UserNotificationPreferences, error)

UserNotificationPreferencesGetByUserID returns a user notification preferences object based on a userID

func UserNotificationPreferencesUpdate

func UserNotificationPreferencesUpdate(ctx context.Context, logger *zap.Logger, principal authentication.Principal, store *storage.Store, changes map[string]interface{}) (*models.UserNotificationPreferences, error)

UserNotificationPreferencesUpdate updates a user notification preferences object for a user Notice: The specific UserNotificationPreference is inferred from the principal object. It will only update the notification preference for the current user.

Types

type DateProcessor

type DateProcessor struct {
	FieldDataMap map[string]dateFieldData
	// contains filtered or unexported fields
}

DateProcessor is a struct that processes date changes

func NewDateProcessor

func NewDateProcessor(changes map[string]interface{}, existing *models.PlanBasics) (*DateProcessor, error)

NewDateProcessor is a constructor for DateProcessor

func (*DateProcessor) ExtractChangedDates

func (dp *DateProcessor) ExtractChangedDates() (map[string]email.DateChange, error)

ExtractChangedDates extracts the changed dates from the DateProcessor

type PlanTaskListSectionLocks

type PlanTaskListSectionLocks interface {
	GetTaskListSectionLocks(modelPlanID uuid.UUID) ([]*model.TaskListSectionLockStatus, error)
	SubscribeTaskListSectionLockChanges(ps pubsub.PubSub, modelPlanID uuid.UUID, principal string, onDisconnect <-chan struct{}) (<-chan *model.TaskListSectionLockStatusChanged, error)
	LockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section string, principal string) (bool, error)
	UnlockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section string, principal string) (bool, error)
	UnlockAllTaskListSections(ps pubsub.PubSub, modelPlanID uuid.UUID) []model.TaskListSectionLockStatus
}

PlanTaskListSectionLocks defines an interface to implement or mock

type PlanTaskListSectionLocksResolverImplementation

type PlanTaskListSectionLocksResolverImplementation struct {
}

PlanTaskListSectionLocksResolverImplementation is an implementation of the PlanTaskListSectionLocks interface

func NewPlanTaskListSectionLocksResolverImplementation

func NewPlanTaskListSectionLocksResolverImplementation() *PlanTaskListSectionLocksResolverImplementation

NewPlanTaskListSectionLocksResolverImplementation is a constructor to create an instance of PlanTaskListSectionLocksResolverImplementation

func (PlanTaskListSectionLocksResolverImplementation) GetTaskListSectionLocks

GetTaskListSectionLocks returns the list of locked task list sections. Any sections not included should be considered as unlocked.

func (PlanTaskListSectionLocksResolverImplementation) LockTaskListSection

func (p PlanTaskListSectionLocksResolverImplementation) LockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section models.TaskListSection, principal authentication.Principal) (bool, error)

LockTaskListSection will lock the provided task list section on the provided model

func (PlanTaskListSectionLocksResolverImplementation) SubscribeTaskListSectionLockChanges

func (p PlanTaskListSectionLocksResolverImplementation) SubscribeTaskListSectionLockChanges(ps pubsub.PubSub, modelPlanID uuid.UUID, subscriber *subscribers.TaskListSectionLockChangedSubscriber, onDisconnect <-chan struct{}) (<-chan *model.TaskListSectionLockStatusChanged, error)

SubscribeTaskListSectionLockChanges creates a Subscriber and registers it for the pubsubevents.TaskListSectionLocksChanged event

func (PlanTaskListSectionLocksResolverImplementation) UnlockAllTaskListSections

UnlockAllTaskListSections will unlock all task list sections on the provided model

func (PlanTaskListSectionLocksResolverImplementation) UnlockTaskListSection

func (p PlanTaskListSectionLocksResolverImplementation) UnlockTaskListSection(ps pubsub.PubSub, modelPlanID uuid.UUID, section models.TaskListSection, userID uuid.UUID, actionType model.ActionType) (bool, error)

UnlockTaskListSection will unlock the provided task list section on the provided model

This method will fail if the provided principal is not the person who locked the task list section

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver is a resolver.

func NewResolver

func NewResolver(
	store *storage.Store,
	service ResolverService,
	s3Client *upload.S3Client,
	emailService oddmail.EmailService,
	emailTemplateService email.TemplateService,
	addressBook email.AddressBook,
	ldClient *ldclient.LDClient,
	pubsub pubsub.PubSub,
) *Resolver

NewResolver constructs a resolver

func (*Resolver) Activity

func (r *Resolver) Activity() generated.ActivityResolver

Activity returns generated.ActivityResolver implementation.

func (*Resolver) AddedAsCollaboratorMeta

func (r *Resolver) AddedAsCollaboratorMeta() generated.AddedAsCollaboratorMetaResolver

AddedAsCollaboratorMeta returns generated.AddedAsCollaboratorMetaResolver implementation.

func (*Resolver) AnalyzedModelLeadInfo

func (r *Resolver) AnalyzedModelLeadInfo() generated.AnalyzedModelLeadInfoResolver

AnalyzedModelLeadInfo returns generated.AnalyzedModelLeadInfoResolver implementation.

func (*Resolver) AuditChange

func (r *Resolver) AuditChange() generated.AuditChangeResolver

AuditChange returns generated.AuditChangeResolver implementation.

func (*Resolver) CurrentUser

func (r *Resolver) CurrentUser() generated.CurrentUserResolver

CurrentUser returns generated.CurrentUserResolver implementation.

func (*Resolver) DailyDigestCompleteActivityMeta

func (r *Resolver) DailyDigestCompleteActivityMeta() generated.DailyDigestCompleteActivityMetaResolver

DailyDigestCompleteActivityMeta returns generated.DailyDigestCompleteActivityMetaResolver implementation.

func (*Resolver) DiscussionReply

func (r *Resolver) DiscussionReply() generated.DiscussionReplyResolver

DiscussionReply returns generated.DiscussionReplyResolver implementation.

func (r *Resolver) ExistingModelLink() generated.ExistingModelLinkResolver

ExistingModelLink returns generated.ExistingModelLinkResolver implementation.

func (r *Resolver) ExistingModelLinks() generated.ExistingModelLinksResolver

ExistingModelLinks returns generated.ExistingModelLinksResolver implementation.

func (*Resolver) ModelPlan

func (r *Resolver) ModelPlan() generated.ModelPlanResolver

ModelPlan returns generated.ModelPlanResolver implementation.

func (*Resolver) ModelPlanSharedActivityMeta

func (r *Resolver) ModelPlanSharedActivityMeta() generated.ModelPlanSharedActivityMetaResolver

ModelPlanSharedActivityMeta returns generated.ModelPlanSharedActivityMetaResolver implementation.

func (*Resolver) Mutation

func (r *Resolver) Mutation() generated.MutationResolver

Mutation returns generated.MutationResolver implementation.

func (*Resolver) NewDiscussionRepliedActivityMeta

func (r *Resolver) NewDiscussionRepliedActivityMeta() generated.NewDiscussionRepliedActivityMetaResolver

NewDiscussionRepliedActivityMeta returns generated.NewDiscussionRepliedActivityMetaResolver implementation.

func (*Resolver) OperationalNeed

func (r *Resolver) OperationalNeed() generated.OperationalNeedResolver

OperationalNeed returns generated.OperationalNeedResolver implementation.

func (*Resolver) OperationalSolution

func (r *Resolver) OperationalSolution() generated.OperationalSolutionResolver

OperationalSolution returns generated.OperationalSolutionResolver implementation.

func (*Resolver) PlanBasics

func (r *Resolver) PlanBasics() generated.PlanBasicsResolver

PlanBasics returns generated.PlanBasicsResolver implementation.

func (*Resolver) PlanBeneficiaries

func (r *Resolver) PlanBeneficiaries() generated.PlanBeneficiariesResolver

PlanBeneficiaries returns generated.PlanBeneficiariesResolver implementation.

func (*Resolver) PlanCollaborator

func (r *Resolver) PlanCollaborator() generated.PlanCollaboratorResolver

PlanCollaborator returns generated.PlanCollaboratorResolver implementation.

func (*Resolver) PlanDiscussion

func (r *Resolver) PlanDiscussion() generated.PlanDiscussionResolver

PlanDiscussion returns generated.PlanDiscussionResolver implementation.

func (*Resolver) PlanDocument

func (r *Resolver) PlanDocument() generated.PlanDocumentResolver

PlanDocument returns generated.PlanDocumentResolver implementation.

func (*Resolver) PlanGeneralCharacteristics

func (r *Resolver) PlanGeneralCharacteristics() generated.PlanGeneralCharacteristicsResolver

PlanGeneralCharacteristics returns generated.PlanGeneralCharacteristicsResolver implementation.

func (*Resolver) PlanOpsEvalAndLearning

func (r *Resolver) PlanOpsEvalAndLearning() generated.PlanOpsEvalAndLearningResolver

PlanOpsEvalAndLearning returns generated.PlanOpsEvalAndLearningResolver implementation.

func (*Resolver) PlanParticipantsAndProviders

func (r *Resolver) PlanParticipantsAndProviders() generated.PlanParticipantsAndProvidersResolver

PlanParticipantsAndProviders returns generated.PlanParticipantsAndProvidersResolver implementation.

func (*Resolver) PlanPayments

func (r *Resolver) PlanPayments() generated.PlanPaymentsResolver

PlanPayments returns generated.PlanPaymentsResolver implementation.

func (*Resolver) PossibleOperationalNeed

func (r *Resolver) PossibleOperationalNeed() generated.PossibleOperationalNeedResolver

PossibleOperationalNeed returns generated.PossibleOperationalNeedResolver implementation.

func (*Resolver) PossibleOperationalSolution

func (r *Resolver) PossibleOperationalSolution() generated.PossibleOperationalSolutionResolver

PossibleOperationalSolution returns generated.PossibleOperationalSolutionResolver implementation.

func (*Resolver) Query

func (r *Resolver) Query() generated.QueryResolver

Query returns generated.QueryResolver implementation.

func (*Resolver) Subscription

func (r *Resolver) Subscription() generated.SubscriptionResolver

Subscription returns generated.SubscriptionResolver implementation.

func (*Resolver) Tag

func (r *Resolver) Tag() generated.TagResolver

Tag returns generated.TagResolver implementation.

func (*Resolver) TaggedContent

func (r *Resolver) TaggedContent() generated.TaggedContentResolver

TaggedContent returns generated.TaggedContentResolver implementation.

func (*Resolver) TaggedInDiscussionReplyActivityMeta

func (r *Resolver) TaggedInDiscussionReplyActivityMeta() generated.TaggedInDiscussionReplyActivityMetaResolver

TaggedInDiscussionReplyActivityMeta returns generated.TaggedInDiscussionReplyActivityMetaResolver implementation.

func (*Resolver) TaggedInPlanDiscussionActivityMeta

func (r *Resolver) TaggedInPlanDiscussionActivityMeta() generated.TaggedInPlanDiscussionActivityMetaResolver

TaggedInPlanDiscussionActivityMeta returns generated.TaggedInPlanDiscussionActivityMetaResolver implementation.

func (*Resolver) UserNotification

func (r *Resolver) UserNotification() generated.UserNotificationResolver

UserNotification returns generated.UserNotificationResolver implementation.

func (*Resolver) UserNotificationPreferences

func (r *Resolver) UserNotificationPreferences() generated.UserNotificationPreferencesResolver

UserNotificationPreferences returns generated.UserNotificationPreferencesResolver implementation.

type ResolverService

type ResolverService struct {
	CreateActionUpdateStatus      func(context.Context, uuid.UUID, bool) error
	CreateActionExtendLifecycleID func(context.Context, uuid.UUID, *time.Time, *string, string, *string) error
	IssueLifecycleID              func(context.Context) error
	FetchUserInfo                 func(context.Context, string) (*models.UserInfo, error)
	SearchByName                  func(context.Context, string) ([]*models.UserInfo, error)
}

ResolverService holds service methods for use in resolvers

type TestConfigs

type TestConfigs struct {
	DBConfig  storage.DBConfig
	LDClient  *ld.LDClient
	Logger    *zap.Logger
	UserInfo  *models.UserInfo
	Store     *storage.Store
	S3Client  *upload.S3Client
	PubSub    *pubsub.ServicePubSub
	Principal *authentication.ApplicationPrincipal
	Context   context.Context
}

TestConfigs is a struct that contains all the dependencies needed to run a test

func GetDefaultTestConfigs

func GetDefaultTestConfigs() *TestConfigs

GetDefaultTestConfigs returns a TestConfigs struct with all the dependencies needed to run a test Note, it does not return the principal as this needs to be updated for every test. This should only be called from setup tests!

func (*TestConfigs) GetDefaults

func (tc *TestConfigs) GetDefaults()

GetDefaults sets the dependencies for the TestConfigs struct The principal needs to be set before every test as the user account is removed between tests

Source Files

Directories

Path Synopsis
Package mockplantasklistsectionlocks is a generated GoMock package.
Package mockplantasklistsectionlocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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