Documentation ¶
Overview ¶
Package page contains the core code and business logic of Make and Register a Lasting Power of Attorney (MRLPA)
Useful links:
- page.Lpa - details about the LPA being drafted
- actor.Donor - details about the donor, provided by the applicant
- actor.CertificateProvider - details about the certificate provider, provided by the applicant
- actor.CertificateProviderProvidedDetails - details about the certificate provider, provided by the certificate provider
- actor.Attorney - details about an attorney or replacement attorney, provided by the applicant
- actor.AttorneyDecisions - details about how an attorney or replacement attorney should act, provided by the applicant
- actor.AttorneyProvidedDetails - details about an attorney or replacement attorney, provided by the attorney or replacement attorney
- actor.PersonToNotify - details about a person to notify, provided by the applicant
Code generated by "enumerator -type ApplicationReason -linecomment -empty"; DO NOT EDIT.
Code generated by "enumerator -type CanBeUsedWhen -linecomment -trimprefix -empty"; DO NOT EDIT.
Code generated by "enumerator -type FeeType"; DO NOT EDIT.
Code generated by "enumerator -type LifeSustainingTreatment -linecomment -trimprefix -empty"; DO NOT EDIT.
Code generated by "enumerator -type LpaType -linecomment -trimprefix -empty"; DO NOT EDIT.
Code generated by "enumerator -type ReplacementAttorneysStepIn -linecomment -trimprefix -empty"; DO NOT EDIT.
Modified from io/multi.go which carries the following licence:
Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- Constants
- Variables
- func AuthRedirect(logger Logger, store sesh.Store) http.HandlerFunc
- func CacheControlHeaders(h http.Handler) http.Handler
- func ChooseAttorneysState(attorneys actor.Attorneys, decisions actor.AttorneyDecisions) actor.TaskState
- func ChooseReplacementAttorneysState(lpa *Lpa) actor.TaskState
- func ContextWithAppData(ctx context.Context, appData AppData) context.Context
- func ContextWithSessionData(ctx context.Context, data *SessionData) context.Context
- func CookieConsent(paths AppPaths) http.HandlerFunc
- func DependencyHealthCheck(logger Logger, uidClient UidClient) http.HandlerFunc
- func MultiReadCloser(readClosers ...io.ReadCloser) io.ReadCloser
- func PostFormReferenceNumber(r *http.Request, name string) string
- func PostFormString(r *http.Request, name string) string
- func Recover(tmpl template.Template, logger Logger, bundle Bundle, next http.Handler) http.HandlerFunc
- func RouteToPrefix(prefix string, mux http.Handler, notFoundHandler Handler) http.HandlerFunc
- func TestingStart(store sesh.Store, donorStore DonorStore, randomString func(int) string, ...) http.HandlerFunc
- func ValidateCsrf(next http.Handler, store sessions.Store, randomString func(int) string, ...) http.HandlerFunc
- func YotiRedirect(logger Logger, store sesh.Store) http.HandlerFunc
- type AddressDetail
- type AppData
- func (d AppData) BuildUrl(url string) string
- func (d AppData) IsCertificateProvider() bool
- func (d AppData) IsDonor() bool
- func (d AppData) IsReplacementAttorney() bool
- func (d AppData) IsTrustCorporation() bool
- func (d AppData) Redirect(w http.ResponseWriter, r *http.Request, lpa *Lpa, url string) error
- type AppPaths
- type ApplicationReason
- type ApplicationReasonOptions
- type AttorneyPath
- type AttorneyPaths
- type AttorneyStore
- type Bundle
- type CanBeUsedWhen
- type CanBeUsedWhenOptions
- type CertificateProviderPath
- type CertificateProviderPaths
- type CertificateProviderStore
- type DashboardStore
- type DonorStore
- type ErrorHandler
- type FeeType
- type FeeTypeOptions
- type Handler
- func Dashboard(tmpl template.Template, donorStore DonorStore, dashboardStore DashboardStore) Handler
- func Fixtures(tmpl template.Template) Handler
- func Guidance(tmpl template.Template) Handler
- func Login(logger LoginLogger, oneLoginClient LoginOneLoginClient, store sesh.Store, ...) Handler
- func LoginCallback(oneLoginClient LoginCallbackOneLoginClient, sessionStore sesh.Store, ...) Handler
- func Root(tmpl template.Template, logger Logger) Handler
- func SignOut(logger Logger, sessionStore sesh.Store, oneLoginClient OneLoginClient, ...) Handler
- type HealthCheckPaths
- type LifeSustainingTreatment
- type LifeSustainingTreatmentOptions
- type Limiter
- type Localizer
- type Logger
- type LoginCallbackOneLoginClient
- type LoginLogger
- type LoginOneLoginClient
- type Lpa
- type LpaAndActorTasks
- type LpaPath
- type LpaType
- type LpaTypeOptions
- type NotifyClient
- type OneLoginClient
- type Path
- type PaymentDetails
- type Progress
- type ReplacementAttorneysStepIn
- type ReplacementAttorneysStepInOptions
- type RumConfig
- type SessionData
- type SessionMissingError
- type SessionStore
- type ShareCodeSender
- type ShareCodeStore
- type Tasks
- type Template
- type UidClient
- type WitnessCode
- type WitnessCodeSender
- type WitnessCodes
Constants ¶
const FormUrlEncoded = "application/x-www-form-urlencoded"
Variables ¶
var ApplicationReasonValues = ApplicationReasonOptions{ NewApplication: NewApplication, RemakeOfInvalidApplication: RemakeOfInvalidApplication, AdditionalApplication: AdditionalApplication, }
var CanBeUsedWhenValues = CanBeUsedWhenOptions{ CapacityLost: CanBeUsedWhenCapacityLost, HasCapacity: CanBeUsedWhenHasCapacity, }
var ErrCsrfInvalid = errors.New("CSRF token not valid")
var FeeTypeValues = FeeTypeOptions{ FullFee: FullFee, HalfFee: HalfFee, NoFee: NoFee, HardshipFee: HardshipFee, }
var LifeSustainingTreatmentValues = LifeSustainingTreatmentOptions{ OptionA: LifeSustainingTreatmentOptionA, OptionB: LifeSustainingTreatmentOptionB, }
var LpaTypeValues = LpaTypeOptions{ HealthWelfare: LpaTypeHealthWelfare, PropertyFinance: LpaTypePropertyFinance, }
var Paths = AppPaths{ CertificateProvider: CertificateProviderPaths{ Login: "/certificate-provider-login", LoginCallback: "/certificate-provider-login-callback", EnterReferenceNumber: "/certificate-provider-enter-reference-number", WhoIsEligible: "/certificate-provider-who-is-eligible", CertificateProvided: "/certificate-provided", ConfirmYourDetails: "/confirm-your-details", EnterDateOfBirth: "/enter-date-of-birth", IdentityWithBiometricResidencePermit: "/id/brp", IdentityWithDrivingLicencePaper: "/id/dlpaper", IdentityWithDrivingLicencePhotocard: "/id/dlphoto", IdentityWithOneLogin: "/identity-with-one-login", IdentityWithOneLoginCallback: "/identity-with-one-login-callback", IdentityWithOnlineBankAccount: "/id/bank", IdentityWithPassport: "/id/passport", IdentityWithYoti: "/identity-with-yoti", IdentityWithYotiCallback: "/identity-with-yoti-callback", ProvideCertificate: "/provide-certificate", ReadTheLpa: "/read-the-lpa", SelectYourIdentityOptions1: "/select-identity-document", SelectYourIdentityOptions2: "/select-identity-document-2", SelectYourIdentityOptions: "/select-your-identity-options", TaskList: "/task-list", WhatHappensNext: "/what-happens-next", WhatYoullNeedToConfirmYourIdentity: "/what-youll-need-to-confirm-your-identity", YourChosenIdentityOptions: "/your-chosen-identity-options", YourRole: "/your-role", }, Attorney: AttorneyPaths{ EnterReferenceNumber: "/attorney-enter-reference-number", Login: "/attorney-login", LoginCallback: "/attorney-login-callback", Start: "/attorney-start", CodeOfConduct: "/code-of-conduct", ConfirmYourDetails: "/confirm-your-details", MobileNumber: "/mobile-number", ReadTheLpa: "/read-the-lpa", RightsAndResponsibilities: "/legal-rights-and-responsibilities", Sign: "/sign", TaskList: "/task-list", WhatHappensNext: "/what-happens-next", WhatHappensWhenYouSign: "/what-happens-when-you-sign-the-lpa", WouldLikeSecondSignatory: "/would-like-second-signatory", }, HealthCheck: HealthCheckPaths{ Service: "/health-check/service", Dependency: "/health-check/dependency", }, AboutPayment: "/about-payment", ApplicationReason: "/application-reason", AreYouApplyingForADifferentFeeType: "/are-you-applying-for-a-different-fee-type", AreYouHappyIfOneAttorneyCantActNoneCan: "/are-you-happy-if-one-attorney-cant-act-none-can", AreYouHappyIfOneReplacementAttorneyCantActNoneCan: "/are-you-happy-if-one-replacement-attorney-cant-act-none-can", AreYouHappyIfRemainingAttorneysCanContinueToAct: "/are-you-happy-if-remaining-attorneys-can-continue-to-act", AreYouHappyIfRemainingReplacementAttorneysCanContinueToAct: "/are-you-happy-if-remaining-replacement-attorneys-can-continue-to-act", AuthRedirect: "/auth/redirect", CanEvidenceBeUploaded: "/can-evidence-be-uploaded", CertificateProviderAddress: "/certificate-provider-address", CertificateProviderDetails: "/certificate-provider-details", CertificateProviderOptOut: "/certificate-provider-opt-out", CertificateProviderStart: "/certificate-provider-start", CheckYourLpa: "/check-your-lpa", ChooseAttorneys: "/choose-attorneys", ChooseAttorneysAddress: "/choose-attorneys-address", ChooseAttorneysGuidance: "/choose-attorneys-guidance", ChooseAttorneysSummary: "/choose-attorneys-summary", ChoosePeopleToNotify: "/choose-people-to-notify", ChoosePeopleToNotifyAddress: "/choose-people-to-notify-address", ChoosePeopleToNotifySummary: "/choose-people-to-notify-summary", ChooseReplacementAttorneys: "/choose-replacement-attorneys", ChooseReplacementAttorneysAddress: "/choose-replacement-attorneys-address", ChooseReplacementAttorneysSummary: "/choose-replacement-attorneys-summary", ChooseYourCertificateProvider: "/choose-your-certificate-provider", CookiesConsent: "/cookies-consent", Dashboard: "/dashboard", DoYouWantReplacementAttorneys: "/do-you-want-replacement-attorneys", DoYouWantToNotifyPeople: "/do-you-want-to-notify-people", EnterTrustCorporation: "/enter-trust-corporation", EnterTrustCorporationAddress: "/enter-trust-corporation-address", EvidenceRequired: "/evidence-required", Fixtures: "/fixtures", HowDoYouKnowYourCertificateProvider: "/how-do-you-know-your-certificate-provider", HowLongHaveYouKnownCertificateProvider: "/how-long-have-you-known-certificate-provider", HowShouldAttorneysMakeDecisions: "/how-should-attorneys-make-decisions", HowShouldReplacementAttorneysMakeDecisions: "/how-should-replacement-attorneys-make-decisions", HowShouldReplacementAttorneysStepIn: "/how-should-replacement-attorneys-step-in", HowToConfirmYourIdentityAndSign: "/how-to-confirm-your-identity-and-sign", HowToPrintAndSendEvidence: "/how-to-print-and-send-evidence", HowToSendEvidence: "/how-to-send-evidence", HowWouldCertificateProviderPreferToCarryOutTheirRole: "/how-would-certificate-provider-prefer-to-carry-out-their-role", IdentityConfirmed: "/identity-confirmed", IdentityWithBiometricResidencePermit: "/id/biometric-residence-permit", IdentityWithDrivingLicencePaper: "/id/driving-licence-paper", IdentityWithDrivingLicencePhotocard: "/id/driving-licence-photocard", IdentityWithOneLogin: "/id/one-login", IdentityWithOneLoginCallback: "/id/one-login/callback", IdentityWithOnlineBankAccount: "/id/online-bank-account", IdentityWithPassport: "/id/passport", IdentityWithYoti: "/id/yoti", IdentityWithYotiCallback: "/id/yoti/callback", LifeSustainingTreatment: "/life-sustaining-treatment", Login: "/login", LoginCallback: "/login-callback", LpaDetailsSaved: "/lpa-details-saved", LpaType: "/lpa-type", LpaYourLegalRightsAndResponsibilities: "/your-legal-rights-and-responsibilities", PaymentConfirmation: "/payment-confirmation", PreviousApplicationNumber: "/previous-application-number", PrintEvidenceForm: "/print-evidence-form", Progress: "/progress", ProvideAddressToSendEvidenceForm: "/provide-address-to-send-evidence-form", ReadYourLpa: "/read-your-lpa", RemoveAttorney: "/remove-attorney", RemovePersonToNotify: "/remove-person-to-notify", RemoveReplacementAttorney: "/remove-replacement-attorney", ResendWitnessCode: "/resend-witness-code", Restrictions: "/restrictions", Root: "/", SelectYourIdentityOptions1: "/select-identity-document", SelectYourIdentityOptions2: "/select-identity-document-2", SelectYourIdentityOptions: "/select-your-identity-options", SignOut: "/sign-out", SignYourLpa: "/sign-your-lpa", Start: "/start", TaskList: "/task-list", TestingStart: "/testing-start", UploadEvidence: "/upload-evidence", UseExistingAddress: "/use-existing-address", WhatACertificateProviderDoes: "/what-a-certificate-provider-does", WhatHappensAfterNoFee: "/what-happens-after-no-fee", WhatYoullNeedToConfirmYourIdentity: "/what-youll-need-to-confirm-your-identity", WhenCanTheLpaBeUsed: "/when-can-the-lpa-be-used", WhichFeeTypeAreYouApplyingFor: "/which-fee-type-are-you-applying-for", WhoIsTheLpaFor: "/who-is-the-lpa-for", WitnessingAsCertificateProvider: "/witnessing-as-certificate-provider", WitnessingYourSignature: "/witnessing-your-signature", YotiRedirect: "/yoti/redirect", YouHaveSubmittedYourLpa: "/you-have-submitted-your-lpa", YourAddress: "/your-address", YourChosenIdentityOptions: "/your-chosen-identity-options", YourDetails: "/your-details", YourLegalRightsAndResponsibilities: "/your-legal-rights-and-responsibilities", }
var ReplacementAttorneysStepInValues = ReplacementAttorneysStepInOptions{ WhenAllCanNoLongerAct: ReplacementAttorneysStepInWhenAllCanNoLongerAct, WhenOneCanNoLongerAct: ReplacementAttorneysStepInWhenOneCanNoLongerAct, AnotherWay: ReplacementAttorneysStepInAnotherWay, }
Functions ¶
func AuthRedirect ¶
func AuthRedirect(logger Logger, store sesh.Store) http.HandlerFunc
func ChooseAttorneysState ¶
func ContextWithAppData ¶
func ContextWithSessionData ¶
func ContextWithSessionData(ctx context.Context, data *SessionData) context.Context
func CookieConsent ¶
func CookieConsent(paths AppPaths) http.HandlerFunc
func DependencyHealthCheck ¶
func DependencyHealthCheck(logger Logger, uidClient UidClient) http.HandlerFunc
func MultiReadCloser ¶
func MultiReadCloser(readClosers ...io.ReadCloser) io.ReadCloser
MultiReadCloser returns a io.ReadCloser that's the logical concatenation of the provided input readClosers. They're read sequentially. Once all inputs have returned EOF, Read will return EOF. If any of the readClosers return a non-nil, non-EOF error, Read will return that error.
func RouteToPrefix ¶
func TestingStart ¶
func TestingStart(store sesh.Store, donorStore DonorStore, randomString func(int) string, shareCodeSender shareCodeSender, localizer Localizer, certificateProviderStore CertificateProviderStore, attorneyStore AttorneyStore, logger *logging.Logger, now func() time.Time) http.HandlerFunc
func ValidateCsrf ¶
func ValidateCsrf(next http.Handler, store sessions.Store, randomString func(int) string, errorHandler ErrorHandler) http.HandlerFunc
func YotiRedirect ¶
func YotiRedirect(logger Logger, store sesh.Store) http.HandlerFunc
Types ¶
type AddressDetail ¶
type AppData ¶
type AppData struct { Page string Path string Query string Localizer Localizer Lang localize.Lang CookieConsentSet bool CanGoBack bool SessionID string RumConfig RumConfig StaticHash string Paths AppPaths LpaID string CsrfToken string ActorTypes actor.Types ActorType actor.Type AttorneyID string OneloginURL string }
func AppDataFromContext ¶
func (AppData) IsCertificateProvider ¶
func (AppData) IsReplacementAttorney ¶
func (AppData) IsTrustCorporation ¶
type AppPaths ¶
type AppPaths struct { Attorney AttorneyPaths CertificateProvider CertificateProviderPaths HealthCheck HealthCheckPaths AuthRedirect Path Login Path LoginCallback Path Root Path SignOut Path Fixtures Path YourLegalRightsAndResponsibilities Path CertificateProviderStart Path Start Path TestingStart Path Dashboard Path YotiRedirect Path CookiesConsent Path AboutPayment LpaPath ApplicationReason LpaPath AreYouApplyingForADifferentFeeType LpaPath AreYouHappyIfOneAttorneyCantActNoneCan LpaPath AreYouHappyIfOneReplacementAttorneyCantActNoneCan LpaPath AreYouHappyIfRemainingAttorneysCanContinueToAct LpaPath AreYouHappyIfRemainingReplacementAttorneysCanContinueToAct LpaPath CanEvidenceBeUploaded LpaPath CertificateProviderAddress LpaPath CertificateProviderDetails LpaPath CertificateProviderOptOut LpaPath CheckYourLpa LpaPath ChooseAttorneys LpaPath ChooseAttorneysAddress LpaPath ChooseAttorneysGuidance LpaPath ChooseAttorneysSummary LpaPath ChoosePeopleToNotify LpaPath ChoosePeopleToNotifyAddress LpaPath ChoosePeopleToNotifySummary LpaPath ChooseReplacementAttorneys LpaPath ChooseReplacementAttorneysAddress LpaPath ChooseReplacementAttorneysSummary LpaPath ChooseYourCertificateProvider LpaPath DoYouWantReplacementAttorneys LpaPath DoYouWantToNotifyPeople LpaPath EnterTrustCorporation LpaPath EnterTrustCorporationAddress LpaPath EvidenceRequired LpaPath HowDoYouKnowYourCertificateProvider LpaPath HowLongHaveYouKnownCertificateProvider LpaPath HowShouldAttorneysMakeDecisions LpaPath HowShouldReplacementAttorneysMakeDecisions LpaPath HowShouldReplacementAttorneysStepIn LpaPath HowToConfirmYourIdentityAndSign LpaPath HowToPrintAndSendEvidence LpaPath HowToSendEvidence LpaPath HowWouldCertificateProviderPreferToCarryOutTheirRole LpaPath IdentityConfirmed LpaPath IdentityWithBiometricResidencePermit LpaPath IdentityWithDrivingLicencePaper LpaPath IdentityWithDrivingLicencePhotocard LpaPath IdentityWithOneLogin LpaPath IdentityWithOneLoginCallback LpaPath IdentityWithOnlineBankAccount LpaPath IdentityWithPassport LpaPath IdentityWithYoti LpaPath IdentityWithYotiCallback LpaPath LifeSustainingTreatment LpaPath LpaDetailsSaved LpaPath LpaType LpaPath LpaYourLegalRightsAndResponsibilities LpaPath PaymentConfirmation LpaPath PreviousApplicationNumber LpaPath PrintEvidenceForm LpaPath Progress LpaPath ProvideAddressToSendEvidenceForm LpaPath ReadYourLpa LpaPath RemoveAttorney LpaPath RemovePersonToNotify LpaPath RemoveReplacementAttorney LpaPath ResendWitnessCode LpaPath Restrictions LpaPath SelectYourIdentityOptions LpaPath SelectYourIdentityOptions1 LpaPath SelectYourIdentityOptions2 LpaPath SignYourLpa LpaPath TaskList LpaPath UploadEvidence LpaPath UseExistingAddress LpaPath WhatACertificateProviderDoes LpaPath WhatHappensAfterNoFee LpaPath WhatYoullNeedToConfirmYourIdentity LpaPath WhenCanTheLpaBeUsed LpaPath WhichFeeTypeAreYouApplyingFor LpaPath WhoIsTheLpaFor LpaPath WitnessingAsCertificateProvider LpaPath WitnessingYourSignature LpaPath YouHaveSubmittedYourLpa LpaPath YourAddress LpaPath YourChosenIdentityOptions LpaPath YourDetails LpaPath }
type ApplicationReason ¶
type ApplicationReason uint8
const ( NewApplication ApplicationReason = iota + 1 // new-application RemakeOfInvalidApplication // remake AdditionalApplication // additional-application )
func ParseApplicationReason ¶
func ParseApplicationReason(s string) (ApplicationReason, error)
func (ApplicationReason) Empty ¶
func (i ApplicationReason) Empty() bool
func (ApplicationReason) IsAdditionalApplication ¶
func (i ApplicationReason) IsAdditionalApplication() bool
func (ApplicationReason) IsNewApplication ¶
func (i ApplicationReason) IsNewApplication() bool
func (ApplicationReason) IsRemakeOfInvalidApplication ¶
func (i ApplicationReason) IsRemakeOfInvalidApplication() bool
func (ApplicationReason) String ¶
func (i ApplicationReason) String() string
type ApplicationReasonOptions ¶
type ApplicationReasonOptions struct { NewApplication ApplicationReason RemakeOfInvalidApplication ApplicationReason AdditionalApplication ApplicationReason }
type AttorneyPath ¶
type AttorneyPath string
func (AttorneyPath) Format ¶
func (p AttorneyPath) Format(id string) string
func (AttorneyPath) String ¶
func (p AttorneyPath) String() string
type AttorneyPaths ¶
type AttorneyPaths struct { EnterReferenceNumber Path Login Path LoginCallback Path Start Path CodeOfConduct AttorneyPath ConfirmYourDetails AttorneyPath MobileNumber AttorneyPath ReadTheLpa AttorneyPath RightsAndResponsibilities AttorneyPath Sign AttorneyPath TaskList AttorneyPath WhatHappensNext AttorneyPath WhatHappensWhenYouSign AttorneyPath WouldLikeSecondSignatory AttorneyPath }
type AttorneyStore ¶
type CanBeUsedWhen ¶
type CanBeUsedWhen uint8
const ( CanBeUsedWhenCapacityLost CanBeUsedWhen = iota + 1 // when-capacity-lost CanBeUsedWhenHasCapacity // when-has-capacity )
func ParseCanBeUsedWhen ¶
func ParseCanBeUsedWhen(s string) (CanBeUsedWhen, error)
func (CanBeUsedWhen) Empty ¶
func (i CanBeUsedWhen) Empty() bool
func (CanBeUsedWhen) IsCapacityLost ¶
func (i CanBeUsedWhen) IsCapacityLost() bool
func (CanBeUsedWhen) IsHasCapacity ¶
func (i CanBeUsedWhen) IsHasCapacity() bool
func (CanBeUsedWhen) String ¶
func (i CanBeUsedWhen) String() string
type CanBeUsedWhenOptions ¶
type CanBeUsedWhenOptions struct { CapacityLost CanBeUsedWhen HasCapacity CanBeUsedWhen }
type CertificateProviderPath ¶
type CertificateProviderPath string
func (CertificateProviderPath) Format ¶
func (p CertificateProviderPath) Format(id string) string
func (CertificateProviderPath) String ¶
func (p CertificateProviderPath) String() string
type CertificateProviderPaths ¶
type CertificateProviderPaths struct { Login Path LoginCallback Path EnterReferenceNumber Path CertificateProvided CertificateProviderPath ConfirmYourDetails CertificateProviderPath EnterDateOfBirth CertificateProviderPath IdentityWithBiometricResidencePermit CertificateProviderPath IdentityWithDrivingLicencePaper CertificateProviderPath IdentityWithDrivingLicencePhotocard CertificateProviderPath IdentityWithOneLogin CertificateProviderPath IdentityWithOneLoginCallback CertificateProviderPath IdentityWithOnlineBankAccount CertificateProviderPath IdentityWithPassport CertificateProviderPath IdentityWithYoti CertificateProviderPath IdentityWithYotiCallback CertificateProviderPath ProvideCertificate CertificateProviderPath ReadTheLpa CertificateProviderPath SelectYourIdentityOptions CertificateProviderPath SelectYourIdentityOptions1 CertificateProviderPath SelectYourIdentityOptions2 CertificateProviderPath TaskList CertificateProviderPath WhatHappensNext CertificateProviderPath WhatYoullNeedToConfirmYourIdentity CertificateProviderPath WhoIsEligible CertificateProviderPath YourChosenIdentityOptions CertificateProviderPath YourRole CertificateProviderPath }
type DashboardStore ¶
type DashboardStore interface {
GetAll(ctx context.Context) (donor, attorney, certificateProvider []LpaAndActorTasks, err error)
}
type DonorStore ¶
type ErrorHandler ¶
type ErrorHandler func(http.ResponseWriter, *http.Request, error)
type FeeTypeOptions ¶
type Handler ¶
func Dashboard ¶
func Dashboard(tmpl template.Template, donorStore DonorStore, dashboardStore DashboardStore) Handler
func Login ¶
func Login(logger LoginLogger, oneLoginClient LoginOneLoginClient, store sesh.Store, randomString func(int) string, redirect Path) Handler
func LoginCallback ¶
func LoginCallback(oneLoginClient LoginCallbackOneLoginClient, sessionStore sesh.Store, redirect Path) Handler
type HealthCheckPaths ¶
type LifeSustainingTreatment ¶
type LifeSustainingTreatment uint8
const ( LifeSustainingTreatmentOptionA LifeSustainingTreatment = iota + 1 // option-a LifeSustainingTreatmentOptionB // option-b )
func ParseLifeSustainingTreatment ¶
func ParseLifeSustainingTreatment(s string) (LifeSustainingTreatment, error)
func (LifeSustainingTreatment) Empty ¶
func (i LifeSustainingTreatment) Empty() bool
func (LifeSustainingTreatment) IsOptionA ¶
func (i LifeSustainingTreatment) IsOptionA() bool
func (LifeSustainingTreatment) IsOptionB ¶
func (i LifeSustainingTreatment) IsOptionB() bool
func (LifeSustainingTreatment) String ¶
func (i LifeSustainingTreatment) String() string
type LifeSustainingTreatmentOptions ¶
type LifeSustainingTreatmentOptions struct { OptionA LifeSustainingTreatment OptionB LifeSustainingTreatment }
type Limiter ¶
type Limiter struct { TokenPer time.Duration MaxTokens float64 Tokens float64 TokensAt time.Time // contains filtered or unexported fields }
Limiter is a basic rate limiter that can be serialised.
func NewLimiter ¶
type Localizer ¶
type Localizer interface { Format(string, map[string]any) string T(string) string Count(messageID string, count int) string FormatCount(messageID string, count int, data map[string]interface{}) string ShowTranslationKeys() bool SetShowTranslationKeys(s bool) Possessive(s string) string Concat([]string, string) string }
type LoginLogger ¶
type LoginLogger interface {
Print(v ...interface{})
}
type LoginOneLoginClient ¶
type Lpa ¶
type Lpa struct {
PK, SK string
// Identifies the LPA being drafted
ID string
// A unique identifier created after sending basic LPA details to the UID service
UID string `dynamodbav:",omitempty"`
// Tracking when the LPA is updated
UpdatedAt time.Time
// The donor the LPA relates to
Donor actor.Donor
// Attorneys named in the LPA
Attorneys actor.Attorneys
// Information on how the applicant wishes their attorneys to act
AttorneyDecisions actor.AttorneyDecisions
// The certificate provider named in the LPA
CertificateProvider actor.CertificateProvider
// Who the LPA is being drafted for (set, but not used)
WhoFor string
// Type of LPA being drafted
Type LpaType
// ApplicationReason is why the application is being made
ApplicationReason ApplicationReason
// PreviousApplicationNumber if the application is related to an existing application
PreviousApplicationNumber string
// Whether the applicant wants to add replacement attorneys
WantReplacementAttorneys form.YesNo
// When the LPA can be used
WhenCanTheLpaBeUsed CanBeUsedWhen
// Preferences on life sustaining treatment (applicable to personal welfare LPAs only)
LifeSustainingTreatmentOption LifeSustainingTreatment
// Restrictions on attorneys actions
Restrictions string
// Used to show the task list
Tasks Tasks
// Whether the applicant has checked the LPA and is happy to share the LPA with the certificate provider
CheckedAndHappy bool
// Used as part of GOV.UK Pay
PaymentDetails PaymentDetails
// Which option has been used to complete applicant identity checks
DonorIdentityOption identity.Option
// Information returned by the identity service related to the applicant
DonorIdentityUserData identity.UserData
// Replacement attorneys named in the LPA
ReplacementAttorneys actor.Attorneys
// Information on how the applicant wishes their replacement attorneys to act
ReplacementAttorneyDecisions actor.AttorneyDecisions
// How to bring in replacement attorneys, if set
HowShouldReplacementAttorneysStepIn ReplacementAttorneysStepIn
// Details on how replacement attorneys must step in if HowShouldReplacementAttorneysStepIn is set to "other"
HowShouldReplacementAttorneysStepInDetails string
// Whether the applicant wants to notify people about the application
DoYouWantToNotifyPeople form.YesNo
// People to notify about the application
PeopleToNotify actor.PeopleToNotify
// Codes used for the certificate provider to witness signing
WitnessCodes WitnessCodes
// Confirmation that the applicant wants to apply to register the LPA
WantToApplyForLpa bool
// Confirmation that the applicant wants to sign the LPA
WantToSignLpa bool
// When the Lpa was signed
Submitted time.Time
// Whether the signing was witnessed by the certificate provider
CPWitnessCodeValidated bool
// Used to rate limit witnessing requests
WitnessCodeLimiter *Limiter
// FeeType is the type of fee the user is applying for
FeeType FeeType
// EvidenceFormAddress is where the form to provide evidence for a fee reduction will be sent
EvidenceFormAddress place.Address
// EvidenceKey is the S3 key for uploaded evidence
EvidenceKey string
HasSentPreviousApplicationLinkedEvent bool
HasSentEvidenceFormRequiredEvent bool
HasSentReducedFeeRequestedEvent bool
}
Lpa contains all the data related to the LPA application
func (*Lpa) ActorAddresses ¶
func (*Lpa) AttorneysAndCpSigningDeadline ¶
func (*Lpa) DonorIdentityConfirmed ¶
type LpaAndActorTasks ¶
type LpaAndActorTasks struct { Lpa *Lpa CertificateProviderTasks actor.CertificateProviderTasks AttorneyTasks actor.AttorneyTasks }
type LpaType ¶
type LpaType uint8
func ParseLpaType ¶
func (LpaType) IsHealthWelfare ¶
func (LpaType) IsPropertyFinance ¶
func (LpaType) LegalTermTransKey ¶
type LpaTypeOptions ¶
type NotifyClient ¶
type OneLoginClient ¶
type OneLoginClient interface { AuthCodeURL(state, nonce, locale string, identity bool) string EndSessionURL(idToken, postLogoutURL string) string Exchange(ctx context.Context, code, nonce string) (idToken, accessToken string, err error) UserInfo(ctx context.Context, accessToken string) (onelogin.UserInfo, error) }
type PaymentDetails ¶
type ReplacementAttorneysStepIn ¶
type ReplacementAttorneysStepIn uint8
const ( ReplacementAttorneysStepInWhenAllCanNoLongerAct ReplacementAttorneysStepIn = iota + 1 // all ReplacementAttorneysStepInWhenOneCanNoLongerAct // one ReplacementAttorneysStepInAnotherWay // other )
func ParseReplacementAttorneysStepIn ¶
func ParseReplacementAttorneysStepIn(s string) (ReplacementAttorneysStepIn, error)
func (ReplacementAttorneysStepIn) Empty ¶
func (i ReplacementAttorneysStepIn) Empty() bool
func (ReplacementAttorneysStepIn) IsAnotherWay ¶
func (i ReplacementAttorneysStepIn) IsAnotherWay() bool
func (ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct ¶
func (i ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct() bool
func (ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct ¶
func (i ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct() bool
func (ReplacementAttorneysStepIn) String ¶
func (i ReplacementAttorneysStepIn) String() string
type ReplacementAttorneysStepInOptions ¶
type ReplacementAttorneysStepInOptions struct { WhenAllCanNoLongerAct ReplacementAttorneysStepIn WhenOneCanNoLongerAct ReplacementAttorneysStepIn AnotherWay ReplacementAttorneysStepIn }
type SessionData ¶
func SessionDataFromContext ¶
func SessionDataFromContext(ctx context.Context) (*SessionData, error)
type SessionMissingError ¶
type SessionMissingError struct{}
func (SessionMissingError) Error ¶
func (s SessionMissingError) Error() string
type SessionStore ¶
type ShareCodeSender ¶
type ShareCodeSender struct {
// contains filtered or unexported fields
}
func NewShareCodeSender ¶
func NewShareCodeSender(shareCodeStore ShareCodeStore, notifyClient NotifyClient, appPublicURL string, randomString func(int) string) *ShareCodeSender
func (*ShareCodeSender) SendAttorneys ¶
func (*ShareCodeSender) SendCertificateProvider ¶
func (*ShareCodeSender) UseTestCode ¶
func (s *ShareCodeSender) UseTestCode()
type ShareCodeStore ¶
type ShareCodeStore interface {}
type Tasks ¶
type Tasks struct { YourDetails actor.TaskState ChooseAttorneys actor.TaskState ChooseReplacementAttorneys actor.TaskState WhenCanTheLpaBeUsed actor.TaskState // pfa only LifeSustainingTreatment actor.TaskState // hw only Restrictions actor.TaskState CertificateProvider actor.TaskState CheckYourLpa actor.TaskState PayForLpa actor.PaymentTask ConfirmYourIdentityAndSign actor.TaskState PeopleToNotify actor.TaskState }
type WitnessCode ¶
func (WitnessCode) HasExpired ¶
func (w WitnessCode) HasExpired() bool
type WitnessCodeSender ¶
type WitnessCodeSender struct {
// contains filtered or unexported fields
}
func NewWitnessCodeSender ¶
func NewWitnessCodeSender(donorStore DonorStore, notifyClient NotifyClient) *WitnessCodeSender
type WitnessCodes ¶
type WitnessCodes []WitnessCode
func (WitnessCodes) CanRequest ¶
func (ws WitnessCodes) CanRequest(now time.Time) bool
func (WitnessCodes) Find ¶
func (ws WitnessCodes) Find(code string) (WitnessCode, bool)
Source Files ¶
- app_data.go
- auth_redirect.go
- common.go
- config.go
- cookie_consent.go
- csrf.go
- dashboard.go
- data.go
- dependency_health_check.go
- enum_applicationreason.go
- enum_canbeusedwhen.go
- enum_feetype.go
- enum_lifesustainingtreatment.go
- enum_lpatype.go
- enum_replacementattorneysstepin.go
- error.go
- fixtures.go
- guidance.go
- limiter.go
- login.go
- login_callback.go
- multi_read_closer.go
- paths.go
- prefix.go
- recover.go
- root.go
- share_code.go
- sign_out.go
- testing_start.go
- witness_code.go
- yoti_redirect.go