Documentation
¶
Index ¶
- Constants
- func CreateSystemIntake(ctx context.Context, np sqlutils.NamedPreparer, intake *models.SystemIntake) (*models.SystemIntake, error)
- func CreateSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, ...) (*models.SystemIntakeContact, error)
- func DeleteSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.SystemIntakeContact, error)
- func FetchSystemIntakeByIDNP(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.SystemIntake, error)
- func GetSystemIntakesWithGRBReviewCompleteQuorumMet(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
- func GetSystemIntakesWithGRBReviewEnded(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
- func GetSystemIntakesWithGRBReviewHalfwayThrough(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
- func GetSystemIntakesWithGRBReviewPastDueNoQuorum(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
- func SetSystemIntakeGRBReviewerReminderSent(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeID uuid.UUID, ...) error
- func SystemIntakeContactGetByIDsLoader(ctx context.Context, np sqlutils.NamedPreparer, _ *zap.Logger, ...) ([]*models.SystemIntakeContact, error)
- func SystemIntakeContactGetBySystemIntakeIDsLoader(ctx context.Context, np sqlutils.NamedPreparer, _ *zap.Logger, ...) ([]*models.SystemIntakeContact, error)
- func UpdateSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, ...) (*models.SystemIntakeContact, error)
- func UpdateSystemIntakeGRBReviewType(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeID uuid.UUID, ...) (*models.UpdateSystemIntakePayload, error)
- func UserAccountBulkCreate(ctx context.Context, np sqlutils.NamedPreparer, ...) ([]*authentication.UserAccount, error)
- func UserAccountBulkUpdate(ctx context.Context, np sqlutils.NamedPreparer, ...) ([]*authentication.UserAccount, error)
- func UserAccountCreate(ctx context.Context, np sqlutils.NamedPreparer, ...) (*authentication.UserAccount, error)
- func UserAccountGetByUsername(ctx context.Context, np sqlutils.NamedPreparer, username string) (*authentication.UserAccount, error)
- func UserAccountGetByUsernames(ctx context.Context, np sqlutils.NamedPreparer, usernames []string) ([]*authentication.UserAccount, error)
- func UserAccountUpdate(ctx context.Context, np sqlutils.NamedPreparer, ...) (*authentication.UserAccount, error)
- type DBConfig
- type Store
- func (s *Store) AddSystemIntakeSystem(ctx context.Context, input models.SystemIntakeSystem) (models.SystemIntakeSystem, error)
- func (s *Store) Beginx() (*sqlx.Tx, error)
- func (s *Store) CastSystemIntakeGRBReviewerVote(ctx context.Context, input models.CastSystemIntakeGRBReviewerVoteInput) (*models.SystemIntakeGRBReviewer, error)
- func (s *Store) CompareSystemIntakeGRBReviewers(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeGRBReviewerComparisonResponse, error)
- func (s *Store) CreateAction(ctx context.Context, action *models.Action) (*models.Action, error)
- func (s *Store) CreateBusinessCase(ctx context.Context, businessCase *models.BusinessCaseWithCosts) (*models.BusinessCaseWithCosts, error)
- func (s *Store) CreateCedarSystemBookmark(ctx context.Context, cedarSystemBookmark *models.CedarSystemBookmark) (*models.CedarSystemBookmark, error)
- func (s *Store) CreateGovernanceRequestFeedback(ctx context.Context, requestFeedback *models.GovernanceRequestFeedback) (*models.GovernanceRequestFeedback, error)
- func (s *Store) CreateSystemIntakeDocument(ctx context.Context, document *models.SystemIntakeDocument) (*models.SystemIntakeDocument, error)
- func (s *Store) CreateSystemIntakeGRBDiscussionPost(ctx context.Context, np sqlutils.NamedPreparer, ...) (*models.SystemIntakeGRBReviewDiscussionPost, error)
- func (s *Store) CreateSystemIntakeGRBReviewer(ctx context.Context, np sqlutils.NamedPreparer, ...) (*models.SystemIntakeGRBReviewer, error)
- func (s *Store) CreateSystemIntakeGRBReviewers(ctx context.Context, np sqlutils.NamedPreparer, ...) ([]*models.SystemIntakeGRBReviewer, error)
- func (s *Store) CreateSystemIntakeNote(ctx context.Context, note *models.SystemIntakeNote) (*models.SystemIntakeNote, error)
- func (s *Store) CreateTRBAdminNote(ctx context.Context, note *models.TRBAdminNote) (*models.TRBAdminNote, error)
- func (s *Store) CreateTRBAdminNoteTRBDocumentLinks(ctx context.Context, trbRequestID uuid.UUID, trbAdminNoteID uuid.UUID, ...) ([]*models.TRBAdminNoteTRBRequestDocumentLink, error)
- func (s *Store) CreateTRBAdminNoteTRBInsightLinks(ctx context.Context, trbRequestID uuid.UUID, trbAdminNoteID uuid.UUID, ...) ([]*models.TRBAdminNoteTRBGuidanceLetterInsightLink, error)
- func (s *Store) CreateTRBGuidanceLetter(ctx context.Context, createdBy string, trbRequestID uuid.UUID) (*models.TRBGuidanceLetter, error)
- func (s *Store) CreateTRBGuidanceLetterInsight(ctx context.Context, recommendation *models.TRBGuidanceLetterInsight) (*models.TRBGuidanceLetterInsight, error)
- func (s *Store) CreateTRBLeadOption(ctx context.Context, leadOption *models.TRBLeadOption) (*models.TRBLeadOption, error)
- func (s *Store) CreateTRBRequest(ctx context.Context, np sqlutils.NamedPreparer, trb *models.TRBRequest) (*models.TRBRequest, error)
- func (s *Store) CreateTRBRequestAttendee(ctx context.Context, np sqlutils.NamedPreparer, ...) (*models.TRBRequestAttendee, error)
- func (s *Store) CreateTRBRequestDocument(ctx context.Context, document *models.TRBRequestDocument) (*models.TRBRequestDocument, error)
- func (s *Store) CreateTRBRequestFeedback(ctx context.Context, feedback *models.TRBRequestFeedback, ...) (*models.TRBRequestFeedback, error)
- func (s *Store) CreateTRBRequestForm(ctx context.Context, np sqlutils.NamedPreparer, form *models.TRBRequestForm) (*models.TRBRequestForm, error)
- func (s *Store) CreateTRBRequestSystemIntakes(ctx context.Context, trbRequestID uuid.UUID, systemIntakeIDs []uuid.UUID) ([]*models.TRBRequestSystemIntake, error)
- func (s *Store) DeleteCedarSystemBookmark(ctx context.Context, cedarSystemBookmark *models.CedarSystemBookmark) (*models.CedarSystemBookmark, error)
- func (s *Store) DeleteSystemIntakeDocument(ctx context.Context, id uuid.UUID) (*models.SystemIntakeDocument, error)
- func (s *Store) DeleteSystemIntakeGRBPresentationLinks(ctx context.Context, systemIntakeID uuid.UUID) error
- func (s *Store) DeleteSystemIntakeGRBReviewer(ctx context.Context, tx *sqlx.Tx, reviewerID uuid.UUID) error
- func (s *Store) DeleteSystemIntakeSystemByID(ctx context.Context, systemIntakeSystemID uuid.UUID) (models.SystemIntakeSystem, error)
- func (s *Store) DeleteTRBGuidanceLetterInsight(ctx context.Context, id uuid.UUID, newOrder []uuid.UUID) (*models.TRBGuidanceLetterInsight, error)
- func (s *Store) DeleteTRBLeadOption(ctx context.Context, euaID string) (*models.TRBLeadOption, error)
- func (s *Store) DeleteTRBRequestAttendee(ctx context.Context, id uuid.UUID) (*models.TRBRequestAttendee, error)
- func (s *Store) DeleteTRBRequestDocument(ctx context.Context, id uuid.UUID) (*models.TRBRequestDocument, error)
- func (s *Store) DeleteTRBRequestForm(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestForm, error)
- func (s *Store) DeleteTRBRequestFundingSources(ctx context.Context, trbRequestID uuid.UUID, fundingNumber string) ([]*models.TRBFundingSource, error)
- func (s *Store) DeleteUserAccountDANGEROUS(username string) error
- func (s *Store) FetchBusinessCaseByID(ctx context.Context, businessCaseID uuid.UUID) (*models.BusinessCaseWithCosts, error)
- func (s *Store) FetchCedarSystemBookmarks(ctx context.Context) ([]*models.CedarSystemBookmark, error)
- func (s *Store) FetchCedarSystemIsBookmarkedByCedarSystemIDs(ctx context.Context, bookmarkRequests []models.BookmarkRequest) ([]bool, error)
- func (s *Store) FetchNotesBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeNote, error)
- func (s *Store) FetchNotesBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeNote, error)
- func (s *Store) FetchOpenBusinessCaseByIntakeID(ctx context.Context, intakeID uuid.UUID) (*models.BusinessCaseWithCosts, error)
- func (s *Store) FetchSystemIntakeByID(ctx context.Context, id uuid.UUID) (*models.SystemIntake, error)
- func (s *Store) FetchSystemIntakeFundingSourcesByIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeFundingSource, error)
- func (s *Store) FetchSystemIntakeFundingSourcesByIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeFundingSource, error)
- func (s *Store) FetchSystemIntakeNoteByID(ctx context.Context, id uuid.UUID) (*models.SystemIntakeNote, error)
- func (s *Store) FetchSystemIntakes(ctx context.Context) (models.SystemIntakes, error)
- func (s *Store) FetchSystemIntakesByStateForAdmins(ctx context.Context, state models.SystemIntakeState) ([]*models.SystemIntake, error)
- func (s *Store) FetchSystemIntakesWithReviewRequested(ctx context.Context, userID uuid.UUID) ([]*models.SystemIntake, error)
- func (s *Store) GenerateLifecycleID(ctx context.Context) (string, error)
- func (s *Store) GetActionsBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]models.Action, error)
- func (s *Store) GetActionsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]models.Action, error)
- func (s *Store) GetAttendeeByEUAIDAndTRBID(ctx context.Context, euaID string, trbRequestID uuid.UUID) (*models.TRBRequestAttendee, error)
- func (s *Store) GetAttendeesByEUAIDsAndTRBIDs(ctx context.Context, euaIDs []string, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestAttendee, error)
- func (s *Store) GetBusinessCaseBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) (*models.BusinessCase, error)
- func (s *Store) GetBusinessCaseBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.BusinessCase, error)
- func (s *Store) GetGovernanceRequestFeedbacksByIntakeID(ctx context.Context, intakeID uuid.UUID) ([]*models.GovernanceRequestFeedback, error)
- func (s *Store) GetGovernanceRequestFeedbacksByIntakeIDs(ctx context.Context, intakeIDs []uuid.UUID) ([]*models.GovernanceRequestFeedback, error)
- func (s *Store) GetLifecycleCostsByBizCaseID(ctx context.Context, businessCaseID uuid.UUID) ([]*models.EstimatedLifecycleCost, error)
- func (s *Store) GetLifecycleCostsByBizCaseIDs(ctx context.Context, businessCaseIDs []uuid.UUID) ([]*models.EstimatedLifecycleCost, error)
- func (s *Store) GetLinkedSystemByID(ctx context.Context, systemIntakeSystemID uuid.UUID) (*models.SystemIntakeSystem, error)
- func (s *Store) GetMySystemIntakes(ctx context.Context, userID uuid.UUID) ([]*models.SystemIntake, error)
- func (s *Store) GetMyTRBRequests(ctx context.Context, archived bool) ([]*models.TRBRequest, error)
- func (s *Store) GetNewestTRBRequestFeedbackByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestFeedback, error)
- func (s *Store) GetNewestTRBRequestFeedbackByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestFeedback, error)
- func (s *Store) GetRequesterUpdateEmailData(ctx context.Context) ([]*models.RequesterUpdateEmailData, error)
- func (s *Store) GetSystemIntakeByGRBReviewerID(ctx context.Context, reviewerID uuid.UUID) (*models.SystemIntake, error)
- func (s *Store) GetSystemIntakeDocumentByID(ctx context.Context, docID uuid.UUID) (*models.SystemIntakeDocument, error)
- func (s *Store) GetSystemIntakeDocumentByS3Key(ctx context.Context, s3Key string) (*models.SystemIntakeDocument, error)
- func (s *Store) GetSystemIntakeDocumentsByRequestID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeDocument, error)
- func (s *Store) GetSystemIntakeDocumentsByRequestIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeDocument, error)
- func (s *Store) GetSystemIntakeGRBDiscussionPostByID(ctx context.Context, np sqlutils.NamedPreparer, discussionID uuid.UUID) (*models.SystemIntakeGRBReviewDiscussionPost, error)
- func (s *Store) GetSystemIntakesWithLCIDs(ctx context.Context) ([]*models.SystemIntake, error)
- func (s *Store) GetTRBAdminNoteByID(ctx context.Context, id uuid.UUID) (*models.TRBAdminNote, error)
- func (s *Store) GetTRBAdminNotesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBAdminNote, error)
- func (s *Store) GetTRBAdminNotesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBAdminNote, error)
- func (s *Store) GetTRBFundingSourcesByRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBFundingSource, error)
- func (s *Store) GetTRBFundingSourcesByRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBFundingSource, error)
- func (s *Store) GetTRBGuidanceLetterByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBGuidanceLetter, error)
- func (s *Store) GetTRBGuidanceLetterInsightByID(ctx context.Context, id uuid.UUID) (*models.TRBGuidanceLetterInsight, error)
- func (s *Store) GetTRBGuidanceLetterInsightsByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
- func (s *Store) GetTRBGuidanceLetterInsightsByTRBRequestIDAndCategory(ctx context.Context, trbRequestID uuid.UUID, ...) ([]*models.TRBGuidanceLetterInsight, error)
- func (s *Store) GetTRBGuidanceLetterInsightsSharingTRBRequestID(ctx context.Context, insightID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
- func (s *Store) GetTRBGuidanceLettersByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBGuidanceLetter, error)
- func (s *Store) GetTRBInsightsByAdminNoteID(ctx context.Context, adminNoteID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
- func (s *Store) GetTRBLeadOptions(ctx context.Context) ([]*models.TRBLeadOption, error)
- func (s *Store) GetTRBRequestAttendeesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestAttendee, error)
- func (s *Store) GetTRBRequestAttendeesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestAttendee, error)
- func (s *Store) GetTRBRequestByID(ctx context.Context, id uuid.UUID) (*models.TRBRequest, error)
- func (s *Store) GetTRBRequestByIDNP(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.TRBRequest, error)
- func (s *Store) GetTRBRequestDocumentsByAdminNoteID(ctx context.Context, adminNoteID uuid.UUID) ([]*models.TRBRequestDocument, error)
- func (s *Store) GetTRBRequestDocumentsByRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestDocument, error)
- func (s *Store) GetTRBRequestDocumentsByRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestDocument, error)
- func (s *Store) GetTRBRequestFeedbackByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestFeedback, error)
- func (s *Store) GetTRBRequestFeedbackByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestFeedback, error)
- func (s *Store) GetTRBRequestFormByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestForm, error)
- func (s *Store) GetTRBRequestFormSystemIntakesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.SystemIntake, error)
- func (s *Store) GetTRBRequestFormSystemIntakesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
- func (s *Store) GetTRBRequestFormsByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestForm, error)
- func (s *Store) GetTRBRequests(ctx context.Context, archived bool) ([]*models.TRBRequest, error)
- func (s *Store) NamedExecContext(ctx context.Context, sqlStatement string, arguments any) (sql.Result, error)
- func (s *Store) PrepareNamed(query string) (*sqlx.NamedStmt, error)
- func (s *Store) RelatedSystemIntakesBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
- func (s *Store) RelatedSystemIntakesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
- func (s *Store) RelatedTRBRequestsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.RelatedTRBRequest, error)
- func (s *Store) RelatedTRBRequestsByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedTRBRequest, error)
- func (s *Store) SetSystemIntakeContractNumbers(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, ...) error
- func (s *Store) SetSystemIntakeGRBPresentationLinks(ctx context.Context, links *models.SystemIntakeGRBPresentationLinks) (*models.SystemIntakeGRBPresentationLinks, error)
- func (s *Store) SetSystemIntakeSystems(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, ...) error
- func (s *Store) SetTRBAdminNoteArchived(ctx context.Context, id uuid.UUID, isArchived bool, modifiedBy string) (*models.TRBAdminNote, error)
- func (s *Store) SetTRBRequestContractNumbers(ctx context.Context, tx *sqlx.Tx, trbRequestID uuid.UUID, ...) error
- func (s *Store) SetTRBRequestSystems(ctx context.Context, tx *sqlx.Tx, trbRequestID uuid.UUID, ...) error
- func (s *Store) SystemIntakeContractNumbersBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeContractNumber, error)
- func (s *Store) SystemIntakeGRBDiscussionPostsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeGRBReviewDiscussionPost, error)
- func (s *Store) SystemIntakeGRBPresentationLinksByIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeGRBPresentationLinks, error)
- func (s *Store) SystemIntakeGRBReviewersBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeGRBReviewer, error)
- func (s *Store) SystemIntakeGRBReviewersBySystemIntakeIDsNP(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeGRBReviewer, error)
- func (s *Store) SystemIntakeSystemsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeSystem, error)
- func (s *Store) SystemIntakesByCedarSystemIDs(ctx context.Context, requests []models.SystemIntakesByCedarSystemIDsRequest) ([]*models.SystemIntakesByCedarSystemIDsResponse, error)
- func (s *Store) TRBRequestContractNumbersByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestContractNumber, error)
- func (s *Store) TRBRequestSystemsByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestSystem, error)
- func (s *Store) TRBRequestsByCedarSystemIDs(ctx context.Context, requests []models.TRBRequestsByCedarSystemIDsRequest) ([]*models.TRBRequestsByCedarSystemIDsResponse, error)
- func (s *Store) TruncateAllTablesDANGEROUS(logger *zap.Logger) error
- func (s *Store) UpdateAdminLead(ctx context.Context, id uuid.UUID, adminLead string) (string, error)
- func (s *Store) UpdateBusinessCase(ctx context.Context, businessCase *models.BusinessCaseWithCosts) (*models.BusinessCaseWithCosts, error)
- func (s *Store) UpdateReviewDates(ctx context.Context, id uuid.UUID, grbDate *time.Time, grtDate *time.Time) (*models.SystemIntake, error)
- func (s *Store) UpdateSystemIntake(ctx context.Context, intake *models.SystemIntake) (*models.SystemIntake, error)
- func (s *Store) UpdateSystemIntakeFundingSources(ctx context.Context, systemIntakeID uuid.UUID, ...) ([]*models.SystemIntakeFundingSource, error)
- func (s *Store) UpdateSystemIntakeFundingSourcesNP(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, ...) ([]*models.SystemIntakeFundingSource, error)
- func (s *Store) UpdateSystemIntakeGRBReviewer(ctx context.Context, tx *sqlx.Tx, ...) (*models.SystemIntakeGRBReviewer, error)
- func (s *Store) UpdateSystemIntakeLinkedCedarSystem(ctx context.Context, id uuid.UUID, cedarSystemID *uuid.UUID) (*models.SystemIntake, error)
- func (s *Store) UpdateSystemIntakeNP(ctx context.Context, np sqlutils.NamedPreparer, intake *models.SystemIntake) (*models.SystemIntake, error)
- func (s *Store) UpdateSystemIntakeNote(ctx context.Context, note *models.SystemIntakeNote) (*models.SystemIntakeNote, error)
- func (s *Store) UpdateSystemIntakeSystemByID(ctx context.Context, input models.UpdateSystemLinkInput) (models.SystemIntakeSystem, error)
- func (s *Store) UpdateTRBGuidanceLetter(ctx context.Context, letter *models.TRBGuidanceLetter) (*models.TRBGuidanceLetter, error)
- func (s *Store) UpdateTRBGuidanceLetterInsight(ctx context.Context, insight *models.TRBGuidanceLetterInsight) (*models.TRBGuidanceLetterInsight, error)
- func (s *Store) UpdateTRBGuidanceLetterInsightOrder(ctx context.Context, update models.UpdateTRBGuidanceLetterInsightOrderInput) ([]*models.TRBGuidanceLetterInsight, error)
- func (s *Store) UpdateTRBGuidanceLetterStatus(ctx context.Context, id uuid.UUID, status models.TRBGuidanceLetterStatus) (*models.TRBGuidanceLetter, error)
- func (s *Store) UpdateTRBRequest(ctx context.Context, trbRequest *models.TRBRequest) (*models.TRBRequest, error)
- func (s *Store) UpdateTRBRequestAttendee(ctx context.Context, attendee *models.TRBRequestAttendee) (*models.TRBRequestAttendee, error)
- func (s *Store) UpdateTRBRequestForm(ctx context.Context, form *models.TRBRequestForm) (*models.TRBRequestForm, error)
- func (s *Store) UpdateTRBRequestFundingSources(ctx context.Context, trbRequestID uuid.UUID, fundingNumber string, ...) ([]*models.TRBFundingSource, error)
- func (s *Store) UpdateTRBRequestNP(ctx context.Context, np sqlutils.NamedPreparer, trb *models.TRBRequest) (*models.TRBRequest, error)
- func (s *Store) UserAccountGetByCommonName(commonName string) (*authentication.UserAccount, error)
- func (s *Store) UserAccountGetByID(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*authentication.UserAccount, error)
- func (s *Store) UserAccountsByIDs(ctx context.Context, userIDs []uuid.UUID) ([]*authentication.UserAccount, error)
- func (s *Store) UserAccountsByIDsNP(ctx context.Context, np sqlutils.NamedPreparer, userIDs []uuid.UUID) ([]*authentication.UserAccount, error)
Constants ¶
const EuaIDMsg = "" /* 177-byte string literal not displayed */
EuaIDMsg is the error we see when EUA doesn't meet EUA ID constraints
const IntakeExistsMsg = "" /* 208-byte string literal not displayed */
IntakeExistsMsg is the error we see when there is no valid system intake
const UniqueIntakeMsg = "pq: duplicate key value violates unique constraint \"unique_intake_per_biz_case\""
UniqueIntakeMsg is a match for an error we see when the system intake already has a biz case
const ValidStatusMsg = "pq: invalid input value for enum business_case_status: "
ValidStatusMsg is a match for an error we see when there is no valid status
Variables ¶
This section is empty.
Functions ¶
func CreateSystemIntake ¶
func CreateSystemIntake(ctx context.Context, np sqlutils.NamedPreparer, intake *models.SystemIntake) (*models.SystemIntake, error)
CreateSystemIntake creates a system intake, though without saving values for LCID-related fields
func CreateSystemIntakeContact ¶
func CreateSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeContact *models.SystemIntakeContact) (*models.SystemIntakeContact, error)
CreateSystemIntakeContact creates a new system intake contact object in the database
func DeleteSystemIntakeContact ¶
func DeleteSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.SystemIntakeContact, error)
DeleteSystemIntakeContact deletes an existing system intake contact object in the database
func FetchSystemIntakeByIDNP ¶
func FetchSystemIntakeByIDNP(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.SystemIntake, error)
FetchSystemIntakeByIDNP queries the DB for a system intake matching the given ID
The "NP" suffix stands for "NamedPreparer", as this function was written to avoid the need to update all of the existing code that uses FetchSystemIntakeByID to use a transactional wrapper.
func GetSystemIntakesWithGRBReviewCompleteQuorumMet ¶
func GetSystemIntakesWithGRBReviewCompleteQuorumMet(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
func GetSystemIntakesWithGRBReviewEnded ¶
func GetSystemIntakesWithGRBReviewEnded(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
func GetSystemIntakesWithGRBReviewHalfwayThrough ¶
func GetSystemIntakesWithGRBReviewHalfwayThrough(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
GetSystemIntakesWithGRBReviewHalfwayThrough retrieves all system intakes where the GRB review is halfway through
func GetSystemIntakesWithGRBReviewPastDueNoQuorum ¶
func GetSystemIntakesWithGRBReviewPastDueNoQuorum(ctx context.Context, np sqlutils.NamedPreparer, logger *zap.Logger) ([]*models.SystemIntake, error)
func SystemIntakeContactGetByIDsLoader ¶
func SystemIntakeContactGetByIDsLoader(ctx context.Context, np sqlutils.NamedPreparer, _ *zap.Logger, systemIntakeContactIDs []uuid.UUID) ([]*models.SystemIntakeContact, error)
SystemIntakeContactGetByIDsLoader returns system intake contacts by their IDs
func SystemIntakeContactGetBySystemIntakeIDsLoader ¶
func SystemIntakeContactGetBySystemIntakeIDsLoader(ctx context.Context, np sqlutils.NamedPreparer, _ *zap.Logger, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeContact, error)
SystemIntakeContactGetBySystemIntakeIDsLoader returns system intake contacts by their foreign key, the system intake ID
func UpdateSystemIntakeContact ¶
func UpdateSystemIntakeContact(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeContact *models.SystemIntakeContact) (*models.SystemIntakeContact, error)
UpdateSystemIntakeContact updates a system intake contact object in the database
func UpdateSystemIntakeGRBReviewType ¶
func UpdateSystemIntakeGRBReviewType( ctx context.Context, np sqlutils.NamedPreparer, systemIntakeID uuid.UUID, reviewType models.SystemIntakeGRBReviewType, ) (*models.UpdateSystemIntakePayload, error)
func UserAccountBulkCreate ¶
func UserAccountBulkCreate(ctx context.Context, np sqlutils.NamedPreparer, userAccounts []*authentication.UserAccount) ([]*authentication.UserAccount, error)
UserAccountBulkCreate creates new user accounts for given usernames
func UserAccountBulkUpdate ¶
func UserAccountBulkUpdate(ctx context.Context, np sqlutils.NamedPreparer, userAccounts []*authentication.UserAccount) ( []*authentication.UserAccount, error, )
UserAccountBulkUpdate updates existing user accounts
func UserAccountCreate ¶
func UserAccountCreate(ctx context.Context, np sqlutils.NamedPreparer, userAccount *authentication.UserAccount) (*authentication.UserAccount, error)
UserAccountCreate creates a new user account for a given username
func UserAccountGetByUsername ¶
func UserAccountGetByUsername(ctx context.Context, np sqlutils.NamedPreparer, username string) (*authentication.UserAccount, error)
UserAccountGetByUsername gets a user account by a give username
func UserAccountGetByUsernames ¶
func UserAccountGetByUsernames(ctx context.Context, np sqlutils.NamedPreparer, usernames []string) ([]*authentication.UserAccount, error)
UserAccountGetByUsernames gets a user account by a give username
func UserAccountUpdate ¶
func UserAccountUpdate(ctx context.Context, np sqlutils.NamedPreparer, userAccount *authentication.UserAccount) ( *authentication.UserAccount, error, )
UserAccountUpdate updates an existing user account
Types ¶
type DBConfig ¶
type DBConfig struct {
Host string
Port string
Database string
Username string
Password string
SSLMode string
UseIAM bool
MaxConnections int
}
DBConfig holds the configurations for a database connection
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store performs database operations for EASi
func NewStore ¶
NewStore creates a new Store struct The `db` property on the Store will always be a *sqlx.DB, but a notable difference in the DB is that if dbConfig.UseIAM is true, that DB instance will be backed by a custom connector in iam_db.go that generates IAM auth tokens when making new connections to the database. If dbConfig.UseIAM is false, it will connect using the "postgres" driver that SQLx registers in its init() function https://github.com/jmoiron/sqlx/blob/75a7ebf246fd757c9c7742da7dc4d26c6fdb6b5b/bind.go#L33-L40
func (*Store) AddSystemIntakeSystem ¶
func (s *Store) AddSystemIntakeSystem(ctx context.Context, input models.SystemIntakeSystem) (models.SystemIntakeSystem, error)
func (*Store) Beginx ¶
Beginx implements the TransactionPreparer interface Implementing the sqlutils.TransactionPreparer interfaces allows us to use a sqlx.DB or a storage.Store to create a transaction
func (*Store) CastSystemIntakeGRBReviewerVote ¶
func (s *Store) CastSystemIntakeGRBReviewerVote(ctx context.Context, input models.CastSystemIntakeGRBReviewerVoteInput) (*models.SystemIntakeGRBReviewer, error)
CastSystemIntakeGRBReviewerVote inserts or updates the vote selection for a GRB Reviewer requires the requesting user to be the GRB reviewer casting the vote (i.e., an admin cannot set another user's vote)
func (*Store) CompareSystemIntakeGRBReviewers ¶
func (*Store) CreateAction ¶
CreateAction creates an Action item in the database
func (*Store) CreateBusinessCase ¶
func (s *Store) CreateBusinessCase(ctx context.Context, businessCase *models.BusinessCaseWithCosts) (*models.BusinessCaseWithCosts, error)
CreateBusinessCase creates a Business Case
func (*Store) CreateCedarSystemBookmark ¶
func (s *Store) CreateCedarSystemBookmark(ctx context.Context, cedarSystemBookmark *models.CedarSystemBookmark) (*models.CedarSystemBookmark, error)
CreateCedarSystemBookmark creates a new cedar system bookmark object in the database
func (*Store) CreateGovernanceRequestFeedback ¶
func (s *Store) CreateGovernanceRequestFeedback(ctx context.Context, requestFeedback *models.GovernanceRequestFeedback) (*models.GovernanceRequestFeedback, error)
CreateGovernanceRequestFeedback creates a governance request feedback record in the database
func (*Store) CreateSystemIntakeDocument ¶
func (s *Store) CreateSystemIntakeDocument(ctx context.Context, document *models.SystemIntakeDocument) (*models.SystemIntakeDocument, error)
CreateSystemIntakeDocument creates a record for a SystemIntakeDocument in our database
func (*Store) CreateSystemIntakeGRBDiscussionPost ¶
func (s *Store) CreateSystemIntakeGRBDiscussionPost(ctx context.Context, np sqlutils.NamedPreparer, post *models.SystemIntakeGRBReviewDiscussionPost) (*models.SystemIntakeGRBReviewDiscussionPost, error)
func (*Store) CreateSystemIntakeGRBReviewer ¶
func (s *Store) CreateSystemIntakeGRBReviewer(ctx context.Context, np sqlutils.NamedPreparer, reviewer *models.SystemIntakeGRBReviewer) (*models.SystemIntakeGRBReviewer, error)
CreateSystemIntakeGRBReviewer creates a GRB Reviewer
func (*Store) CreateSystemIntakeGRBReviewers ¶
func (s *Store) CreateSystemIntakeGRBReviewers(ctx context.Context, np sqlutils.NamedPreparer, reviewers []*models.SystemIntakeGRBReviewer) ([]*models.SystemIntakeGRBReviewer, error)
CreateSystemIntakeGRBReviewers creates a GRB Reviewer
func (*Store) CreateSystemIntakeNote ¶
func (s *Store) CreateSystemIntakeNote(ctx context.Context, note *models.SystemIntakeNote) (*models.SystemIntakeNote, error)
CreateSystemIntakeNote inserts a new note into the database
func (*Store) CreateTRBAdminNote ¶
func (s *Store) CreateTRBAdminNote(ctx context.Context, note *models.TRBAdminNote) (*models.TRBAdminNote, error)
CreateTRBAdminNote creates a new TRB admin note record in the database
func (*Store) CreateTRBAdminNoteTRBDocumentLinks ¶
func (s *Store) CreateTRBAdminNoteTRBDocumentLinks( ctx context.Context, trbRequestID uuid.UUID, trbAdminNoteID uuid.UUID, trbRequestDocumentIDs []uuid.UUID, ) ([]*models.TRBAdminNoteTRBRequestDocumentLink, error)
CreateTRBAdminNoteTRBDocumentLinks creates multiple link records relating a single TRB admin note to all TRB documents it references
func (*Store) CreateTRBAdminNoteTRBInsightLinks ¶
func (s *Store) CreateTRBAdminNoteTRBInsightLinks( ctx context.Context, trbRequestID uuid.UUID, trbAdminNoteID uuid.UUID, trbGuidanceLetterInsightIDs []uuid.UUID, ) ([]*models.TRBAdminNoteTRBGuidanceLetterInsightLink, error)
CreateTRBAdminNoteTRBInsightLinks creates multiple link records relating a single TRB admin note to all TRB guidance letter insights it references
func (*Store) CreateTRBGuidanceLetter ¶
func (s *Store) CreateTRBGuidanceLetter(ctx context.Context, createdBy string, trbRequestID uuid.UUID) (*models.TRBGuidanceLetter, error)
CreateTRBGuidanceLetter creates a guidance letter for a TRB request, in the "In Progress" status
func (*Store) CreateTRBGuidanceLetterInsight ¶
func (s *Store) CreateTRBGuidanceLetterInsight( ctx context.Context, recommendation *models.TRBGuidanceLetterInsight, ) (*models.TRBGuidanceLetterInsight, error)
CreateTRBGuidanceLetterInsight creates a new TRB guidance letter insight record in the database. This insight will be positioned at the end of the guidance letter upon creation.
func (*Store) CreateTRBLeadOption ¶
func (s *Store) CreateTRBLeadOption(ctx context.Context, leadOption *models.TRBLeadOption) (*models.TRBLeadOption, error)
CreateTRBLeadOption creates a new TRB lead option record in the database
func (*Store) CreateTRBRequest ¶
func (s *Store) CreateTRBRequest(ctx context.Context, np sqlutils.NamedPreparer, trb *models.TRBRequest) (*models.TRBRequest, error)
CreateTRBRequest creates a new TRBRequest record Note this will be refactored to not use the store, but is left now for organization
func (*Store) CreateTRBRequestAttendee ¶
func (s *Store) CreateTRBRequestAttendee(ctx context.Context, np sqlutils.NamedPreparer, attendee *models.TRBRequestAttendee) (*models.TRBRequestAttendee, error)
CreateTRBRequestAttendee creates a new TRB request attendee record in the database Note this will be refactored to not use the store, but is left now for organization
func (*Store) CreateTRBRequestDocument ¶
func (s *Store) CreateTRBRequestDocument(ctx context.Context, document *models.TRBRequestDocument) (*models.TRBRequestDocument, error)
CreateTRBRequestDocument creates a record for a TRBRequestDocument in our database, *after* it's been uploaded to S3
func (*Store) CreateTRBRequestFeedback ¶
func (s *Store) CreateTRBRequestFeedback(ctx context.Context, feedback *models.TRBRequestFeedback, formToUpdate *models.TRBRequestForm) (*models.TRBRequestFeedback, error)
CreateTRBRequestFeedback creates a new TRB request feedback record in the database
func (*Store) CreateTRBRequestForm ¶
func (s *Store) CreateTRBRequestForm(ctx context.Context, np sqlutils.NamedPreparer, form *models.TRBRequestForm) (*models.TRBRequestForm, error)
CreateTRBRequestForm creates a new TRBRequestForm record Note this will be refactored to not use the store, but is left now for organization
func (*Store) CreateTRBRequestSystemIntakes ¶
func (s *Store) CreateTRBRequestSystemIntakes(ctx context.Context, trbRequestID uuid.UUID, systemIntakeIDs []uuid.UUID) ([]*models.TRBRequestSystemIntake, error)
CreateTRBRequestSystemIntakes deletes all TRB Intake relations for the given trbRequestID and recreates them
func (*Store) DeleteCedarSystemBookmark ¶
func (s *Store) DeleteCedarSystemBookmark(ctx context.Context, cedarSystemBookmark *models.CedarSystemBookmark) (*models.CedarSystemBookmark, error)
DeleteCedarSystemBookmark deletes an existing cedar system bookmark object in the database
func (*Store) DeleteSystemIntakeDocument ¶
func (s *Store) DeleteSystemIntakeDocument(ctx context.Context, id uuid.UUID) (*models.SystemIntakeDocument, error)
DeleteSystemIntakeDocument deletes an existing SystemIntakeDocument, given its ID
func (*Store) DeleteSystemIntakeGRBPresentationLinks ¶
func (*Store) DeleteSystemIntakeGRBReviewer ¶
func (*Store) DeleteSystemIntakeSystemByID ¶
func (*Store) DeleteTRBGuidanceLetterInsight ¶
func (s *Store) DeleteTRBGuidanceLetterInsight(ctx context.Context, id uuid.UUID, newOrder []uuid.UUID) (*models.TRBGuidanceLetterInsight, error)
DeleteTRBGuidanceLetterInsight deletes an existing TRB guidance letter insight record in the database
func (*Store) DeleteTRBLeadOption ¶
func (s *Store) DeleteTRBLeadOption(ctx context.Context, euaID string) (*models.TRBLeadOption, error)
DeleteTRBLeadOption deletes an existing TRB lead option record in the database
func (*Store) DeleteTRBRequestAttendee ¶
func (s *Store) DeleteTRBRequestAttendee(ctx context.Context, id uuid.UUID) (*models.TRBRequestAttendee, error)
DeleteTRBRequestAttendee deletes an existing TRB request attendee record in the database
func (*Store) DeleteTRBRequestDocument ¶
func (s *Store) DeleteTRBRequestDocument(ctx context.Context, id uuid.UUID) (*models.TRBRequestDocument, error)
DeleteTRBRequestDocument sets the deleted_at property on an existing TRBRequestDocument, given its ID
func (*Store) DeleteTRBRequestForm ¶
func (s *Store) DeleteTRBRequestForm(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestForm, error)
DeleteTRBRequestForm deletes an existing TRB request form record in the database
func (*Store) DeleteTRBRequestFundingSources ¶
func (s *Store) DeleteTRBRequestFundingSources( ctx context.Context, trbRequestID uuid.UUID, fundingNumber string, ) ([]*models.TRBFundingSource, error)
DeleteTRBRequestFundingSources deletes all funding sources from a TRB Request Form by funding number
func (*Store) DeleteUserAccountDANGEROUS ¶
DeleteUserAccountDANGEROUS deletes a given user account from the DB only to be used in test code as we do not truncate `user_account` table
func (*Store) FetchBusinessCaseByID ¶
func (s *Store) FetchBusinessCaseByID(ctx context.Context, businessCaseID uuid.UUID) (*models.BusinessCaseWithCosts, error)
FetchBusinessCaseByID queries the DB for a Business Case matching the given ID This is legacy code used in REST endpoints
func (*Store) FetchCedarSystemBookmarks ¶
func (s *Store) FetchCedarSystemBookmarks(ctx context.Context) ([]*models.CedarSystemBookmark, error)
FetchCedarSystemBookmarks queries the DB for all the cedar system bookmarks matching the given user's EUA ID
func (*Store) FetchCedarSystemIsBookmarkedByCedarSystemIDs ¶
func (s *Store) FetchCedarSystemIsBookmarkedByCedarSystemIDs(ctx context.Context, bookmarkRequests []models.BookmarkRequest) ([]bool, error)
FetchCedarSystemIsBookmarkedByCedarSystemIDs returns a slice of `bool` for each incoming BookmarkRequest. This method differs from other Store methods used by dataloaders as it IS responsible for ordering the output. Once this function exits, we lose all context of what came back from the DB, so we order in here before returning to the caller
func (*Store) FetchNotesBySystemIntakeID ¶
func (s *Store) FetchNotesBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeNote, error)
FetchNotesBySystemIntakeID retrieves all (non archived/deleted) Notes associated with a specific SystemIntake
func (*Store) FetchNotesBySystemIntakeIDs ¶
func (s *Store) FetchNotesBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeNote, error)
FetchNotesBySystemIntakeIDs retrieves all (non archived/deleted) Notes associated with a list of intake IDs
func (*Store) FetchOpenBusinessCaseByIntakeID ¶
func (s *Store) FetchOpenBusinessCaseByIntakeID(ctx context.Context, intakeID uuid.UUID) (*models.BusinessCaseWithCosts, error)
FetchOpenBusinessCaseByIntakeID queries the DB for an open Business Case matching the given intake ID This is legacy code used in REST endpoints
func (*Store) FetchSystemIntakeByID ¶
func (s *Store) FetchSystemIntakeByID(ctx context.Context, id uuid.UUID) (*models.SystemIntake, error)
FetchSystemIntakeByID serves as a wrapper for FetchSystemIntakeByIDNP, which is the actual implementation for fetching System Intakes by ID.
This method only exists to provide a transactional wrapper around the actual implementation, as a vast majority of the codebase was written before the introduction of transactions in the storage layer. This method should eventually be removed in favor of using FetchSystemIntakeByIDNP directly (and that function renamed).
func (*Store) FetchSystemIntakeFundingSourcesByIntakeID ¶
func (s *Store) FetchSystemIntakeFundingSourcesByIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeFundingSource, error)
FetchSystemIntakeFundingSourcesByIntakeID fetches all funding sources for a system intake
func (*Store) FetchSystemIntakeFundingSourcesByIntakeIDs ¶
func (s *Store) FetchSystemIntakeFundingSourcesByIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeFundingSource, error)
FetchSystemIntakeFundingSourcesByIntakeIDs fetches all funding sources for a slice of system intake IDs
func (*Store) FetchSystemIntakeNoteByID ¶
func (s *Store) FetchSystemIntakeNoteByID(ctx context.Context, id uuid.UUID) (*models.SystemIntakeNote, error)
FetchSystemIntakeNoteByID retrieves a single Note by its primary key identifier
func (*Store) FetchSystemIntakes ¶
FetchSystemIntakes queries the DB for all system intakes
func (*Store) FetchSystemIntakesByStateForAdmins ¶
func (s *Store) FetchSystemIntakesByStateForAdmins(ctx context.Context, state models.SystemIntakeState) ([]*models.SystemIntake, error)
FetchSystemIntakesByStateForAdmins queries the DB for all system intakes with a matching state The intent of this query is to return all intakes that are in a state that is relevant to admins (i.e. not in a draft state, not archived)
func (*Store) FetchSystemIntakesWithReviewRequested ¶
func (s *Store) FetchSystemIntakesWithReviewRequested(ctx context.Context, userID uuid.UUID) ([]*models.SystemIntake, error)
FetchSystemIntakesWithReviewRequested queries the DB for all open system intakes where user is requested
func (*Store) GenerateLifecycleID ¶
GenerateLifecycleID returns what the next LCID is expected to be for the current date
The expected format is a 6-digit number in the form of "YYdddP" where YY - the 2-digit YEAR ddd - the 3-digit ORDINAL DATE, e.g. the number of days elapsed in the given year P - the 1-digit count of how many LCIDs already generated for the given day This routine assumes the LCIDs are being generated in Eastern Time Zone (FYI - the "YYddd" construct is referred to as the "Julian Day" in mainframe programmer circles, though this term seems to be a misappropriation of what astronomers use to mean a count of days since 24 Nov in the year 4714 BC.)
func (*Store) GetActionsBySystemIntakeID ¶
func (s *Store) GetActionsBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) ([]models.Action, error)
GetActionsBySystemIntakeID fetches actions for a particular intake
func (*Store) GetActionsBySystemIntakeIDs ¶
func (s *Store) GetActionsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]models.Action, error)
GetActionsBySystemIntakeIDs fetches actions for a multiple intakes
func (*Store) GetAttendeeByEUAIDAndTRBID ¶
func (s *Store) GetAttendeeByEUAIDAndTRBID(ctx context.Context, euaID string, trbRequestID uuid.UUID) (*models.TRBRequestAttendee, error)
GetAttendeeByEUAIDAndTRBID attempts to retrieve an attendee of a given EUA user ID and TRB Request ID
func (*Store) GetAttendeesByEUAIDsAndTRBIDs ¶
func (s *Store) GetAttendeesByEUAIDsAndTRBIDs(ctx context.Context, euaIDs []string, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestAttendee, error)
GetAttendeesByEUAIDsAndTRBIDs attempts to retrieve a list of attendees given EUA user IDs and TRB Request IDs
func (*Store) GetBusinessCaseBySystemIntakeID ¶
func (s *Store) GetBusinessCaseBySystemIntakeID(ctx context.Context, systemIntakeID uuid.UUID) (*models.BusinessCase, error)
GetBusinessCaseBySystemIntakeID queries the DB for a Business Case matching the given ID of the System Intake
func (*Store) GetBusinessCaseBySystemIntakeIDs ¶
func (s *Store) GetBusinessCaseBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.BusinessCase, error)
GetBusinessCaseBySystemIntakeIDs queries the DB for a Business Case matching the given ID of the System Intake
func (*Store) GetGovernanceRequestFeedbacksByIntakeID ¶
func (s *Store) GetGovernanceRequestFeedbacksByIntakeID(ctx context.Context, intakeID uuid.UUID) ([]*models.GovernanceRequestFeedback, error)
GetGovernanceRequestFeedbacksByIntakeID returns all governance request feedback items for a given system intake
func (*Store) GetGovernanceRequestFeedbacksByIntakeIDs ¶
func (s *Store) GetGovernanceRequestFeedbacksByIntakeIDs(ctx context.Context, intakeIDs []uuid.UUID) ([]*models.GovernanceRequestFeedback, error)
GetGovernanceRequestFeedbacksByIntakeIDs returns all governance request feedback items for a list of intake IDs
func (*Store) GetLifecycleCostsByBizCaseID ¶
func (s *Store) GetLifecycleCostsByBizCaseID(ctx context.Context, businessCaseID uuid.UUID) ([]*models.EstimatedLifecycleCost, error)
GetLifecycleCostsByBizCaseID queries the DB for a lifecycle costs by biz case ID
func (*Store) GetLifecycleCostsByBizCaseIDs ¶
func (s *Store) GetLifecycleCostsByBizCaseIDs(ctx context.Context, businessCaseIDs []uuid.UUID) ([]*models.EstimatedLifecycleCost, error)
GetLifecycleCostsByBizCaseIDs queries the DB for a lifecycle costs by biz case ID
func (*Store) GetLinkedSystemByID ¶
func (*Store) GetMySystemIntakes ¶
func (*Store) GetMyTRBRequests ¶
GetMyTRBRequests returns the collection of TRB requests that belong to the user in the context
func (*Store) GetNewestTRBRequestFeedbackByTRBRequestID ¶
func (s *Store) GetNewestTRBRequestFeedbackByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestFeedback, error)
GetNewestTRBRequestFeedbackByTRBRequestID queries the DB the newest TRB request feedback record matching the given TRB request ID
func (*Store) GetNewestTRBRequestFeedbackByTRBRequestIDs ¶
func (s *Store) GetNewestTRBRequestFeedbackByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestFeedback, error)
GetNewestTRBRequestFeedbackByTRBRequestIDs queries the DB the newest TRB request feedback records matching the given TRB request IDs
func (*Store) GetRequesterUpdateEmailData ¶
func (*Store) GetSystemIntakeByGRBReviewerID ¶
func (s *Store) GetSystemIntakeByGRBReviewerID( ctx context.Context, reviewerID uuid.UUID, ) (*models.SystemIntake, error)
GetSystemIntakeByGRBReviewerID retrieves the system intake where the user is a GRB reviewer specified by the reviewer row ID
func (*Store) GetSystemIntakeDocumentByID ¶
func (*Store) GetSystemIntakeDocumentByS3Key ¶
func (*Store) GetSystemIntakeDocumentsByRequestID ¶
func (s *Store) GetSystemIntakeDocumentsByRequestID(ctx context.Context, systemIntakeID uuid.UUID) ([]*models.SystemIntakeDocument, error)
GetSystemIntakeDocumentsByRequestID queries the DB for all documents attached to the system intake with the given ID
func (*Store) GetSystemIntakeDocumentsByRequestIDs ¶
func (s *Store) GetSystemIntakeDocumentsByRequestIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeDocument, error)
GetSystemIntakeDocumentsByRequestIDs queries the DB for all documents attached to system intakes with the given IDs
func (*Store) GetSystemIntakeGRBDiscussionPostByID ¶
func (s *Store) GetSystemIntakeGRBDiscussionPostByID( ctx context.Context, np sqlutils.NamedPreparer, discussionID uuid.UUID, ) (*models.SystemIntakeGRBReviewDiscussionPost, error)
func (*Store) GetSystemIntakesWithLCIDs ¶
GetSystemIntakesWithLCIDs retrieves all LCIDs that are in use
func (*Store) GetTRBAdminNoteByID ¶
func (s *Store) GetTRBAdminNoteByID(ctx context.Context, id uuid.UUID) (*models.TRBAdminNote, error)
GetTRBAdminNoteByID retrieves a single admin note by its ID
func (*Store) GetTRBAdminNotesByTRBRequestID ¶
func (s *Store) GetTRBAdminNotesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBAdminNote, error)
GetTRBAdminNotesByTRBRequestID returns all notes for a given TRB request
func (*Store) GetTRBAdminNotesByTRBRequestIDs ¶
func (s *Store) GetTRBAdminNotesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBAdminNote, error)
GetTRBAdminNotesByTRBRequestIDs returns all notes for a given TRB request
func (*Store) GetTRBFundingSourcesByRequestID ¶
func (s *Store) GetTRBFundingSourcesByRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBFundingSource, error)
GetTRBFundingSourcesByRequestID queries the DB for all the TRB request form funding sources matching the given TRB request ID
func (*Store) GetTRBFundingSourcesByRequestIDs ¶
func (s *Store) GetTRBFundingSourcesByRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBFundingSource, error)
GetTRBFundingSourcesByRequestIDs queries the DB for all the TRB request form funding sources matching the given TRB request IDs
func (*Store) GetTRBGuidanceLetterByTRBRequestID ¶
func (s *Store) GetTRBGuidanceLetterByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBGuidanceLetter, error)
GetTRBGuidanceLetterByTRBRequestID fetches a TRB guidance letter record by its associated request's ID
func (*Store) GetTRBGuidanceLetterInsightByID ¶
func (s *Store) GetTRBGuidanceLetterInsightByID(ctx context.Context, id uuid.UUID) (*models.TRBGuidanceLetterInsight, error)
GetTRBGuidanceLetterInsightByID retrieves a TRB guidance letter insight record from the database It will not return any entities that have a deleted_at value
func (*Store) GetTRBGuidanceLetterInsightsByTRBRequestID ¶
func (s *Store) GetTRBGuidanceLetterInsightsByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
GetTRBGuidanceLetterInsightsByTRBRequestID queries the DB for all the TRB guidance letter insights, filtering by the given TRB request ID and ordered in the user-specified positions
func (*Store) GetTRBGuidanceLetterInsightsByTRBRequestIDAndCategory ¶
func (s *Store) GetTRBGuidanceLetterInsightsByTRBRequestIDAndCategory(ctx context.Context, trbRequestID uuid.UUID, category models.TRBGuidanceLetterInsightCategory) ([]*models.TRBGuidanceLetterInsight, error)
GetTRBGuidanceLetterInsightsByTRBRequestIDAndCategory queries the DB for all the TRB guidance letter insights, filtering by the given TRB request ID and ordered in the user-specified positions
func (*Store) GetTRBGuidanceLetterInsightsSharingTRBRequestID ¶
func (s *Store) GetTRBGuidanceLetterInsightsSharingTRBRequestID(ctx context.Context, insightID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
GetTRBGuidanceLetterInsightsSharingTRBRequestID queries the DB for all TRB guidance letter insights with the same TRB request ID as the given recommendation It will not return any entities that have a deleted_at value
func (*Store) GetTRBGuidanceLettersByTRBRequestIDs ¶
func (s *Store) GetTRBGuidanceLettersByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBGuidanceLetter, error)
GetTRBGuidanceLettersByTRBRequestIDs fetches a TRB guidance letter records by associated request IDs
func (*Store) GetTRBInsightsByAdminNoteID ¶
func (s *Store) GetTRBInsightsByAdminNoteID(ctx context.Context, adminNoteID uuid.UUID) ([]*models.TRBGuidanceLetterInsight, error)
GetTRBInsightsByAdminNoteID fetches all TRB guidance letter documents linked to a TRB admin note This function specifically fetches all insights (even deleted ones), as this function is called by the resolver for TRB Admin Notes, which need to display previously deleted insight titles
func (*Store) GetTRBLeadOptions ¶
GetTRBLeadOptions retrieves all TRB lead option records from the database
func (*Store) GetTRBRequestAttendeesByTRBRequestID ¶
func (s *Store) GetTRBRequestAttendeesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestAttendee, error)
GetTRBRequestAttendeesByTRBRequestID queries the DB for all the TRB request attendee records matching the given TRB request ID
func (*Store) GetTRBRequestAttendeesByTRBRequestIDs ¶
func (s *Store) GetTRBRequestAttendeesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestAttendee, error)
GetTRBRequestAttendeesByTRBRequestIDs queries the DB for all the TRB request attendee records matching the given TRB request IDs
func (*Store) GetTRBRequestByID ¶
GetTRBRequestByID takes in a NamedPreparer (db, tx) and returns an TRBRequest from the db for a given id
func (*Store) GetTRBRequestByIDNP ¶
func (s *Store) GetTRBRequestByIDNP(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*models.TRBRequest, error)
GetTRBRequestByIDNP returns an TRBRequest from the db for a given id
func (*Store) GetTRBRequestDocumentsByAdminNoteID ¶
func (s *Store) GetTRBRequestDocumentsByAdminNoteID(ctx context.Context, adminNoteID uuid.UUID) ([]*models.TRBRequestDocument, error)
GetTRBRequestDocumentsByAdminNoteID fetches all TRB request documents linked to a TRB admin note This function specifically fetches all documents (even deleted ones), as this function is called by the resolver for TRB Admin Notes, which need to display previously deleted document names
func (*Store) GetTRBRequestDocumentsByRequestID ¶
func (s *Store) GetTRBRequestDocumentsByRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestDocument, error)
GetTRBRequestDocumentsByRequestID queries the DB for all documents attached to the TRB request with the given ID It will NOT return any items that have been soft-deleted (deleted_at NOT NULL)
func (*Store) GetTRBRequestDocumentsByRequestIDs ¶
func (s *Store) GetTRBRequestDocumentsByRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestDocument, error)
GetTRBRequestDocumentsByRequestIDs queries the DB for all documents attached to a list of TRB requests It will NOT return any items that have been soft-deleted (deleted_at NOT NULL)
func (*Store) GetTRBRequestFeedbackByTRBRequestID ¶
func (s *Store) GetTRBRequestFeedbackByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.TRBRequestFeedback, error)
GetTRBRequestFeedbackByTRBRequestID queries the DB for all the TRB request feedback records matching the given TRB request ID
func (*Store) GetTRBRequestFeedbackByTRBRequestIDs ¶
func (s *Store) GetTRBRequestFeedbackByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestFeedback, error)
GetTRBRequestFeedbackByTRBRequestIDs queries the DB for all the TRB request feedback records matching the given TRB request IDs
func (*Store) GetTRBRequestFormByTRBRequestID ¶
func (s *Store) GetTRBRequestFormByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) (*models.TRBRequestForm, error)
GetTRBRequestFormByTRBRequestID queries the DB for the TRB request form record matching the given TRB request ID
func (*Store) GetTRBRequestFormSystemIntakesByTRBRequestID ¶
func (s *Store) GetTRBRequestFormSystemIntakesByTRBRequestID(ctx context.Context, trbRequestID uuid.UUID) ([]*models.SystemIntake, error)
GetTRBRequestFormSystemIntakesByTRBRequestID retrieves all system intakes that have been related to a given TRB request ID
func (*Store) GetTRBRequestFormSystemIntakesByTRBRequestIDs ¶
func (s *Store) GetTRBRequestFormSystemIntakesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
GetTRBRequestFormSystemIntakesByTRBRequestIDs retrieves all system intakes that have been related to a list of TRB request IDs
func (*Store) GetTRBRequestFormsByTRBRequestIDs ¶
func (s *Store) GetTRBRequestFormsByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.TRBRequestForm, error)
GetTRBRequestFormsByTRBRequestIDs queries the DB for TRB request form records matching the given TRB request IDs
func (*Store) GetTRBRequests ¶
GetTRBRequests returns the collection of TRB requests
func (*Store) NamedExecContext ¶
func (s *Store) NamedExecContext(ctx context.Context, sqlStatement string, arguments any) (sql.Result, error)
NamedExecContext implements the NamedPreparer interface
func (*Store) PrepareNamed ¶
PrepareNamed implements the NamedPreparer interface Implementing the sqlutils.NamedPreparer interface allows us to use a sqlx.Tx or a storage.Store as a parameter in our DB calls (the former for when we want to implement transactions, the latter for when we don't)
func (*Store) RelatedSystemIntakesBySystemIntakeIDs ¶
func (s *Store) RelatedSystemIntakesBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
RelatedSystemIntakesBySystemIntakeIDs retrieves related system intakes by system intake ID
func (*Store) RelatedSystemIntakesByTRBRequestIDs ¶
func (s *Store) RelatedSystemIntakesByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedSystemIntake, error)
RelatedSystemIntakesByTRBRequestIDs retrieves related system intakes by TRB Request ID
func (*Store) RelatedTRBRequestsBySystemIntakeIDs ¶
func (s *Store) RelatedTRBRequestsBySystemIntakeIDs(ctx context.Context, systemIntakeIDs []uuid.UUID) ([]*models.RelatedTRBRequest, error)
RelatedTRBRequestsBySystemIntakeIDs retrieves related TRB Requests by system intake ID
func (*Store) RelatedTRBRequestsByTRBRequestIDs ¶
func (s *Store) RelatedTRBRequestsByTRBRequestIDs(ctx context.Context, trbRequestIDs []uuid.UUID) ([]*models.RelatedTRBRequest, error)
RelatedTRBRequestsByTRBRequestIDs retrieves related TRB Requests by TRB Request ID
func (*Store) SetSystemIntakeContractNumbers ¶
func (s *Store) SetSystemIntakeContractNumbers(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, contractNumbers []string) error
SetSystemIntakeContractNumbers links given Contract Numbers to given System Intake ID This function opts to take a *sqlx.Tx instead of a NamedPreparer because the SQL calls inside this function are heavily intertwined, and we never want to call them outside the scope of a transaction
func (*Store) SetSystemIntakeGRBPresentationLinks ¶
func (s *Store) SetSystemIntakeGRBPresentationLinks(ctx context.Context, links *models.SystemIntakeGRBPresentationLinks) (*models.SystemIntakeGRBPresentationLinks, error)
func (*Store) SetSystemIntakeSystems ¶
func (s *Store) SetSystemIntakeSystems(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, systemRelationships []*models.SystemRelationshipInput) error
SetSystemIntakeSystems links given System IDs to given System Intake ID This function opts to take a *sqlx.Tx instead of a NamedPreparer because the SQL calls inside this function are heavily intertwined, and we never want to call them outside the scope of a transaction
func (*Store) SetTRBAdminNoteArchived ¶
func (s *Store) SetTRBAdminNoteArchived(ctx context.Context, id uuid.UUID, isArchived bool, modifiedBy string) (*models.TRBAdminNote, error)
SetTRBAdminNoteArchived sets whether a TRB admin note is archived (soft-deleted) It takes a modifiedBy argument because it doesn't take a full TRBAdminNote as an argument, and ModifiedBy fields are usually set by the resolver.
func (*Store) SetTRBRequestContractNumbers ¶
func (s *Store) SetTRBRequestContractNumbers(ctx context.Context, tx *sqlx.Tx, trbRequestID uuid.UUID, contractNumbers []string) error
SetTRBRequestContractNumbers links given Contract Numbers to given TRB Request ID This function opts to take a *sqlx.Tx instead of a NamedPreparer because the SQL calls inside this function are heavily intertwined, and we never want to call them outside the scope of a transaction
func (*Store) SetTRBRequestSystems ¶
func (s *Store) SetTRBRequestSystems(ctx context.Context, tx *sqlx.Tx, trbRequestID uuid.UUID, systemIDs []uuid.UUID) error
SetTRBRequestSystems links given System IDs to given TRB Request ID This function opts to take a *sqlx.Tx instead of a NamedPreparer because the SQL calls inside this function are heavily intertwined, and we never want to call them outside the scope of a transaction
func (*Store) SystemIntakeContractNumbersBySystemIntakeIDs ¶
func (*Store) SystemIntakeGRBDiscussionPostsBySystemIntakeIDs ¶
func (*Store) SystemIntakeGRBPresentationLinksByIntakeIDs ¶
func (*Store) SystemIntakeGRBReviewersBySystemIntakeIDs ¶
func (*Store) SystemIntakeGRBReviewersBySystemIntakeIDsNP ¶
func (s *Store) SystemIntakeGRBReviewersBySystemIntakeIDsNP(ctx context.Context, np sqlutils.NamedPreparer, systemIntakeIDs []uuid.UUID) ([]*models.SystemIntakeGRBReviewer, error)
func (*Store) SystemIntakeSystemsBySystemIntakeIDs ¶
func (*Store) SystemIntakesByCedarSystemIDs ¶
func (s *Store) SystemIntakesByCedarSystemIDs(ctx context.Context, requests []models.SystemIntakesByCedarSystemIDsRequest) ([]*models.SystemIntakesByCedarSystemIDsResponse, error)
func (*Store) TRBRequestContractNumbersByTRBRequestIDs ¶
func (*Store) TRBRequestSystemsByTRBRequestIDs ¶
func (*Store) TRBRequestsByCedarSystemIDs ¶
func (s *Store) TRBRequestsByCedarSystemIDs(ctx context.Context, requests []models.TRBRequestsByCedarSystemIDsRequest) ([]*models.TRBRequestsByCedarSystemIDsResponse, error)
func (*Store) TruncateAllTablesDANGEROUS ¶
TruncateAllTablesDANGEROUS is a function to reset all tables in the DB. It should only be called within test code. this list of tables should match the list of tables in scripts/dev's db:clean task
NOTE: we DO NOT truncate the `user_account` table - it would remove the default users, which is behavior we do not want
func (*Store) UpdateAdminLead ¶
func (s *Store) UpdateAdminLead(ctx context.Context, id uuid.UUID, adminLead string) (string, error)
UpdateAdminLead updates the admin lead for an intake
func (*Store) UpdateBusinessCase ¶
func (s *Store) UpdateBusinessCase(ctx context.Context, businessCase *models.BusinessCaseWithCosts) (*models.BusinessCaseWithCosts, error)
UpdateBusinessCase creates a Business Case
func (*Store) UpdateReviewDates ¶
func (s *Store) UpdateReviewDates(ctx context.Context, id uuid.UUID, grbDate *time.Time, grtDate *time.Time) (*models.SystemIntake, error)
UpdateReviewDates updates the admin lead for an intake
func (*Store) UpdateSystemIntake ¶
func (s *Store) UpdateSystemIntake(ctx context.Context, intake *models.SystemIntake) (*models.SystemIntake, error)
UpdateSystemIntake serves as a wrapper for UpdateSystemIntakeNP, which is the actual implementation for updating System Intakes.
This method only exists to provide a transactional wrapper around the actual implementation, as a vast majority of the codebase was written before the introduction of transactions in the storage layer. This method should eventually be removed in favor of using UpdateSystemIntakeNP directly (and that function renamed).
func (*Store) UpdateSystemIntakeFundingSources ¶
func (s *Store) UpdateSystemIntakeFundingSources(ctx context.Context, systemIntakeID uuid.UUID, fundingSources []*models.SystemIntakeFundingSource) ([]*models.SystemIntakeFundingSource, error)
UpdateSystemIntakeFundingSources clears and updates the funding sources of a system intake using an automatically created transaction
func (*Store) UpdateSystemIntakeFundingSourcesNP ¶
func (s *Store) UpdateSystemIntakeFundingSourcesNP(ctx context.Context, tx *sqlx.Tx, systemIntakeID uuid.UUID, fundingSources []*models.SystemIntakeFundingSource) ([]*models.SystemIntakeFundingSource, error)
UpdateSystemIntakeFundingSourcesNP clears and updates the funding sources of a system intake
func (*Store) UpdateSystemIntakeGRBReviewer ¶
func (s *Store) UpdateSystemIntakeGRBReviewer(ctx context.Context, tx *sqlx.Tx, input *models.UpdateSystemIntakeGRBReviewerInput) (*models.SystemIntakeGRBReviewer, error)
func (*Store) UpdateSystemIntakeLinkedCedarSystem ¶
func (s *Store) UpdateSystemIntakeLinkedCedarSystem(ctx context.Context, id uuid.UUID, cedarSystemID *uuid.UUID) (*models.SystemIntake, error)
UpdateSystemIntakeLinkedCedarSystem updates the CEDAR system ID that is linked to a system intake
func (*Store) UpdateSystemIntakeNP ¶
func (s *Store) UpdateSystemIntakeNP(ctx context.Context, np sqlutils.NamedPreparer, intake *models.SystemIntake) (*models.SystemIntake, error)
UpdateSystemIntakeNP does an upsert for a system intake The caller is responsible for setting intake.UpdatedAt if they want to update that field
The "NP" suffix stands for "NamedPreparer", as this function was written to avoid the need to update all of the existing code that uses UpdateSystemIntake to use a transactional wrapper.
func (*Store) UpdateSystemIntakeNote ¶
func (s *Store) UpdateSystemIntakeNote(ctx context.Context, note *models.SystemIntakeNote) (*models.SystemIntakeNote, error)
UpdateSystemIntakeNote updates all of a IT governance admin note's mutable fields. The note's IsArchived field _can_ be set, though SetNoteArchived() should be used when archiving a note.
func (*Store) UpdateSystemIntakeSystemByID ¶
func (s *Store) UpdateSystemIntakeSystemByID(ctx context.Context, input models.UpdateSystemLinkInput) (models.SystemIntakeSystem, error)
func (*Store) UpdateTRBGuidanceLetter ¶
func (s *Store) UpdateTRBGuidanceLetter(ctx context.Context, letter *models.TRBGuidanceLetter) (*models.TRBGuidanceLetter, error)
UpdateTRBGuidanceLetter updates all of a TRB guidance letter's mutable fields. The letter's status _can_ be set, though UpdateTRBGuidanceLetterStatus() should be used when setting a letter ready for review or sending a letter.
func (*Store) UpdateTRBGuidanceLetterInsight ¶
func (s *Store) UpdateTRBGuidanceLetterInsight(ctx context.Context, insight *models.TRBGuidanceLetterInsight) (*models.TRBGuidanceLetterInsight, error)
UpdateTRBGuidanceLetterInsight updates an existing TRB guidance letter insight record in the database This purposely does not update the position_in_letter column unless the `category` changes - to update the order through normal reordering operation, use UpdateTRBGuidanceLetterInsightOrder()
func (*Store) UpdateTRBGuidanceLetterInsightOrder ¶
func (s *Store) UpdateTRBGuidanceLetterInsightOrder( ctx context.Context, update models.UpdateTRBGuidanceLetterInsightOrderInput, ) ([]*models.TRBGuidanceLetterInsight, error)
UpdateTRBGuidanceLetterInsightOrder updates the ordering of insights for a given guidance letter, using the order of the insight IDs passed in as newOrder. No other insight columns/fields are updated.
func (*Store) UpdateTRBGuidanceLetterStatus ¶
func (s *Store) UpdateTRBGuidanceLetterStatus(ctx context.Context, id uuid.UUID, status models.TRBGuidanceLetterStatus) (*models.TRBGuidanceLetter, error)
UpdateTRBGuidanceLetterStatus sets the status of a TRB guidance letter, for setting the letter as ready to review or sending the letter. When it sends the letter, it also updates the DateSent field.
func (*Store) UpdateTRBRequest ¶
func (s *Store) UpdateTRBRequest(ctx context.Context, trbRequest *models.TRBRequest) (*models.TRBRequest, error)
UpdateTRBRequest returns an TRBRequest from the db for a given id
func (*Store) UpdateTRBRequestAttendee ¶
func (s *Store) UpdateTRBRequestAttendee(ctx context.Context, attendee *models.TRBRequestAttendee) (*models.TRBRequestAttendee, error)
UpdateTRBRequestAttendee updates a TRB request attendee record in the database
func (*Store) UpdateTRBRequestForm ¶
func (s *Store) UpdateTRBRequestForm(ctx context.Context, form *models.TRBRequestForm) (*models.TRBRequestForm, error)
UpdateTRBRequestForm updates a TRB request form record in the database
func (*Store) UpdateTRBRequestFundingSources ¶
func (s *Store) UpdateTRBRequestFundingSources( ctx context.Context, trbRequestID uuid.UUID, fundingNumber string, fundingSources []*models.TRBFundingSource, ) ([]*models.TRBFundingSource, error)
UpdateTRBRequestFundingSources upserts a list of funding sources to a TRB Request Form by funding number
func (*Store) UpdateTRBRequestNP ¶
func (s *Store) UpdateTRBRequestNP(ctx context.Context, np sqlutils.NamedPreparer, trb *models.TRBRequest) (*models.TRBRequest, error)
UpdateTRBRequestNP takes in a NamedPreparer (db, tx) and returns an TRBRequest from the db for a given id
func (*Store) UserAccountGetByCommonName ¶
func (s *Store) UserAccountGetByCommonName(commonName string) (*authentication.UserAccount, error)
UserAccountGetByCommonName gets a user account by a give username
func (*Store) UserAccountGetByID ¶
func (s *Store) UserAccountGetByID(ctx context.Context, np sqlutils.NamedPreparer, id uuid.UUID) (*authentication.UserAccount, error)
UserAccountGetByID gets a User account from the database by its internal id.
func (*Store) UserAccountsByIDs ¶
func (s *Store) UserAccountsByIDs(ctx context.Context, userIDs []uuid.UUID) ([]*authentication.UserAccount, error)
UserAccountsByIDs gets user accounts by user ID
func (*Store) UserAccountsByIDsNP ¶
func (s *Store) UserAccountsByIDsNP(ctx context.Context, np sqlutils.NamedPreparer, userIDs []uuid.UUID) ([]*authentication.UserAccount, error)
Source Files
¶
- action.go
- business_case.go
- cedar_system_bookmark.go
- governance_request_feedback.go
- iam_db.go
- related_requests.go
- store.go
- system_intake.go
- system_intake_contact.go
- system_intake_contract_number.go
- system_intake_document.go
- system_intake_funding_source.go
- system_intake_grb_discussions.go
- system_intake_grb_presentation_links.go
- system_intake_grb_reviewer.go
- system_intake_note.go
- system_intake_system.go
- trb_admin_note.go
- trb_admin_note_trb_insight_link.go
- trb_admin_note_trb_request_document_link.go
- trb_guidance_letter.go
- trb_guidance_letter_insight.go
- trb_lead_option.go
- trb_request.go
- trb_request_attendee.go
- trb_request_contract_number.go
- trb_request_document.go
- trb_request_feedback.go
- trb_request_form.go
- trb_request_funding_source.go
- trb_request_system.go
- trb_request_system_intake.go
- truncate.go
- user_account_store.go