Documentation ¶
Index ¶
- Constants
- Variables
- func NewMTOServiceItemCreator(builder createMTOServiceItemQueryBuilder, moveRouter services.MoveRouter) services.MTOServiceItemCreator
- func NewMTOServiceItemUpdater(builder mtoServiceItemQueryBuilder, moveRouter services.MoveRouter) services.MTOServiceItemUpdater
- func ValidateUpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItemData *updateMTOServiceItemData, ...) (*models.MTOServiceItem, error)
Constants ¶
const UpdateMTOServiceItemBasicValidator string = "UpdateMTOServiceItemBasicValidator"
UpdateMTOServiceItemBasicValidator is the key for generic validation on the MTO Service Item
const UpdateMTOServiceItemPrimeValidator string = "UpdateMTOServiceItemPrimeValidator"
UpdateMTOServiceItemPrimeValidator is the key for validating the MTO Service Item for the Prime contractor
Variables ¶
var UpdateMTOServiceItemValidators = map[string]updateMTOServiceItemValidator{ UpdateMTOServiceItemBasicValidator: new(basicUpdateMTOServiceItemValidator), UpdateMTOServiceItemPrimeValidator: new(primeUpdateMTOServiceItemValidator), }
UpdateMTOServiceItemValidators is the map connecting the constant keys to the correct validator
Functions ¶
func NewMTOServiceItemCreator ¶
func NewMTOServiceItemCreator(builder createMTOServiceItemQueryBuilder, moveRouter services.MoveRouter) services.MTOServiceItemCreator
NewMTOServiceItemCreator returns a new MTO service item creator
func NewMTOServiceItemUpdater ¶
func NewMTOServiceItemUpdater(builder mtoServiceItemQueryBuilder, moveRouter services.MoveRouter) services.MTOServiceItemUpdater
NewMTOServiceItemUpdater returns a new mto service item updater
func ValidateUpdateMTOServiceItem ¶
func ValidateUpdateMTOServiceItem(appCtx appcontext.AppContext, serviceItemData *updateMTOServiceItemData, validatorKey string) (*models.MTOServiceItem, error)
ValidateUpdateMTOServiceItem checks the provided serviceItemData struct against the validator indicated by validatorKey. Defaults to base validation if the empty string is entered as the key. Returns an MTOServiceItem that has been set up for update.
Types ¶
This section is empty.