Documentation
¶
Overview ¶
Package donordata provides types that describe the data entered by a donor.
Index ¶
- Variables
- func ChooseAttorneysState(attorneys Attorneys, decisions AttorneyDecisions) task.State
- func ChooseReplacementAttorneysState(donor *Provided) task.State
- type Attorney
- type AttorneyDecisions
- type Attorneys
- func (as Attorneys) Addresses() []place.Address
- func (as Attorneys) Complete() bool
- func (as *Attorneys) Delete(attorney Attorney) bool
- func (as Attorneys) FirstNames() []string
- func (as Attorneys) FullNames() []string
- func (as Attorneys) Get(uid actoruid.UID) (Attorney, bool)
- func (as *Attorneys) Index(uid actoruid.UID) int
- func (as Attorneys) Len() int
- func (as *Attorneys) Put(attorney Attorney)
- type AuthorisedSignatory
- type CertificateProvider
- type CertificateProviderRelationshipLength
- func (i CertificateProviderRelationshipLength) IsGreaterThanEqualToTwoYears() bool
- func (i CertificateProviderRelationshipLength) IsLessThanTwoYears() bool
- func (i CertificateProviderRelationshipLength) IsRelationshipLengthUnknown() bool
- func (i CertificateProviderRelationshipLength) MarshalText() ([]byte, error)
- func (i CertificateProviderRelationshipLength) String() string
- func (i *CertificateProviderRelationshipLength) UnmarshalText(text []byte) error
- type CertificateProviderRelationshipLengthOptions
- type Correspondent
- type Donor
- type IndependentWitness
- type Localizer
- type NoVoucherDecision
- func (i NoVoucherDecision) Empty() bool
- func (i NoVoucherDecision) IsApplyToCOP() bool
- func (i NoVoucherDecision) IsProveOwnIdentity() bool
- func (i NoVoucherDecision) IsSelectNewVoucher() bool
- func (i NoVoucherDecision) IsWithdrawLPA() bool
- func (i NoVoucherDecision) MarshalText() ([]byte, error)
- func (i NoVoucherDecision) String() string
- func (i *NoVoucherDecision) UnmarshalText(text []byte) error
- type NoVoucherDecisionOptions
- type Payment
- type PeopleToNotify
- type PersonToNotify
- type Provided
- func (p *Provided) ActorAddresses() []place.Address
- func (p *Provided) Actors() iter.Seq[actor.Actor]
- func (p *Provided) AllLayAttorneysFirstNames() []string
- func (p *Provided) AllLayAttorneysFullNames() []string
- func (p *Provided) AttorneysNames(localizer Localizer) []string
- func (p *Provided) CanChange() bool
- func (p *Provided) CanChangePersonalDetails() bool
- func (p *Provided) CanHaveVoucher() bool
- func (p *Provided) CertificateProviderDeadline() time.Time
- func (p *Provided) CertificateProviderNotRelatedConfirmedHashChanged() bool
- func (p *Provided) CertificateProviderSharesAddress() bool
- func (p *Provided) CertificateProviderSharesLastName() bool
- func (p *Provided) CheckedHashChanged() bool
- func (p *Provided) CompletedAllTasks() bool
- func (p *Provided) Cost() int
- func (p *Provided) DonorIdentityConfirmed() bool
- func (p *Provided) DonorSigningDeadline() time.Time
- func (p *Provided) FeeAmount() pay.AmountPence
- func (p *Provided) HasCorrespondent() bool
- func (p *Provided) HasTrustCorporation() bool
- func (p *Provided) HashChanged() bool
- func (p *Provided) HashInclude(field string, _ any) (bool, error)
- func (p *Provided) IdentityDeadline() time.Time
- func (p *Provided) LpaStubHashChanged() bool
- func (p *Provided) Paid() pay.AmountPence
- func (p *Provided) PaidAt() time.Time
- func (p *Provided) SignatoriesNames(localizer Localizer) []string
- func (p *Provided) SigningDeadline() time.Time
- func (p *Provided) TrustCorporation() TrustCorporation
- func (p *Provided) Under18ActorDetails() []Under18ActorDetails
- func (p *Provided) UpdateCertificateProviderNotRelatedConfirmedHash() (err error)
- func (p *Provided) UpdateCheckedHash() (err error)
- func (p *Provided) UpdateDecisions()
- func (p *Provided) UpdateHash() (err error)
- func (p *Provided) UpdateLpaStubHash() (err error)
- type Tasks
- type TrustCorporation
- type Under18ActorDetails
- type Voucher
- type WitnessCode
- type WitnessCodes
- type YesNoMaybe
- type YesNoMaybeForm
- type YesNoMaybeOptions
Constants ¶
This section is empty.
Variables ¶
var CertificateProviderRelationshipLengthValues = CertificateProviderRelationshipLengthOptions{ RelationshipLengthUnknown: RelationshipLengthUnknown, LessThanTwoYears: LessThanTwoYears, GreaterThanEqualToTwoYears: GreaterThanEqualToTwoYears, }
var NoVoucherDecisionValues = NoVoucherDecisionOptions{ ProveOwnIdentity: ProveOwnIdentity, SelectNewVoucher: SelectNewVoucher, WithdrawLPA: WithdrawLPA, ApplyToCOP: ApplyToCOP, }
var YesNoMaybeValues = YesNoMaybeOptions{ Yes: Yes, No: No, Maybe: Maybe, }
Functions ¶
func ChooseAttorneysState ¶ added in v0.1354.0
func ChooseAttorneysState(attorneys Attorneys, decisions AttorneyDecisions) task.State
func ChooseReplacementAttorneysState ¶ added in v0.1354.0
Types ¶
type Attorney ¶
type Attorney struct {
// UID for the actor
UID actoruid.UID
// First names of the attorney
FirstNames string `relatedhash:"-"`
// Last name of the attorney
LastName string
// Email of the attorney
Email string `relatedhash:"-"`
// Date of birth of the attorney
DateOfBirth date.Date `relatedhash:"-"`
// Address of the attorney
Address place.Address
}
Attorney contains details about an attorney or replacement attorney, provided by the applicant
func (Attorney) NameHasChanged ¶ added in v0.1829.0
type AttorneyDecisions ¶
type AttorneyDecisions struct {
// How attorneys should make decisions
How lpadata.AttorneysAct
// Details on how attorneys should make decisions if acting jointly for some decisions, and jointly and severally for other decisions
Details string
}
AttorneyDecisions contains details about how an attorney or replacement attorney should act, provided by the applicant
func (AttorneyDecisions) IsComplete ¶
func (d AttorneyDecisions) IsComplete() bool
type Attorneys ¶
type Attorneys struct {
TrustCorporation TrustCorporation `relatedhash:"-"`
Attorneys []Attorney
}
func (Attorneys) FirstNames ¶
type AuthorisedSignatory ¶
AuthorisedSignatory contains details of the person who will sign the LPA on the donor's behalf
func (AuthorisedSignatory) FullName ¶
func (s AuthorisedSignatory) FullName() string
func (AuthorisedSignatory) NameHasChanged ¶ added in v0.1868.11
func (s AuthorisedSignatory) NameHasChanged(firstNames, lastName string) bool
type CertificateProvider ¶
type CertificateProvider struct {
// UID for the actor
UID actoruid.UID
// First names of the certificate provider
FirstNames string `relatedhash:"-"`
// Last name of the certificate provider
LastName string
// Address of the certificate provider
Address place.Address `relatedhash:"-"`
// Mobile number of the certificate provider, used to send witness codes
Mobile string `checkhash:"-" relatedhash:"-"`
// HasNonUKMobile indicates whether the value of Mobile is a non-UK mobile number
HasNonUKMobile bool `checkhash:"-" relatedhash:"-"`
// Email of the certificate provider
Email string `relatedhash:"-"`
// How the certificate provider wants to perform their role (paper or online)
CarryOutBy lpadata.Channel `relatedhash:"-"`
// The certificate provider's relationship to the applicant
Relationship lpadata.CertificateProviderRelationship `relatedhash:"-"`
// Amount of time Relationship has been in place if Personally
RelationshipLength CertificateProviderRelationshipLength `relatedhash:"-"`
}
CertificateProvider contains details about the certificate provider, provided by the applicant
func (CertificateProvider) AddressHasChanged ¶ added in v0.1868.11
func (c CertificateProvider) AddressHasChanged(address place.Address) bool
func (CertificateProvider) FullName ¶
func (c CertificateProvider) FullName() string
func (CertificateProvider) NameHasChanged ¶ added in v0.1868.11
func (c CertificateProvider) NameHasChanged(firstNames, lastName string) bool
type CertificateProviderRelationshipLength ¶
type CertificateProviderRelationshipLength uint8
const ( RelationshipLengthUnknown CertificateProviderRelationshipLength = iota // unknown LessThanTwoYears // lt-2-years GreaterThanEqualToTwoYears // gte-2-years )
func ParseCertificateProviderRelationshipLength ¶
func ParseCertificateProviderRelationshipLength(s string) (CertificateProviderRelationshipLength, error)
func (CertificateProviderRelationshipLength) IsGreaterThanEqualToTwoYears ¶
func (i CertificateProviderRelationshipLength) IsGreaterThanEqualToTwoYears() bool
func (CertificateProviderRelationshipLength) IsLessThanTwoYears ¶
func (i CertificateProviderRelationshipLength) IsLessThanTwoYears() bool
func (CertificateProviderRelationshipLength) IsRelationshipLengthUnknown ¶
func (i CertificateProviderRelationshipLength) IsRelationshipLengthUnknown() bool
func (CertificateProviderRelationshipLength) MarshalText ¶
func (i CertificateProviderRelationshipLength) MarshalText() ([]byte, error)
func (CertificateProviderRelationshipLength) String ¶
func (i CertificateProviderRelationshipLength) String() string
func (*CertificateProviderRelationshipLength) UnmarshalText ¶
func (i *CertificateProviderRelationshipLength) UnmarshalText(text []byte) error
type CertificateProviderRelationshipLengthOptions ¶
type CertificateProviderRelationshipLengthOptions struct {
RelationshipLengthUnknown CertificateProviderRelationshipLength
LessThanTwoYears CertificateProviderRelationshipLength
GreaterThanEqualToTwoYears CertificateProviderRelationshipLength
}
type Correspondent ¶
type Correspondent struct {
UID actoruid.UID
FirstNames string
LastName string
Email string
Organisation string
Phone string
WantAddress form.YesNo
Address place.Address
}
func (Correspondent) FullName ¶
func (c Correspondent) FullName() string
func (Correspondent) NameHasChanged ¶ added in v0.1868.11
func (c Correspondent) NameHasChanged(firstNames, lastName string) bool
type Donor ¶
type Donor struct {
// UID for the actor
UID actoruid.UID `stubhash:"-"`
// First names of the donor
FirstNames string `relatedhash:"-"`
// Last name of the donor
LastName string
// Email of the donor
Email string `checkhash:"-" relatedhash:"-" stubhash:"-"`
// Other names the donor is known by
OtherNames string `relatedhash:"-" stubhash:"-"`
// Date of birth of the donor
DateOfBirth date.Date `relatedhash:"-"`
// Address of the donor
Address place.Address
// International address of the donor
InternationalAddress place.InternationalAddress `relatedhash:"-" stubhash:"-"`
// Mobile phone number to contact the donor
Mobile string `checkhash:"-" relatedhash:"-" stubhash:"-"`
// ThinksCanSign is what the donor thinks about their ability to sign online
ThinksCanSign YesNoMaybe `relatedhash:"-" stubhash:"-"`
// CanSign is Yes if the donor has said they will sign online
CanSign form.YesNo `relatedhash:"-" stubhash:"-"`
// Channel is how the Donor is applying for their LPA (paper or online)
Channel lpadata.Channel `relatedhash:"-" stubhash:"-"`
// ContactLanguagePreference is the language the donor prefers to receive notifications in
ContactLanguagePreference localize.Lang `relatedhash:"-" stubhash:"-"`
// LpaLanguagePreference is the language the donor prefers to receive the registered LPA in
LpaLanguagePreference localize.Lang `checkhash:"-" relatedhash:"-" stubhash:"-"`
}
Donor contains details about the donor, provided by the applicant
func (Donor) NameHasChanged ¶ added in v0.1868.11
type IndependentWitness ¶
type IndependentWitness struct {
UID actoruid.UID
FirstNames string
LastName string
HasNonUKMobile bool `checkhash:"-"`
Mobile string `checkhash:"-"`
Address place.Address
}
IndependentWitness contains details of the person who will also witness the signing of the LPA
func (IndependentWitness) FullName ¶
func (w IndependentWitness) FullName() string
func (IndependentWitness) NameHasChanged ¶ added in v0.1868.11
func (w IndependentWitness) NameHasChanged(firstNames, lastName string) bool
type NoVoucherDecision ¶ added in v0.1344.0
type NoVoucherDecision uint8
const ( ProveOwnIdentity NoVoucherDecision = iota + 1 // prove-own-identity SelectNewVoucher // select-new-voucher WithdrawLPA // withdraw-lpa ApplyToCOP // apply-to-cop )
func ParseNoVoucherDecision ¶ added in v0.1344.0
func ParseNoVoucherDecision(s string) (NoVoucherDecision, error)
func (NoVoucherDecision) Empty ¶ added in v0.1344.0
func (i NoVoucherDecision) Empty() bool
func (NoVoucherDecision) IsApplyToCOP ¶ added in v0.1344.0
func (i NoVoucherDecision) IsApplyToCOP() bool
func (NoVoucherDecision) IsProveOwnIdentity ¶ added in v0.1513.0
func (i NoVoucherDecision) IsProveOwnIdentity() bool
func (NoVoucherDecision) IsSelectNewVoucher ¶ added in v0.1344.0
func (i NoVoucherDecision) IsSelectNewVoucher() bool
func (NoVoucherDecision) IsWithdrawLPA ¶ added in v0.1344.0
func (i NoVoucherDecision) IsWithdrawLPA() bool
func (NoVoucherDecision) MarshalText ¶ added in v0.1344.0
func (i NoVoucherDecision) MarshalText() ([]byte, error)
func (NoVoucherDecision) String ¶ added in v0.1344.0
func (i NoVoucherDecision) String() string
func (*NoVoucherDecision) UnmarshalText ¶ added in v0.1344.0
func (i *NoVoucherDecision) UnmarshalText(text []byte) error
type NoVoucherDecisionOptions ¶ added in v0.1344.0
type NoVoucherDecisionOptions struct {
ProveOwnIdentity NoVoucherDecision
SelectNewVoucher NoVoucherDecision
WithdrawLPA NoVoucherDecision
ApplyToCOP NoVoucherDecision
}
type PeopleToNotify ¶
type PeopleToNotify []PersonToNotify
func (*PeopleToNotify) Delete ¶
func (ps *PeopleToNotify) Delete(personToNotify PersonToNotify) bool
func (PeopleToNotify) Get ¶
func (ps PeopleToNotify) Get(uid actoruid.UID) (PersonToNotify, bool)
func (*PeopleToNotify) Put ¶
func (ps *PeopleToNotify) Put(person PersonToNotify)
type PersonToNotify ¶
type PersonToNotify struct {
UID actoruid.UID
// First names of the person to notify
FirstNames string
// Last name of the person to notify
LastName string
// Address of the person to notify
Address place.Address
}
PersonToNotify contains details about a person to notify, provided by the applicant
func (PersonToNotify) FullName ¶
func (p PersonToNotify) FullName() string
func (PersonToNotify) NameHasChanged ¶ added in v0.1868.11
func (p PersonToNotify) NameHasChanged(firstNames, lastName string) bool
type Provided ¶ added in v0.1338.0
type Provided struct {
PK dynamo.LpaKeyType `hash:"-" checkhash:"-"`
SK dynamo.LpaOwnerKeyType `hash:"-" checkhash:"-"`
// Hash is used to determine whether the Lpa has been changed since last read
Hash uint64 `hash:"-" checkhash:"-"`
// HashVersion is used to determine the fields used to calculate Hash
HashVersion uint8 `hash:"-" checkhash:"-"`
// LpaID identifies the LPA being drafted
LpaID string
// LpaUID is a unique identifier created after sending basic LPA details to the UID service
LpaUID string `dynamodbav:",omitempty"`
// CreatedAt is when the LPA was created
CreatedAt time.Time `checkhash:"-"`
// UpdatedAt is when the LPA was last updated
UpdatedAt time.Time `hash:"-" checkhash:"-"`
// The donor the LPA relates to
Donor Donor
// Attorneys named in the LPA
Attorneys Attorneys
// Information on how the applicant wishes their attorneys to act
AttorneyDecisions AttorneyDecisions
// The certificate provider named in the LPA
CertificateProvider CertificateProvider
// Type of LPA being drafted
Type lpadata.LpaType
// Whether the applicant wants to add replacement attorneys
WantReplacementAttorneys form.YesNo
// When the LPA can be used
WhenCanTheLpaBeUsed lpadata.CanBeUsedWhen
// Preferences on life sustaining treatment (applicable to personal welfare LPAs only)
LifeSustainingTreatmentOption lpadata.LifeSustainingTreatment
// Restrictions on attorneys actions
Restrictions string
// Used to show the task list
Tasks Tasks `checkhash:"-"`
// PaymentDetails are records of payments made for the LPA via GOV.UK Pay
PaymentDetails []Payment `checkhash:"-"`
// Information returned by the identity service related to the Donor or Voucher
IdentityUserData identity.UserData `checkhash:"-"`
// Replacement attorneys named in the LPA
ReplacementAttorneys Attorneys
// Information on how the applicant wishes their replacement attorneys to act
ReplacementAttorneyDecisions AttorneyDecisions
// How to bring in replacement attorneys, if set
HowShouldReplacementAttorneysStepIn lpadata.ReplacementAttorneysStepIn
// Details on how replacement attorneys must step in if HowShouldReplacementAttorneysStepIn is set to "other"
HowShouldReplacementAttorneysStepInDetails string
// Whether the applicant wants to add a correspondent
AddCorrespondent form.YesNo `checkhash:"-"`
// Correspondent is sent updates on an application in place of a (supporter) donor
Correspondent Correspondent `checkhash:"-"`
// Whether the applicant wants to notify people about the application
DoYouWantToNotifyPeople form.YesNo
// People to notify about the application
PeopleToNotify PeopleToNotify
// The AuthorisedSignatory signs on the donor's behalf if they are unable to sign
AuthorisedSignatory AuthorisedSignatory
// The IndependentWitness acts as an additional witness when the LPA is signed
IndependentWitness IndependentWitness
// Confirmation that the applicant wants to apply to register the LPA
WantToApplyForLpa bool `checkhash:"-"`
// Confirmation that the applicant wants to sign the LPA
WantToSignLpa bool `checkhash:"-"`
// CertificateProviderNotRelatedConfirmedAt is when the donor confirmed the
// certificate provider is not related to another similar actor
CertificateProviderNotRelatedConfirmedAt time.Time
// CertificateProviderNotRelatedConfirmedHash is the hash of data that was confirmed by
// CertificateProviderNotRelatedConfirmedAt
CertificateProviderNotRelatedConfirmedHash uint64
// CertificateProviderNotRelatedConfirmedHashVersion is used to determine the
// fields used to calculate CertificateProviderNotRelatedConfirmedHash
CertificateProviderNotRelatedConfirmedHashVersion uint8
// CheckedAt is when the donor checked their LPA
CheckedAt time.Time `checkhash:"-"`
// CheckedHash is the Hash value of the LPA when last checked
CheckedHash uint64 `hash:"-" checkhash:"-"`
// CheckedHashVersion is used to determine the fields used to calculate CheckedHash
CheckedHashVersion uint8 `hash:"-" checkhash:"-"`
// SignedAt is when the donor submitted their signature
SignedAt time.Time `checkhash:"-"`
// WithdrawnAt is when the Lpa was withdrawn by the donor
WithdrawnAt time.Time `checkhash:"-"`
// StatutoryWaitingPeriodAt is when the Lpa transitioned to the
// statutory-waiting-period status in the lpa-store
StatutoryWaitingPeriodAt time.Time `checkhash:"-"`
// DoNotRegisterAt is when the Lpa transitioned to do-not-register status in
// the lpa-store
DoNotRegisterAt time.Time `checkhash:"-"`
// RegisteringWithCourtOfProtection is set when the donor wishes to take the
// Lpa to the Court of Protection for registration.
RegisteringWithCourtOfProtection bool `checkhash:"-"`
// Version is the number of times the LPA has been updated (auto-incremented
// on PUT)
Version int `hash:"-" checkhash:"-"`
// WantVoucher indicates if the donor knows someone who can vouch for them and wants
// then to do so
WantVoucher form.YesNo `checkhash:"-"`
// Voucher is a person the donor has nominated to vouch for their identity
Voucher Voucher `checkhash:"-"`
// VouchAttempts are the number of attempts a voucher has made to confirm the Donors identity
VouchAttempts int `checkhash:"-"`
// FailedVoucher is the last voucher that was unable to vouch for the donor
FailedVoucher Voucher `checkhash:"-"`
// VoucherCodeSentBySMS records the whether the voucher access code was sent
// to the donor by sms (if not it was email).
VoucherCodeSentBySMS bool `checkhash:"-"`
// VoucherCodeSentTo records the mobile number or email address that the
// voucher access code was sent to.
VoucherCodeSentTo string `checkhash:"-"`
// Codes used for the certificate provider to witness signing
CertificateProviderCodes WitnessCodes `checkhash:"-"`
// When the signing was witnessed by the certificate provider
WitnessedByCertificateProviderAt time.Time `checkhash:"-"`
// Codes used for the independent witness to witness signing
IndependentWitnessCodes WitnessCodes `checkhash:"-"`
// When the signing was witnessed by the independent witness
WitnessedByIndependentWitnessAt time.Time `checkhash:"-"`
// Used to rate limit witness code attempts
WitnessCodeLimiter *rate.Limiter `checkhash:"-"`
// FeeType is the type of fee the user is applying for
FeeType pay.FeeType `checkhash:"-"`
// EvidenceDelivery is the method by which the user wants to send evidence
EvidenceDelivery pay.EvidenceDelivery `checkhash:"-"`
// PreviousApplicationNumber if the application is related to an existing application
PreviousApplicationNumber string `checkhash:"-"`
// PreviousFee is the fee previously paid for an LPA, if applying for a repeat
// of an LPA with reference prefixed 7 or have selected HalfFee for
// CostOfRepeatApplication.
PreviousFee pay.PreviousFee `checkhash:"-"`
// CostOfRepeatApplication is the fee the donor believes they are eligible
// for, if applying for a repeat of an LPA with reference prefixed M.
CostOfRepeatApplication pay.CostOfRepeatApplication `checkhash:"-"`
// CertificateProviderInvitedAt records when the invite is sent to the
// certificate provider to act.
CertificateProviderInvitedAt time.Time `checkhash:"-"`
// CertificateProviderInvitedEmail records the email address used to send the
// invite. It will be empty if the certificate provider is using paper.
CertificateProviderInvitedEmail string `checkhash:"-"`
// AttorneysInvitedAt records when the invites are sent to the attorneys.
AttorneysInvitedAt time.Time `checkhash:"-"`
// VoucherInvitedAt records when the invite is sent to the voucher to vouch.
VoucherInvitedAt time.Time `checkhash:"-"`
// DetailsVerifiedByVoucher records that a voucher has verified details supplied by
// the donor match their identity.
DetailsVerifiedByVoucher bool `checkhash:"-"`
// MoreEvidenceRequiredAt records when a request for further information on an
// exemption/remission was received.
MoreEvidenceRequiredAt time.Time `checkhash:"-"`
// PriorityCorrespondenceSentAt records when a caseworker sent a letter to the
// donor informing them of a problem.
PriorityCorrespondenceSentAt time.Time `checkhash:"-"`
// HasSeenSuccessfulVouchBanner records if the donor has seen the progress
// tracker successful vouch banner
HasSeenSuccessfulVouchBanner bool `checkhash:"-"`
// HasSeenReducedFeeApprovalNotification records if the donor has seen the
// progress tracker exemption/remission fee approved banner
HasSeenReducedFeeApprovalNotification bool `checkhash:"-"`
// HasSeenCertificateProviderIdentityMismatchResolvedNotification records if
// the donor has seen the progress tracker certificate provider identity
// confirmed banner
HasSeenCertificateProviderIdentityMismatchResolvedNotification bool `checkhash:"-"`
// ReducedFeeDecisionAt records when an exemption/remission was approved or denied
ReducedFeeDecisionAt time.Time `checkhash:"-"`
// IdentityDetailsCausedCheck is set when details are updated to match
// confirmed identity, and check and send hasn't been done with those new
// details
IdentityDetailsCausedCheck bool `checkhash:"-"`
// ContinueWithMismatchedDetails is set when the donor wishes to continue
// using details that do not match those returned by the identity check.
ContinueWithMismatchedDetails bool `checkhash:"-"`
// LpaStubHash is the hash of data required to generate an LPA UID
LpaStubHash uint64 `hash:"-" checkhash:"-"`
// LpaStubHashVersion is used to determine the fields used to calculate LpaStubHash
LpaStubHashVersion uint8 `hash:"-" checkhash:"-"`
}
Provided contains all the data related to the LPA application
func (*Provided) ActorAddresses ¶ added in v0.1338.0
func (*Provided) Actors ¶ added in v0.1386.0
Actors returns an iterator over all human actors named on the LPA (i.e. this excludes trust corporations, the correspondent, and the voucher).
func (*Provided) AllLayAttorneysFirstNames ¶ added in v0.1338.0
func (*Provided) AllLayAttorneysFullNames ¶ added in v0.1338.0
func (*Provided) AttorneysNames ¶ added in v0.1678.0
AttorneysNames returns the full names of the attorneys and trust corporation.
func (*Provided) CanChange ¶ added in v0.1489.0
CanChange returns true if the donor can make changes to their LPA.
func (*Provided) CanChangePersonalDetails ¶ added in v0.1626.0
CanChangePersonalDetails returns true if the donor can make changes to their FirstNames, LastName or DateOfBirth.
func (*Provided) CanHaveVoucher ¶ added in v0.1400.0
func (*Provided) CertificateProviderDeadline ¶ added in v0.1678.0
CertificateProviderDeadline gives the date at which the certificate provider should act.
func (*Provided) CertificateProviderNotRelatedConfirmedHashChanged ¶ added in v0.1672.0
func (*Provided) CertificateProviderSharesAddress ¶ added in v0.1868.11
CertificateProviderSharesAddress will return true if the address of the certificate provider matches that of the donor or one of the attorneys.
func (*Provided) CertificateProviderSharesLastName ¶ added in v0.1868.11
CertificateProviderSharesLastName will return true if the last name of the certificate provider matches that of the donor or one of the attorneys. For a match we break on '-' to account for double-barrelled names.
func (*Provided) CheckedHashChanged ¶ added in v0.1338.0
func (*Provided) CompletedAllTasks ¶ added in v0.1664.0
func (*Provided) DonorIdentityConfirmed ¶ added in v0.1338.0
func (*Provided) DonorSigningDeadline ¶ added in v0.1741.0
DonorSigningDeadline gives the date at which the LPA should be signed by the donor once identity is confirmed.
func (*Provided) FeeAmount ¶ added in v0.1338.0
func (p *Provided) FeeAmount() pay.AmountPence
func (*Provided) HasCorrespondent ¶ added in v0.1868.122
HasCorrespondent returns whether a correspondent has been fully set on the LPA. For consistency, use this to check whether to send notifications to the correspondent.
func (*Provided) HasTrustCorporation ¶ added in v0.1678.0
func (*Provided) HashChanged ¶ added in v0.1338.0
func (*Provided) HashInclude ¶ added in v0.1338.0
func (*Provided) IdentityDeadline ¶ added in v0.1554.0
IdentityDeadline gives the date which the donor must complete their identity confirmation, otherwise the signature will expire.
func (*Provided) LpaStubHashChanged ¶
func (*Provided) Paid ¶ added in v0.1657.0
func (p *Provided) Paid() pay.AmountPence
func (*Provided) SignatoriesNames ¶ added in v0.1678.0
SignatoriesNames returns the full names of the non-donor actors expected to sign the LPA.
func (*Provided) SigningDeadline ¶ added in v0.1486.0
SigningDeadline gives the date at which the LPA should be signed by the certificate provider and attorneys.
func (*Provided) TrustCorporation ¶ added in v0.1678.0
func (p *Provided) TrustCorporation() TrustCorporation
func (*Provided) Under18ActorDetails ¶ added in v0.1338.0
func (p *Provided) Under18ActorDetails() []Under18ActorDetails
func (*Provided) UpdateCertificateProviderNotRelatedConfirmedHash ¶ added in v0.1672.0
UpdateCertificateProviderNotRelatedConfirmedHash will generate a value that can be compared to check if any fields containing LPA data have changed. Fields that do not contain LPA data, so should be ignored for this calculation, are tagged with `relatedhash:"-"`.
func (*Provided) UpdateCheckedHash ¶ added in v0.1338.0
UpdateCheckedHash will generate a value that can be compared to check if any fields containing LPA data have changed. Fields that do not contain LPA data, so should be ignored for this calculation, are tagged with `checkhash:"-"`.
func (*Provided) UpdateDecisions ¶ added in v0.1560.0
func (p *Provided) UpdateDecisions()
func (*Provided) UpdateHash ¶ added in v0.1338.0
func (*Provided) UpdateLpaStubHash ¶
UpdateLpaStubHash will generate a value that can be compared to check if any fields containing LPA stub data have changed. Fields that do not contain LPA stub data, so should be ignored for this calculation, are tagged with `stubhash:"-"`.
type Tasks ¶ added in v0.1338.0
type Tasks struct {
YourDetails task.State
ChooseAttorneys task.State
ChooseReplacementAttorneys task.State
WhenCanTheLpaBeUsed task.State // property and affairs only
LifeSustainingTreatment task.State // personal welfare only
Restrictions task.State
CertificateProvider task.State
PeopleToNotify task.State
AddCorrespondent task.State
ChooseYourSignatory task.State // if .Donor.CanSign.IsNo only
CheckYourLpa task.State
PayForLpa task.PaymentState
ConfirmYourIdentity task.IdentityState
SignTheLpa task.State
}
type TrustCorporation ¶
type TrustCorporation struct {
// UID for the actor
UID actoruid.UID
// Name of the company
Name string
// Email to contact the company
Email string
// Address of the company
Address place.Address
}
TrustCorporation contains details about a trust corporation, provided by the applicant
func (TrustCorporation) Channel ¶
func (tc TrustCorporation) Channel() lpadata.Channel
type Under18ActorDetails ¶
type Voucher ¶
type WitnessCode ¶
func (WitnessCode) HasExpired ¶
func (w WitnessCode) HasExpired(now time.Time) bool
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, now time.Time) (WitnessCode, bool)
type YesNoMaybe ¶
type YesNoMaybe uint8
const ( Yes YesNoMaybe = iota + 1 No Maybe )
func ParseYesNoMaybe ¶
func ParseYesNoMaybe(s string) (YesNoMaybe, error)
func (YesNoMaybe) Empty ¶
func (i YesNoMaybe) Empty() bool
func (YesNoMaybe) IsMaybe ¶
func (i YesNoMaybe) IsMaybe() bool
func (YesNoMaybe) IsNo ¶
func (i YesNoMaybe) IsNo() bool
func (YesNoMaybe) IsYes ¶
func (i YesNoMaybe) IsYes() bool
func (YesNoMaybe) MarshalText ¶
func (i YesNoMaybe) MarshalText() ([]byte, error)
func (YesNoMaybe) String ¶
func (i YesNoMaybe) String() string
func (*YesNoMaybe) UnmarshalText ¶
func (i *YesNoMaybe) UnmarshalText(text []byte) error
type YesNoMaybeForm ¶ added in v0.1868.17
type YesNoMaybeForm struct {
Option YesNoMaybe
// contains filtered or unexported fields
}
func ReadYesNoMaybeForm ¶ added in v0.1868.17
func ReadYesNoMaybeForm(r *http.Request, errorLabel string) *YesNoMaybeForm
func (*YesNoMaybeForm) Validate ¶ added in v0.1868.17
func (f *YesNoMaybeForm) Validate() validation.List
type YesNoMaybeOptions ¶
type YesNoMaybeOptions struct {
Yes YesNoMaybe
No YesNoMaybe
Maybe YesNoMaybe
}
Source Files
¶
- attorney.go
- attorney_decisions.go
- attorneys.go
- authorised_signatory.go
- certificate_provider.go
- correspondent.go
- donor.go
- enum_certificateproviderrelationshiplength.go
- enum_novoucherdecision.go
- enum_yesnomaybe.go
- independent_witness.go
- no_voucher_decision.go
- payment.go
- people_to_notify.go
- person_to_notify.go
- provided.go
- task_state.go
- trust_corporation.go
- voucher.go
- witness_codes.go
- yes_no_maybe.go