donor

package
v0.1580.0-MLPAB2540tra... Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PathAboutPayment                                         = Path("/about-payment")
	PathAddCorrespondent                                     = Path("/add-correspondent")
	PathAreYouApplyingForFeeDiscountOrExemption              = Path("/are-you-applying-for-fee-discount-or-exemption")
	PathAreYouSureYouNoLongerNeedVoucher                     = Path("/are-you-sure-you-no-longer-need-voucher")
	PathBecauseYouHaveChosenJointly                          = Path("/because-you-have-chosen-jointly")
	PathBecauseYouHaveChosenJointlyForSomeSeverallyForOthers = Path("/because-you-have-chosen-jointly-for-some-severally-for-others")
	PathCanYouSignYourLpa                                    = Path("/can-you-sign-your-lpa")
	PathCertificateProviderAddress                           = Path("/certificate-provider-address")
	PathCertificateProviderDetails                           = Path("/certificate-provider-details")
	PathCertificateProviderOptOut                            = Path("/certificate-provider-opt-out")
	PathChangeCertificateProviderMobileNumber                = Path("/change-certificate-provider-mobile-number")
	PathChangeIndependentWitnessMobileNumber                 = Path("/change-independent-witness-mobile-number")
	PathCheckYouCanSign                                      = Path("/check-you-can-sign")
	PathCheckYourDetails                                     = Path("/check-your-details")
	PathCheckYourLpa                                         = Path("/check-your-lpa")
	PathChooseAttorneys                                      = Path("/choose-attorneys")
	PathChooseAttorneysAddress                               = Path("/choose-attorneys-address")
	PathChooseAttorneysGuidance                              = Path("/choose-attorneys-guidance")
	PathChooseAttorneysSummary                               = Path("/choose-attorneys-summary")
	PathChooseNewCertificateProvider                         = Path("/choose-new-certificate-provider")
	PathChoosePeopleToNotify                                 = Path("/choose-people-to-notify")
	PathChoosePeopleToNotifyAddress                          = Path("/choose-people-to-notify-address")
	PathChoosePeopleToNotifySummary                          = Path("/choose-people-to-notify-summary")
	PathChooseReplacementAttorneys                           = Path("/choose-replacement-attorneys")
	PathChooseReplacementAttorneysAddress                    = Path("/choose-replacement-attorneys-address")
	PathChooseReplacementAttorneysSummary                    = Path("/choose-replacement-attorneys-summary")
	PathChooseSomeoneToVouchForYou                           = Path("/choose-someone-to-vouch-for-you")
	PathChooseYourCertificateProvider                        = Path("/choose-your-certificate-provider")
	PathCompletingYourIdentityConfirmation                   = Path("/completing-your-identity-confirmation")
	PathConfirmPersonAllowedToVouch                          = Path("/confirm-person-allowed-to-vouch")
	PathConfirmYourCertificateProviderIsNotRelated           = Path("/confirm-your-certificate-provider-is-not-related")
	PathConfirmYourIdentity                                  = Path("/confirm-your-identity")
	PathCostOfRepeatApplication                              = Path("/cost-of-repeat-application")
	PathDeleteThisLpa                                        = Path("/delete-this-lpa")
	PathDoYouWantReplacementAttorneys                        = Path("/do-you-want-replacement-attorneys")
	PathDoYouWantToNotifyPeople                              = Path("/do-you-want-to-notify-people")
	PathEnterCorrespondentAddress                            = Path("/enter-correspondent-address")
	PathEnterCorrespondentDetails                            = Path("/enter-correspondent-details")
	PathEnterReplacementTrustCorporation                     = Path("/enter-replacement-trust-corporation")
	PathEnterReplacementTrustCorporationAddress              = Path("/enter-replacement-trust-corporation-address")
	PathEnterTrustCorporation                                = Path("/enter-trust-corporation")
	PathEnterTrustCorporationAddress                         = Path("/enter-trust-corporation-address")
	PathEnterVoucher                                         = Path("/enter-voucher")
	PathEvidenceRequired                                     = Path("/evidence-required")
	PathEvidenceSuccessfullyUploaded                         = Path("/evidence-successfully-uploaded")
	PathFeeApproved                                          = Path("/fee-approved")
	PathFeeDenied                                            = Path("/fee-denied")
	PathGettingHelpSigning                                   = Path("/getting-help-signing")
	PathHowDoYouKnowYourCertificateProvider                  = Path("/how-do-you-know-your-certificate-provider")
	PathHowLongHaveYouKnownCertificateProvider               = Path("/how-long-have-you-known-certificate-provider")
	PathHowShouldAttorneysMakeDecisions                      = Path("/how-should-attorneys-make-decisions")
	PathHowShouldReplacementAttorneysMakeDecisions           = Path("/how-should-replacement-attorneys-make-decisions")
	PathHowShouldReplacementAttorneysStepIn                  = Path("/how-should-replacement-attorneys-step-in")
	PathHowToSendEvidence                                    = Path("/how-to-send-evidence")
	PathHowToSignYourLpa                                     = Path("/how-to-sign-your-lpa")
	PathHowWillYouConfirmYourIdentity                        = Path("/how-will-you-confirm-your-identity")
	PathHowWouldCertificateProviderPreferToCarryOutTheirRole = Path("/how-would-certificate-provider-prefer-to-carry-out-their-role")
	PathHowWouldYouLikeToSendEvidence                        = Path("/how-would-you-like-to-send-evidence")
	PathIdentityDetails                                      = Path("/identity-details")
	PathIdentityWithOneLogin                                 = Path("/id/one-login")
	PathIdentityWithOneLoginCallback                         = Path("/id/one-login/callback")
	PathLifeSustainingTreatment                              = Path("/life-sustaining-treatment")
	PathLpaDetailsSaved                                      = Path("/lpa-details-saved")
	PathLpaType                                              = Path("/lpa-type")
	PathLpaYourLegalRightsAndResponsibilities                = Path("/your-legal-rights-and-responsibilities")
	PathMakeANewLPA                                          = Path("/make-a-new-lpa")
	PathNeedHelpSigningConfirmation                          = Path("/need-help-signing-confirmation")
	PathPaymentConfirmation                                  = Path("/payment-confirmation")
	PathPaymentSuccessful                                    = Path("/payment-successful")
	PathPreviousApplicationNumber                            = Path("/previous-application-number")
	PathPreviousFee                                          = Path("/how-much-did-you-previously-pay-for-your-lpa")
	PathProgress                                             = Path("/progress")
	PathReadYourLpa                                          = Path("/read-your-lpa")
	PathReceivingUpdatesAboutYourLpa                         = Path("/receiving-updates-about-your-lpa")
	PathRegisterWithCourtOfProtection                        = Path("/register-with-court-of-protection")
	PathRemoveAttorney                                       = Path("/remove-attorney")
	PathRemovePersonToNotify                                 = Path("/remove-person-to-notify")
	PathRemoveReplacementAttorney                            = Path("/remove-replacement-attorney")
	PathRemoveReplacementTrustCorporation                    = Path("/remove-replacement-trust-corporation")
	PathRemoveTrustCorporation                               = Path("/remove-trust-corporation")
	PathResendCertificateProviderCode                        = Path("/resend-certificate-provider-code")
	PathResendIndependentWitnessCode                         = Path("/resend-independent-witness-code")
	PathRestrictions                                         = Path("/restrictions")
	PathSendUsYourEvidenceByPost                             = Path("/send-us-your-evidence-by-post")
	PathSignTheLpaOnBehalf                                   = Path("/sign-the-lpa-on-behalf")
	PathSignYourLpa                                          = Path("/sign-your-lpa")
	PathTaskList                                             = Path("/task-list")
	PathUnableToConfirmIdentity                              = Path("/unable-to-confirm-identity")
	PathUploadEvidence                                       = Path("/upload-evidence")
	PathUploadEvidenceSSE                                    = Path("/upload-evidence-sse")
	PathUseExistingAddress                                   = Path("/use-existing-address")
	PathViewLPA                                              = Path("/view-lpa")
	PathWeHaveContactedVoucher                               = Path("/we-have-contacted-voucher")
	PathWeHaveInformedVoucherNoLongerNeeded                  = Path("/we-have-informed-voucher-no-longer-needed")
	PathWeHaveUpdatedYourDetails                             = Path("/we-have-updated-your-details")
	PathWhatACertificateProviderDoes                         = Path("/what-a-certificate-provider-does")
	PathWhatHappensNextPostEvidence                          = Path("/what-happens-next-post-evidence")
	PathWhatHappensNextRegisteringWithCourtOfProtection      = Path("/what-happens-next-registering-with-court-of-protection")
	PathWhatHappensNextRepeatApplicationNoFee                = Path("/what-happens-next-repeat-application-no-fee")
	PathWhatYouCanDoNow                                      = Path("/what-you-can-do-now")
	PathWhatYouCanDoNowExpired                               = Path("/what-you-can-do-now-expired")
	PathWhenCanTheLpaBeUsed                                  = Path("/when-can-the-lpa-be-used")
	PathWhichFeeTypeAreYouApplyingFor                        = Path("/which-fee-type-are-you-applying-for")
	PathWithdrawThisLpa                                      = Path("/withdraw-this-lpa")
	PathWitnessingAsCertificateProvider                      = Path("/witnessing-as-certificate-provider")
	PathWitnessingAsIndependentWitness                       = Path("/witnessing-as-independent-witness")
	PathWitnessingYourSignature                              = Path("/witnessing-your-signature")
	PathYouCannotSignYourLpaYet                              = Path("/you-cannot-sign-your-lpa-yet")
	PathYouHaveSubmittedYourLpa                              = Path("/you-have-submitted-your-lpa")
	PathYourAddress                                          = Path("/your-address")
	PathYourAuthorisedSignatory                              = Path("/your-authorised-signatory")
	PathYourDateOfBirth                                      = Path("/your-date-of-birth")
	PathYourDetails                                          = Path("/your-details")
	PathYourEmail                                            = Path("/your-email")
	PathYourIndependentWitness                               = Path("/your-independent-witness")
	PathYourIndependentWitnessAddress                        = Path("/your-independent-witness-address")
	PathYourIndependentWitnessMobile                         = Path("/your-independent-witness-mobile")
	PathYourLegalRightsAndResponsibilitiesIfYouMakeLpa       = Path("/your-legal-rights-and-responsibilities-if-you-make-an-lpa")
	PathYourLpaLanguage                                      = Path("/your-lpa-language")
	PathYourMobile                                           = Path("/your-mobile")
	PathYourName                                             = Path("/your-name")
	PathYourPreferredLanguage                                = Path("/your-preferred-language")
)

