lcidactions

package
v0.0.0-...-c341a93 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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:

  1. A database call to check how many LCIDs have already been generated on the current day
  2. 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

func GetUnretireLCIDAction(
	intake models.SystemIntake,
	userInfo models.UserInfo,
) models.Action

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.

Jump to

Keyboard shortcuts

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