Documentation
¶
Index ¶
- func GenerateNewLCID(ctx context.Context, store *storage.Store, possibleNewLCID *string) (string, error)
- func GetChangeLCIDRetirementDateAction(intake models.SystemIntake, newRetirementDate time.Time, ...) models.Action
- func GetConfirmLCIDAction(intake models.SystemIntake, expirationDate time.Time, nextSteps models.HTML, ...) models.Action
- func GetExpireLCIDAction(intake models.SystemIntake, newExpirationDate time.Time, ...) models.Action
- func GetRetireLCIDAction(intake models.SystemIntake, newRetirementDate time.Time, ...) models.Action
- func GetUnretireLCIDAction(intake models.SystemIntake, userInfo models.UserInfo) models.Action
- func GetUpdateLCIDAction(intake models.SystemIntake, expirationDate *time.Time, nextSteps *models.HTML, ...) models.Action
- func IsIntakeValidToExpireLCID(intake *models.SystemIntake, currentTime time.Time) error
- func IsIntakeValidToIssueLCID(intake *models.SystemIntake) error
- func IsLCIDValidToChangeRetirementDate(intake *models.SystemIntake) error
- func IsLCIDValidToConfirm(intake *models.SystemIntake) error
- func IsLCIDValidToRetire(intake *models.SystemIntake) error
- func IsLCIDValidToUpdate(intake *models.SystemIntake) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNewLCID ¶
func GenerateNewLCID(ctx context.Context, store *storage.Store, possibleNewLCID *string) (string, error)
GenerateNewLCID takes a possibly-nil candidate for a new LCID and either returns it or generates a new LCID if necessary.
Generating a new LCID requires two external checks:
- A database call to check how many LCIDs have already been generated on the current day
- Using store.clock.Now(), which is called within store.GenerateLifecycleID(), to check the current time
func GetChangeLCIDRetirementDateAction ¶
func GetChangeLCIDRetirementDateAction( intake models.SystemIntake, newRetirementDate time.Time, userInfo models.UserInfo, ) models.Action
GetChangeLCIDRetirementDateAction is a method to create an action record with all the relevant data fields for a Change LCID Retirement Date action.
func GetConfirmLCIDAction ¶
func GetConfirmLCIDAction( intake models.SystemIntake, expirationDate time.Time, nextSteps models.HTML, scope models.HTML, costBaseline *string, userInfo models.UserInfo, ) models.Action
GetConfirmLCIDAction is a method to set all the relevant data fields for that are a result of an Update LCID action.
func GetExpireLCIDAction ¶
func GetExpireLCIDAction( intake models.SystemIntake, newExpirationDate time.Time, newNextSteps *models.HTML, userInfo models.UserInfo, ) models.Action
GetExpireLCIDAction is a method to create an action record with all the relevant data fields for an Expire LCID action.
func GetRetireLCIDAction ¶
func GetRetireLCIDAction( intake models.SystemIntake, newRetirementDate time.Time, userInfo models.UserInfo, ) models.Action
GetRetireLCIDAction is a method to create an action record with all the relevant data fields for a Retire LCID action.
func GetUnretireLCIDAction ¶
GetUnretireLCIDAction is a method to create an action record with all the relevant data fields for an Unretire LCID action.
func GetUpdateLCIDAction ¶
func GetUpdateLCIDAction( intake models.SystemIntake, expirationDate *time.Time, nextSteps *models.HTML, scope *models.HTML, costBaseline *string, userInfo models.UserInfo, ) models.Action
GetUpdateLCIDAction is a method to set all the relevant data fields for that are a result of an Update LCID action.
func IsIntakeValidToExpireLCID ¶
func IsIntakeValidToExpireLCID(intake *models.SystemIntake, currentTime time.Time) error
IsIntakeValidToExpireLCID checks if an intake is valid to have its LCID manually expired
func IsIntakeValidToIssueLCID ¶
func IsIntakeValidToIssueLCID(intake *models.SystemIntake) error
IsIntakeValidToIssueLCID checks if an intake is valid to have an LCID issued for it
func IsLCIDValidToChangeRetirementDate ¶
func IsLCIDValidToChangeRetirementDate(intake *models.SystemIntake) error
IsLCIDValidToChangeRetirementDate checks if an intake is valid to have its retirement date changed just need to check intake; whether the new retirement date is in the past or the future doesn't matter, both are valid
func IsLCIDValidToConfirm ¶
func IsLCIDValidToConfirm(intake *models.SystemIntake) error
IsLCIDValidToConfirm checks if you can confirm the LCID for an intake, if not, it will return an error An LCID must have already been issued in order to be confirmable
func IsLCIDValidToRetire ¶
func IsLCIDValidToRetire(intake *models.SystemIntake) error
IsLCIDValidToRetire checks if an intake is valid to have a retirement date issued for its LCID just need to check intake; whether the retirement date is in the past or the future doesn't matter, both are valid
func IsLCIDValidToUpdate ¶
func IsLCIDValidToUpdate(intake *models.SystemIntake) error
IsLCIDValidToUpdate checks if you can update the LCID for an intake, if not, it will return an error An LCID must have already been issued in order to be updateable
Types ¶
This section is empty.