Variables

View Source
var (
	UseTestWitnessCode            = false
	ErrTooManyWitnessCodeRequests = errors.New("too many witness code requests")
)

Functions

func CanGoTo

func CanGoTo(donor *donordata.Provided, url string) bool

Types

type CertificateProviderStore added in v0.1483.0

type CertificateProviderStore interface {
	GetAny(context.Context) (*certificateproviderdata.Provided, error)
}

type DonorStore added in v0.1360.0

type DonorStore interface {
	Create(context.Context) (*donordata.Provided, error)
	Put(context.Context, *donordata.Provided) error
}

type DynamoClient

type DynamoClient interface {
	One(ctx context.Context, pk dynamo.PK, sk dynamo.SK, v interface{}) error
	OneByPK(ctx context.Context, pk dynamo.PK, v interface{}) error
	OneByPartialSK(ctx context.Context, pk dynamo.PK, partialSK dynamo.SK, v interface{}) error
	AllByPartialSK(ctx context.Context, pk dynamo.PK, partialSK dynamo.SK, v interface{}) error
	LatestForActor(ctx context.Context, sk dynamo.SK, v interface{}) error
	AllBySK(ctx context.Context, sk dynamo.SK, v interface{}) error
	AllByKeys(ctx context.Context, keys []dynamo.Keys) ([]map[string]dynamodbtypes.AttributeValue, error)
	AllKeysByPK(ctx context.Context, pk dynamo.PK) ([]dynamo.Keys, error)
	Put(ctx context.Context, v interface{}) error
	Create(ctx context.Context, v interface{}) error
	DeleteKeys(ctx context.Context, keys []dynamo.Keys) error
	DeleteOne(ctx context.Context, pk dynamo.PK, sk dynamo.SK) error
	Update(ctx context.Context, pk dynamo.PK, sk dynamo.SK, values map[string]dynamodbtypes.AttributeValue, expression string) error
	BatchPut(ctx context.Context, items []interface{}) error
	OneBySK(ctx context.Context, sk dynamo.SK, v interface{}) error
	OneByUID(ctx context.Context, uid string, v interface{}) error
	WriteTransaction(ctx context.Context, transaction *dynamo.Transaction) error
}

