donor

package
v0.1361.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: MIT Imports: 26 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")
	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")
	PathChooseYourCertificateProvider                        = Path("/choose-your-certificate-provider")
	PathConfirmPersonAllowedToVouch                          = Path("/confirm-person-allowed-to-vouch")
	PathConfirmYourCertificateProviderIsNotRelated           = Path("/confirm-your-certificate-provider-is-not-related")
	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")
	PathHowToConfirmYourIdentityAndSign                      = Path("/how-to-confirm-your-identity-and-sign")
	PathHowToSendEvidence                                    = Path("/how-to-send-evidence")
	PathHowWouldCertificateProviderPreferToCarryOutTheirRole = Path("/how-would-certificate-provider-prefer-to-carry-out-their-role")
	PathHowWouldYouLikeToSendEvidence                        = Path("/how-would-you-like-to-send-evidence")
	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")
	PathOneLoginIdentityDetails                              = Path("/one-login-identity-details")
	PathPaymentConfirmation                                  = Path("/payment-confirmation")
	PathPreviousApplicationNumber                            = Path("/previous-application-number")
	PathPreviousFee                                          = Path("/how-much-did-you-previously-pay-for-your-lpa")
	PathProgress                                             = Path("/progress")
	PathProveYourIdentity                                    = Path("/prove-your-identity")
	PathReadYourLpa                                          = Path("/read-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")
	PathWeHaveContactedVoucher                               = Path("/we-have-contacted-voucher")
	PathWeHaveReceivedVoucherDetails                         = Path("/we-have-received-voucher-details")
	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")
	PathWhatIsVouching                                       = Path("/what-is-vouching")
	PathWhatYouCanDoNow                                      = Path("/what-you-can-do-now")
	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")
	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

func NewStore

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

Types

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
	SendPreviousApplicationLinked(context.Context, event.PreviousApplicationLinked) 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 {
	SendActorEmail(context context.Context, to, lpaUID string, email notify.Email) error
	SendActorSMS(context context.Context, to, lpaUID string, sms notify.SMS) error
}

type Path

type Path string

func (Path) Format

func (p Path) Format(id string) 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
}

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, 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