Documentation ¶
Overview ¶
Package lpadata provides types that describe the data used by the LPA store.
Index ¶
- Variables
- type Attorney
- type AttorneyDecisions
- type Attorneys
- type AttorneysAct
- func (i AttorneysAct) Empty() bool
- func (i AttorneysAct) IsJointly() bool
- func (i AttorneysAct) IsJointlyAndSeverally() bool
- func (i AttorneysAct) IsJointlyForSomeSeverallyForOthers() bool
- func (i AttorneysAct) MarshalText() ([]byte, error)
- func (i AttorneysAct) String() string
- func (i *AttorneysAct) UnmarshalText(text []byte) error
- type AttorneysActOptions
- type AuthorisedSignatory
- type CanBeUsedWhen
- type CanBeUsedWhenOptions
- type CertificateProvider
- type CertificateProviderRelationship
- func (i CertificateProviderRelationship) Empty() bool
- func (i CertificateProviderRelationship) IsPersonally() bool
- func (i CertificateProviderRelationship) IsProfessionally() bool
- func (i CertificateProviderRelationship) MarshalText() ([]byte, error)
- func (i CertificateProviderRelationship) String() string
- func (i *CertificateProviderRelationship) UnmarshalText(text []byte) error
- type CertificateProviderRelationshipOptions
- type Channel
- type ChannelOptions
- type Correspondent
- type Donor
- type IdentityCheck
- type IndependentWitness
- type LifeSustainingTreatment
- func (i LifeSustainingTreatment) Empty() bool
- func (i LifeSustainingTreatment) IsOptionA() bool
- func (i LifeSustainingTreatment) IsOptionB() bool
- func (i LifeSustainingTreatment) MarshalText() ([]byte, error)
- func (i LifeSustainingTreatment) String() string
- func (i *LifeSustainingTreatment) UnmarshalText(text []byte) error
- type LifeSustainingTreatmentOptions
- type Lpa
- type LpaType
- type LpaTypeOptions
- type PersonToNotify
- type ReplacementAttorneysStepIn
- func (i ReplacementAttorneysStepIn) Empty() bool
- func (i ReplacementAttorneysStepIn) IsAnotherWay() bool
- func (i ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct() bool
- func (i ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct() bool
- func (i ReplacementAttorneysStepIn) MarshalText() ([]byte, error)
- func (i ReplacementAttorneysStepIn) String() string
- func (i *ReplacementAttorneysStepIn) UnmarshalText(text []byte) error
- type ReplacementAttorneysStepInOptions
- type TrustCorporation
- type TrustCorporationSignatory
- type Voucher
Constants ¶
This section is empty.
Variables ¶
View Source
var AttorneysActValues = AttorneysActOptions{ Jointly: Jointly, JointlyAndSeverally: JointlyAndSeverally, JointlyForSomeSeverallyForOthers: JointlyForSomeSeverallyForOthers, }
View Source
var CanBeUsedWhenValues = CanBeUsedWhenOptions{ CapacityLost: CanBeUsedWhenCapacityLost, HasCapacity: CanBeUsedWhenHasCapacity, }
View Source
var CertificateProviderRelationshipValues = CertificateProviderRelationshipOptions{ Personally: Personally, Professionally: Professionally, }
View Source
var ChannelValues = ChannelOptions{ Paper: ChannelPaper, Online: ChannelOnline, }
View Source
var LifeSustainingTreatmentValues = LifeSustainingTreatmentOptions{ OptionA: LifeSustainingTreatmentOptionA, OptionB: LifeSustainingTreatmentOptionB, }
View Source
var LpaTypeValues = LpaTypeOptions{ PersonalWelfare: LpaTypePersonalWelfare, PropertyAndAffairs: LpaTypePropertyAndAffairs, }
View Source
var ReplacementAttorneysStepInValues = ReplacementAttorneysStepInOptions{ WhenAllCanNoLongerAct: ReplacementAttorneysStepInWhenAllCanNoLongerAct, WhenOneCanNoLongerAct: ReplacementAttorneysStepInWhenOneCanNoLongerAct, AnotherWay: ReplacementAttorneysStepInAnotherWay, }
Functions ¶
This section is empty.
Types ¶
type Attorney ¶ added in v0.1357.0
type AttorneyDecisions ¶ added in v0.1357.0
type AttorneyDecisions struct { How AttorneysAct Details string }
type Attorneys ¶ added in v0.1357.0
type Attorneys struct { Attorneys []Attorney TrustCorporation TrustCorporation }
type AttorneysAct ¶ added in v0.1341.0
type AttorneysAct uint8
const ( // Jointly indicates attorneys or replacement attorneys should act jointly Jointly AttorneysAct = iota + 1 // jointly // JointlyAndSeverally indicates attorneys or replacement attorneys should act // jointly and severally JointlyAndSeverally // jointly-and-severally // JointlyForSomeSeverallyForOthers indicates attorneys or replacement // attorneys should act jointly for some decisions, and jointly and severally // for other decisions JointlyForSomeSeverallyForOthers // jointly-for-some-severally-for-others )
func ParseAttorneysAct ¶ added in v0.1341.0
func ParseAttorneysAct(s string) (AttorneysAct, error)
func (AttorneysAct) Empty ¶ added in v0.1341.0
func (i AttorneysAct) Empty() bool
func (AttorneysAct) IsJointly ¶ added in v0.1341.0
func (i AttorneysAct) IsJointly() bool
func (AttorneysAct) IsJointlyAndSeverally ¶ added in v0.1341.0
func (i AttorneysAct) IsJointlyAndSeverally() bool
func (AttorneysAct) IsJointlyForSomeSeverallyForOthers ¶ added in v0.1341.0
func (i AttorneysAct) IsJointlyForSomeSeverallyForOthers() bool
func (AttorneysAct) MarshalText ¶ added in v0.1341.0
func (i AttorneysAct) MarshalText() ([]byte, error)
func (AttorneysAct) String ¶ added in v0.1341.0
func (i AttorneysAct) String() string
func (*AttorneysAct) UnmarshalText ¶ added in v0.1341.0
func (i *AttorneysAct) UnmarshalText(text []byte) error
type AttorneysActOptions ¶ added in v0.1341.0
type AttorneysActOptions struct { Jointly AttorneysAct JointlyAndSeverally AttorneysAct JointlyForSomeSeverallyForOthers AttorneysAct }
type AuthorisedSignatory ¶ added in v0.1446.0
func (AuthorisedSignatory) FullName ¶ added in v0.1446.0
func (a AuthorisedSignatory) FullName() string
type CanBeUsedWhen ¶ added in v0.1341.0
type CanBeUsedWhen uint8
const ( CanBeUsedWhenCapacityLost CanBeUsedWhen = iota + 1 // when-capacity-lost CanBeUsedWhenHasCapacity // when-has-capacity )
func ParseCanBeUsedWhen ¶ added in v0.1341.0
func ParseCanBeUsedWhen(s string) (CanBeUsedWhen, error)
func (CanBeUsedWhen) Empty ¶ added in v0.1450.0
func (i CanBeUsedWhen) Empty() bool
func (CanBeUsedWhen) IsCapacityLost ¶ added in v0.1341.0
func (i CanBeUsedWhen) IsCapacityLost() bool
func (CanBeUsedWhen) IsHasCapacity ¶ added in v0.1341.0
func (i CanBeUsedWhen) IsHasCapacity() bool
func (CanBeUsedWhen) MarshalText ¶ added in v0.1341.0
func (i CanBeUsedWhen) MarshalText() ([]byte, error)
func (CanBeUsedWhen) String ¶ added in v0.1341.0
func (i CanBeUsedWhen) String() string
func (*CanBeUsedWhen) UnmarshalText ¶ added in v0.1341.0
func (i *CanBeUsedWhen) UnmarshalText(text []byte) error
type CanBeUsedWhenOptions ¶ added in v0.1341.0
type CanBeUsedWhenOptions struct { CapacityLost CanBeUsedWhen HasCapacity CanBeUsedWhen }
type CertificateProvider ¶ added in v0.1357.0
type CertificateProvider struct { UID actoruid.UID `json:"uid"` FirstNames string `json:"firstNames"` LastName string `json:"lastName"` Email string `json:"email,omitempty"` Phone string `json:"phone,omitempty"` Address place.Address `json:"address"` Channel Channel `json:"channel"` SignedAt time.Time `json:"signedAt"` ContactLanguagePreference localize.Lang `json:"contactLanguagePreference"` IdentityCheck IdentityCheck `json:"identityCheck"` // Relationship is not stored in the lpa-store so is defaulted to // Professional. We require it to determine whether to show the home address // page to a certificate provider. Relationship CertificateProviderRelationship }
func (CertificateProvider) FullName ¶ added in v0.1357.0
func (c CertificateProvider) FullName() string
type CertificateProviderRelationship ¶ added in v0.1341.0
type CertificateProviderRelationship uint8
const ( Personally CertificateProviderRelationship = iota + 1 // personally Professionally // professionally )
func ParseCertificateProviderRelationship ¶ added in v0.1341.0
func ParseCertificateProviderRelationship(s string) (CertificateProviderRelationship, error)
func (CertificateProviderRelationship) Empty ¶ added in v0.1341.0
func (i CertificateProviderRelationship) Empty() bool
func (CertificateProviderRelationship) IsPersonally ¶ added in v0.1341.0
func (i CertificateProviderRelationship) IsPersonally() bool
func (CertificateProviderRelationship) IsProfessionally ¶ added in v0.1341.0
func (i CertificateProviderRelationship) IsProfessionally() bool
func (CertificateProviderRelationship) MarshalText ¶ added in v0.1341.0
func (i CertificateProviderRelationship) MarshalText() ([]byte, error)
func (CertificateProviderRelationship) String ¶ added in v0.1341.0
func (i CertificateProviderRelationship) String() string
func (*CertificateProviderRelationship) UnmarshalText ¶ added in v0.1341.0
func (i *CertificateProviderRelationship) UnmarshalText(text []byte) error
type CertificateProviderRelationshipOptions ¶ added in v0.1341.0
type CertificateProviderRelationshipOptions struct { Personally CertificateProviderRelationship Professionally CertificateProviderRelationship }
type Channel ¶ added in v0.1341.0
type Channel uint8
func ParseChannel ¶ added in v0.1341.0
func (Channel) MarshalText ¶ added in v0.1341.0
func (*Channel) UnmarshalText ¶ added in v0.1341.0
type ChannelOptions ¶ added in v0.1341.0
type Correspondent ¶ added in v0.1357.0
func (Correspondent) FullName ¶ added in v0.1357.0
func (c Correspondent) FullName() string
type Donor ¶ added in v0.1357.0
type Donor struct { UID actoruid.UID FirstNames string LastName string Email string OtherNames string DateOfBirth date.Date Address place.Address Channel Channel ContactLanguagePreference localize.Lang IdentityCheck IdentityCheck // Mobile is only set for online donors who have provided one Mobile string }
type IdentityCheck ¶ added in v0.1357.0
type IndependentWitness ¶ added in v0.1437.0
type IndependentWitness struct { UID actoruid.UID FirstNames string LastName string Mobile string Address place.Address }
func (IndependentWitness) FullName ¶ added in v0.1437.0
func (w IndependentWitness) FullName() string
type LifeSustainingTreatment ¶ added in v0.1341.0
type LifeSustainingTreatment uint8
const ( LifeSustainingTreatmentOptionA LifeSustainingTreatment = iota + 1 // option-a LifeSustainingTreatmentOptionB // option-b )
func ParseLifeSustainingTreatment ¶ added in v0.1341.0
func ParseLifeSustainingTreatment(s string) (LifeSustainingTreatment, error)
func (LifeSustainingTreatment) Empty ¶ added in v0.1341.0
func (i LifeSustainingTreatment) Empty() bool
func (LifeSustainingTreatment) IsOptionA ¶ added in v0.1341.0
func (i LifeSustainingTreatment) IsOptionA() bool
func (LifeSustainingTreatment) IsOptionB ¶ added in v0.1341.0
func (i LifeSustainingTreatment) IsOptionB() bool
func (LifeSustainingTreatment) MarshalText ¶ added in v0.1341.0
func (i LifeSustainingTreatment) MarshalText() ([]byte, error)
func (LifeSustainingTreatment) String ¶ added in v0.1341.0
func (i LifeSustainingTreatment) String() string
func (*LifeSustainingTreatment) UnmarshalText ¶ added in v0.1341.0
func (i *LifeSustainingTreatment) UnmarshalText(text []byte) error
type LifeSustainingTreatmentOptions ¶ added in v0.1341.0
type LifeSustainingTreatmentOptions struct { OptionA LifeSustainingTreatment OptionB LifeSustainingTreatment }
type Lpa ¶ added in v0.1357.0
type Lpa struct { LpaKey dynamo.LpaKeyType LpaOwnerKey dynamo.LpaOwnerKeyType LpaID string LpaUID string RegisteredAt time.Time WithdrawnAt time.Time StatutoryWaitingPeriodAt time.Time UpdatedAt time.Time Type LpaType Donor Donor Attorneys Attorneys ReplacementAttorneys Attorneys CertificateProvider CertificateProvider PeopleToNotify []PersonToNotify AttorneyDecisions AttorneyDecisions ReplacementAttorneyDecisions AttorneyDecisions HowShouldReplacementAttorneysStepIn ReplacementAttorneysStepIn HowShouldReplacementAttorneysStepInDetails string Restrictions string WhenCanTheLpaBeUsed CanBeUsedWhen LifeSustainingTreatmentOption LifeSustainingTreatment AuthorisedSignatory AuthorisedSignatory IndependentWitness IndependentWitness // SignedAt is when the donor signed their LPA. SignedAt time.Time // WitnessedByCertificateProviderAt is when the certificate provider signed to // say they witnessed the donor signing the LPA. WitnessedByCertificateProviderAt time.Time // WitnessedByIndependentWitnessAt is when the independent witness signed to // say they witnessed the LPA being signed on the donor's behalf, if the donor // said they were unable to sign themselves. WitnessedByIndependentWitnessAt time.Time // CertificateProviderNotRelatedConfirmedAt is when the donor confirmed that // the certificate provider is not related to them, if they have similar // details. CertificateProviderNotRelatedConfirmedAt time.Time // Submitted is set if SubmittedAt is non-zero for online applications, or set // to true for paper applications. Submitted bool // Paid is set if the PayForLpa task has been completed for online // applications, or set to true for paper applications as to be in the // lpa-store the application payment must be complete. Paid bool // IsOrganisationDonor is set to true when the Lpa is being made by a // supporter working for an organisation. IsOrganisationDonor bool // Drafted is set if the CheckYourLpa task has been completed for online // applications, or set to true for paper applications. Drafted bool // CannotRegister is set to true if the status in the lpa-store is // cannot-register. CannotRegister bool // Correspondent is set using the data provided by the donor for online // applications, but is not set for paper applications. Correspondent Correspondent // Voucher is set using the data provided by the donor for online // applications, but is not set for paper applications. Voucher Voucher }
func (Lpa) Actors ¶ added in v0.1382.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 (Lpa) AllAttorneysSigned ¶ added in v0.1357.0
func (*Lpa) CorrespondentEmail ¶ added in v0.1357.0
func (*Lpa) SignedForDonor ¶ added in v0.1470.0
SignedForDonor returns true if the Lpa has been signed and witnessed for the donor.
type LpaType ¶
type LpaType uint8
func ParseLpaType ¶
func (LpaType) IsPersonalWelfare ¶
func (LpaType) IsPropertyAndAffairs ¶
func (LpaType) MarshalText ¶
func (*LpaType) UnmarshalText ¶
func (LpaType) WhatLPACoversTransKey ¶
TODO: move this somewhere else
type LpaTypeOptions ¶
type PersonToNotify ¶ added in v0.1357.0
type PersonToNotify struct { UID actoruid.UID FirstNames string LastName string Address place.Address }
func (PersonToNotify) FullName ¶ added in v0.1357.0
func (p PersonToNotify) FullName() string
type ReplacementAttorneysStepIn ¶ added in v0.1341.0
type ReplacementAttorneysStepIn uint8
const ( ReplacementAttorneysStepInWhenAllCanNoLongerAct ReplacementAttorneysStepIn = iota + 1 // all-can-no-longer-act ReplacementAttorneysStepInWhenOneCanNoLongerAct // one-can-no-longer-act ReplacementAttorneysStepInAnotherWay // another-way )
func ParseReplacementAttorneysStepIn ¶ added in v0.1341.0
func ParseReplacementAttorneysStepIn(s string) (ReplacementAttorneysStepIn, error)
func (ReplacementAttorneysStepIn) Empty ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) Empty() bool
func (ReplacementAttorneysStepIn) IsAnotherWay ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) IsAnotherWay() bool
func (ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct() bool
func (ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct() bool
func (ReplacementAttorneysStepIn) MarshalText ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) MarshalText() ([]byte, error)
func (ReplacementAttorneysStepIn) String ¶ added in v0.1341.0
func (i ReplacementAttorneysStepIn) String() string
func (*ReplacementAttorneysStepIn) UnmarshalText ¶ added in v0.1341.0
func (i *ReplacementAttorneysStepIn) UnmarshalText(text []byte) error
type ReplacementAttorneysStepInOptions ¶ added in v0.1341.0
type ReplacementAttorneysStepInOptions struct { WhenAllCanNoLongerAct ReplacementAttorneysStepIn WhenOneCanNoLongerAct ReplacementAttorneysStepIn AnotherWay ReplacementAttorneysStepIn }
type TrustCorporation ¶ added in v0.1357.0
type TrustCorporationSignatory ¶ added in v0.1357.0
type TrustCorporationSignatory struct { FirstNames string `json:"firstNames"` LastName string `json:"lastName"` ProfessionalTitle string `json:"professionalTitle"` SignedAt time.Time `json:"signedAt"` }
func (TrustCorporationSignatory) FullName ¶ added in v0.1437.0
func (s TrustCorporationSignatory) FullName() string
Source Files ¶
- attorney.go
- attorney_decisions.go
- attorneys.go
- attorneys_act.go
- authorised_signatory.go
- can_be_used_when.go
- certificate_provider.go
- certificate_provider_relationship.go
- channel.go
- correspondent.go
- doc.go
- donor.go
- enum_attorneysact.go
- enum_canbeusedwhen.go
- enum_certificateproviderrelationship.go
- enum_channel.go
- enum_lifesustainingtreatment.go
- enum_lpatype.go
- enum_replacementattorneysstepin.go
- identity_check.go
- independent_witness.go
- life_sustaining_treatment.go
- lpa.go
- lpa_type.go
- person_to_notify.go
- replacement_attorneys_step_in.go
- trust_corporation.go
- trust_corporation_signatory.go
- voucher.go
Click to show internal directories.
Click to hide internal directories.