type EventClient

type EventClient interface {
	SendUidRequested(context.Context, event.UidRequested) error
	SendApplicationDeleted(context.Context, event.ApplicationDeleted) error
	SendApplicationUpdated(context.Context, event.ApplicationUpdated) error
	SendReducedFeeRequested(context.Context, event.ReducedFeeRequested) error
}

type Localizer added in v0.1360.0

type Localizer interface {
	Concat(list []string, joiner string) string
	Count(messageID string, count int) string
	Format(messageID string, data map[string]interface{}) string
	FormatCount(messageID string, count int, data map[string]any) string
	FormatDate(t date.TimeOrDate) string
	FormatTime(t time.Time) string
	FormatDateTime(t time.Time) string
	Possessive(s string) string
	SetShowTranslationKeys(s bool)
	ShowTranslationKeys() bool
	T(messageID string) string
}

type Logger

type Logger interface {
	InfoContext(ctx context.Context, msg string, args ...any)
	WarnContext(ctx context.Context, msg string, args ...any)
	ErrorContext(ctx context.Context, msg string, args ...any)
}

type NotifyClient added in v0.1360.0

type NotifyClient interface {
	SendActorSMS(context context.Context, to notify.ToMobile, lpaUID string, sms notify.SMS) error
}

type Path

type Path string

func (Path) Format

func (p Path) Format(id string) string

func (Path) FormatQuery added in v0.1513.0

func (p Path) FormatQuery(id string, query url.Values) string

func (Path) Redirect

func (p Path) Redirect(w http.ResponseWriter, r *http.Request, appData appcontext.Data, donor *donordata.Provided) error

func (Path) RedirectQuery

func (p Path) RedirectQuery(w http.ResponseWriter, r *http.Request, appData appcontext.Data, donor *donordata.Provided, query url.Values) error

func (Path) String

func (p Path) String() string

type SearchClient

type SearchClient interface {
	Index(ctx context.Context, lpa search.Lpa) error
	Delete(ctx context.Context, lpa search.Lpa) error
}

type Store added in v0.1362.0

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

func NewStore

func NewStore(dynamoClient DynamoClient, eventClient EventClient, logger Logger, searchClient SearchClient) *Store

func (*Store) Create added in v0.1362.0

func (s *Store) Create(ctx context.Context) (*donordata.Provided, error)

func (*Store) Delete added in v0.1362.0

func (s *Store) Delete(ctx context.Context) error

func (*Store) DeleteDonorAccess added in v0.1362.0

func (s *Store) DeleteDonorAccess(ctx context.Context, shareCodeData sharecodedata.Link) error

func (*Store) DeleteVoucher added in v0.1513.0

func (s *Store) DeleteVoucher(ctx context.Context, provided *donordata.Provided) error

func (*Store) FailVoucher added in v0.1546.0

func (s *Store) FailVoucher(ctx context.Context, provided *donordata.Provided, voucherKey dynamo.VoucherKeyType) error

func (*Store) Get added in v0.1362.0

func (s *Store) Get(ctx context.Context) (*donordata.Provided, error)

func (*Store) GetAny added in v0.1362.0

func (s *Store) GetAny(ctx context.Context) (*donordata.Provided, error)

func (*Store) GetByKeys added in v0.1362.0

func (s *Store) GetByKeys(ctx context.Context, keys []dynamo.Keys) ([]donordata.Provided, error)

func (*Store) Latest added in v0.1362.0

func (s *Store) Latest(ctx context.Context) (*donordata.Provided, error)
func (s *Store) Link(ctx context.Context, shareCode sharecodedata.Link, donorEmail string) error

Link allows a donor to access an Lpa created by a supporter. It adds the donor's email to the share code and creates two records:

  1. an lpaReference which allows the donor's session ID to be queried for the organisation ID that holds the Lpa data;
  2. an lpaLink which allows the Lpa to be shown on the donor's dashboard.

func (*Store) One added in v0.1393.0

func (*Store) Put added in v0.1362.0

func (s *Store) Put(ctx context.Context, donor *donordata.Provided) error

type UidClient

type UidClient interface {
	CreateCase(context.Context, *uid.CreateCaseRequestBody) (uid.CreateCaseResponse, error)
}

type WitnessCodeSender added in v0.1360.0

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

func NewWitnessCodeSender added in v0.1360.0

func NewWitnessCodeSender(donorStore DonorStore, certificateProviderStore CertificateProviderStore, notifyClient NotifyClient, localizer Localizer) *WitnessCodeSender

func (*WitnessCodeSender) SendToCertificateProvider added in v0.1360.0

func (s *WitnessCodeSender) SendToCertificateProvider(ctx context.Context, donor *donordata.Provided) error

func (*WitnessCodeSender) SendToIndependentWitness added in v0.1360.0

func (s *WitnessCodeSender) SendToIndependentWitness(ctx context.Context, donor *donordata.Provided) error

Directories

Path Synopsis
Package donordata provides types that describe the data entered by a donor.
Package donordata provides types that describe the data entered by a donor.
Package donorpage provides the pages that a donor interacts with.
Package donorpage provides the pages that a donor interacts with.

Jump to

Keyboard shortcuts

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