actor

package
v0.1167.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Code generated by "enumerator -type AttorneysAct -linecomment -empty"; DO NOT EDIT.

Code generated by "enumerator -type CanBeUsedWhen -linecomment -trimprefix"; DO NOT EDIT.

Code generated by "enumerator -type CertificateProviderRelationship -linecomment -empty"; DO NOT EDIT.

Code generated by "enumerator -type CertificateProviderRelationshipLength -linecomment"; DO NOT EDIT.

Code generated by "enumerator -type Channel -linecomment -empty -trimprefix"; DO NOT EDIT.

Code generated by "enumerator -type CorrespondentShare -linecomment -trimprefix -empty -bits"; 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 PaymentTask -trimprefix"; DO NOT EDIT.

Code generated by "enumerator -type Permission -linecomment -trimprefix"; DO NOT EDIT.

Code generated by "enumerator -type ReplacementAttorneysStepIn -linecomment -trimprefix -empty"; DO NOT EDIT.

Code generated by "enumerator -type Status -linecomment -trimprefix"; DO NOT EDIT.

Code generated by "enumerator -type YesNoMaybe -linecomment -empty"; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var ActorTypes = Types{
	None:                        TypeNone,
	Donor:                       TypeDonor,
	Attorney:                    TypeAttorney,
	ReplacementAttorney:         TypeReplacementAttorney,
	TrustCorporation:            TypeTrustCorporation,
	ReplacementTrustCorporation: TypeReplacementTrustCorporation,
	CertificateProvider:         TypeCertificateProvider,
	PersonToNotify:              TypePersonToNotify,
	AuthorisedSignatory:         TypeAuthorisedSignatory,
	IndependentWitness:          TypeIndependentWitness,
}
View Source
var AttorneysActValues = AttorneysActOptions{
	Jointly:                          Jointly,
	JointlyAndSeverally:              JointlyAndSeverally,
	JointlyForSomeSeverallyForOthers: JointlyForSomeSeverallyForOthers,
}
View Source
var CanBeUsedWhenValues = CanBeUsedWhenOptions{
	Unknown:      CanBeUsedWhenUnknown,
	CapacityLost: CanBeUsedWhenCapacityLost,
	HasCapacity:  CanBeUsedWhenHasCapacity,
}
View Source
var CertificateProviderRelationshipLengthValues = CertificateProviderRelationshipLengthOptions{
	RelationshipLengthUnknown:  RelationshipLengthUnknown,
	LessThanTwoYears:           LessThanTwoYears,
	GreaterThanEqualToTwoYears: GreaterThanEqualToTwoYears,
}
View Source
var CertificateProviderRelationshipValues = CertificateProviderRelationshipOptions{
	Personally:     Personally,
	Professionally: Professionally,
}
View Source
var ChannelValues = ChannelOptions{
	Paper:  ChannelPaper,
	Online: ChannelOnline,
}
View Source
var CorrespondentShareValues = CorrespondentShareOptions{
	Attorneys:           CorrespondentShareAttorneys,
	CertificateProvider: CorrespondentShareCertificateProvider,
}
View Source
var LpaTypeValues = LpaTypeOptions{
	PersonalWelfare:    LpaTypePersonalWelfare,
	PropertyAndAffairs: LpaTypePropertyAndAffairs,
}
View Source
var PaymentTaskValues = PaymentTaskOptions{
	NotStarted:           PaymentTaskNotStarted,
	InProgress:           PaymentTaskInProgress,
	Completed:            PaymentTaskCompleted,
	Pending:              PaymentTaskPending,
	Denied:               PaymentTaskDenied,
	MoreEvidenceRequired: PaymentTaskMoreEvidenceRequired,
}
View Source
var PermissionValues = PermissionOptions{
	None:  PermissionNone,
	Admin: PermissionAdmin,
}
View Source
var StatusValues = StatusOptions{
	Active:    StatusActive,
	Suspended: StatusSuspended,
}
View Source
var YesNoMaybeValues = YesNoMaybeOptions{
	Yes:   Yes,
	No:    No,
	Maybe: Maybe,
}

Functions

This section is empty.

Types

type Attorney

type Attorney struct {
	// UID for the actor
	UID actoruid.UID
	// First names of the attorney
	FirstNames string
	// Last name of the attorney
	LastName string
	// Email of the attorney
	Email string
	// Date of birth of the attorney
	DateOfBirth date.Date
	// Address of the attorney
	Address place.Address
}

Attorney contains details about an attorney or replacement attorney, provided by the applicant

func (Attorney) Channel added in v0.1157.0

func (a Attorney) Channel() Channel

func (Attorney) FullName

func (a Attorney) FullName() string

type AttorneyDecisions

type AttorneyDecisions struct {
	// How attorneys should make decisions
	How 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 MakeAttorneyDecisions

func MakeAttorneyDecisions(existing AttorneyDecisions, how AttorneysAct, details string) AttorneyDecisions

func (AttorneyDecisions) IsComplete

func (d AttorneyDecisions) IsComplete() bool

type AttorneyProvidedDetails

type AttorneyProvidedDetails struct {
	PK dynamo.LpaKeyType
	SK dynamo.AttorneyKeyType
	// The identifier of the attorney or replacement attorney being edited
	UID actoruid.UID
	// The identifier of the LPA the attorney or replacement attorney is named in
	LpaID string
	// Tracking when AttorneyProvidedDetails is updated
	UpdatedAt time.Time
	// IsReplacement is true when the details relate to an attorney appointed as a
	// replacement
	IsReplacement bool
	// IsTrustCorporation is true when the details relate to a trust corporation
	IsTrustCorporation bool
	// Mobile number of the attorney or replacement attorney
	Mobile string
	// Confirming the attorney or replacement attorney agrees to responsibilities
	// and confirms the tick box is a legal signature
	Confirmed time.Time
	// WouldLikeSecondSignatory captures whether two signatories will be used for a trust corporation
	WouldLikeSecondSignatory form.YesNo
	// AuthorisedSignatories captures the details of the person who signed on
	// behalf of a trust corporation, if one is acting as an attorney
	AuthorisedSignatories [2]TrustCorporationSignatory
	// Used to show attorney task list
	Tasks AttorneyTasks
	// ContactLanguagePreference is the language the attorney or replacement attorney prefers to receive notifications in
	ContactLanguagePreference localize.Lang
	// Email is the email address returned from OneLogin when the attorney logged in
	Email string
}

AttorneyProvidedDetails contains details about an attorney or replacement attorney, provided by the attorney or replacement attorney

func (AttorneyProvidedDetails) Signed added in v0.718.0

func (d AttorneyProvidedDetails) Signed(after time.Time) bool

Signed checks whether the attorney has confirmed and if that confirmation is still valid by checking that it was made for the donor's current signature.

type AttorneyTasks

type AttorneyTasks struct {
	ConfirmYourDetails TaskState
	ReadTheLpa         TaskState
	SignTheLpa         TaskState
	SignTheLpaSecond   TaskState
}

type Attorneys

type Attorneys struct {
	TrustCorporation TrustCorporation
	Attorneys        []Attorney
}

func (Attorneys) Addresses

func (as Attorneys) Addresses() []place.Address

func (Attorneys) Complete

func (as Attorneys) Complete() bool

func (*Attorneys) Delete

func (as *Attorneys) Delete(attorney Attorney) bool

func (Attorneys) FirstNames

func (as Attorneys) FirstNames() []string

func (Attorneys) FullNames

func (as Attorneys) FullNames() []string

func (Attorneys) Get

func (as Attorneys) Get(uid actoruid.UID) (Attorney, bool)

func (*Attorneys) Index added in v0.926.0

func (as *Attorneys) Index(uid actoruid.UID) int

func (Attorneys) Len

func (as Attorneys) Len() int

func (*Attorneys) Put

func (as *Attorneys) Put(attorney Attorney)

type AttorneysAct

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

func ParseAttorneysAct(s string) (AttorneysAct, error)

func (AttorneysAct) Empty

func (i AttorneysAct) Empty() bool

func (AttorneysAct) IsJointly

func (i AttorneysAct) IsJointly() bool

func (AttorneysAct) IsJointlyAndSeverally

func (i AttorneysAct) IsJointlyAndSeverally() bool

func (AttorneysAct) IsJointlyForSomeSeverallyForOthers

func (i AttorneysAct) IsJointlyForSomeSeverallyForOthers() bool

func (AttorneysAct) MarshalText added in v0.912.0

func (i AttorneysAct) MarshalText() ([]byte, error)

func (AttorneysAct) String

func (i AttorneysAct) String() string

func (*AttorneysAct) UnmarshalText added in v0.1095.0

func (i *AttorneysAct) UnmarshalText(text []byte) error

type AttorneysActOptions

type AttorneysActOptions struct {
	Jointly                          AttorneysAct
	JointlyAndSeverally              AttorneysAct
	JointlyForSomeSeverallyForOthers AttorneysAct
}

type AuthorisedSignatory

type AuthorisedSignatory struct {
	FirstNames string
	LastName   string
}

AuthorisedSignatory contains details of the person who will sign the LPA on the donor's behalf

func (AuthorisedSignatory) FullName added in v0.686.0

func (s AuthorisedSignatory) FullName() string

type CanBeUsedWhen added in v0.836.0

type CanBeUsedWhen uint8
const (
	CanBeUsedWhenUnknown      CanBeUsedWhen = iota
	CanBeUsedWhenCapacityLost               // when-capacity-lost
	CanBeUsedWhenHasCapacity                // when-has-capacity
)

func ParseCanBeUsedWhen added in v0.836.0

func ParseCanBeUsedWhen(s string) (CanBeUsedWhen, error)

func (CanBeUsedWhen) IsCapacityLost added in v0.836.0

func (i CanBeUsedWhen) IsCapacityLost() bool

func (CanBeUsedWhen) IsHasCapacity added in v0.836.0

func (i CanBeUsedWhen) IsHasCapacity() bool

func (CanBeUsedWhen) IsUnknown added in v0.838.0

func (i CanBeUsedWhen) IsUnknown() bool

func (CanBeUsedWhen) MarshalText added in v0.912.0

func (i CanBeUsedWhen) MarshalText() ([]byte, error)

func (CanBeUsedWhen) String added in v0.836.0

func (i CanBeUsedWhen) String() string

func (*CanBeUsedWhen) UnmarshalText added in v0.1095.0

func (i *CanBeUsedWhen) UnmarshalText(text []byte) error

type CanBeUsedWhenOptions added in v0.836.0

type CanBeUsedWhenOptions struct {
	Unknown      CanBeUsedWhen
	CapacityLost CanBeUsedWhen
	HasCapacity  CanBeUsedWhen
}

type Certificate

type Certificate struct {
	// Confirmation the certificate provider agrees to the 'provide a certificate' statement and that ticking box is a legal signature
	AgreeToStatement bool
	// Date and time the certificate provider provided the certificate
	Agreed time.Time
}

type CertificateProvider

type CertificateProvider struct {
	// UID for the actor
	UID actoruid.UID
	// First names of the certificate provider
	FirstNames string
	// Last name of the certificate provider
	LastName string
	// Address of the certificate provider
	Address place.Address
	// Mobile number of the certificate provider, used to send witness codes
	Mobile string
	// HasNonUKMobile indicates whether the value of Mobile is a non-UK mobile number
	HasNonUKMobile bool
	// Email of the certificate provider
	Email string
	// How the certificate provider wants to perform their role (paper or online)
	CarryOutBy Channel
	// The certificate provider's relationship to the applicant
	Relationship CertificateProviderRelationship
	// Amount of time Relationship has been in place if Personally
	RelationshipLength CertificateProviderRelationshipLength
}

CertificateProvider contains details about the certificate provider, provided by the applicant

func (CertificateProvider) FullName

func (c CertificateProvider) FullName() string

type CertificateProviderProvidedDetails

type CertificateProviderProvidedDetails struct {
	PK dynamo.LpaKeyType
	SK dynamo.CertificateProviderKeyType
	// UID of the actor
	UID actoruid.UID
	// The identifier of the LPA the certificate provider is providing a certificate for
	LpaID string
	// Tracking when CertificateProviderProvidedDetails is updated
	UpdatedAt time.Time
	// Date of birth of the certificate provider
	DateOfBirth date.Date
	// HomeAddress is the personal address of the certificate provider
	HomeAddress place.Address
	// Data returned from an identity check
	IdentityUserData identity.UserData
	// Details of the certificate provided to the applicant
	Certificate Certificate
	// Tasks the certificate provider will complete
	Tasks CertificateProviderTasks
	// ContactLanguagePreference is the language the certificate provider prefers to receive notifications in
	ContactLanguagePreference localize.Lang
	// Email is the email address returned from OneLogin when the certificate provider logged in
	Email string
}

CertificateProviderProvidedDetails contains details about the certificate provider, provided by the certificate provider

func (*CertificateProviderProvidedDetails) CertificateProviderIdentityConfirmed

func (c *CertificateProviderProvidedDetails) CertificateProviderIdentityConfirmed(firstNames, lastName string) bool

func (CertificateProviderProvidedDetails) Signed added in v0.742.0

type CertificateProviderRelationship

type CertificateProviderRelationship uint8
const (
	Personally     CertificateProviderRelationship = iota + 1 // personally
	Professionally                                            // professionally
)

func ParseCertificateProviderRelationship

func ParseCertificateProviderRelationship(s string) (CertificateProviderRelationship, error)

func (CertificateProviderRelationship) Empty

func (CertificateProviderRelationship) IsPersonally

func (i CertificateProviderRelationship) IsPersonally() bool

func (CertificateProviderRelationship) IsProfessionally

func (i CertificateProviderRelationship) IsProfessionally() bool

func (CertificateProviderRelationship) MarshalText added in v0.912.0

func (i CertificateProviderRelationship) MarshalText() ([]byte, error)

func (CertificateProviderRelationship) String

func (*CertificateProviderRelationship) UnmarshalText added in v0.1095.0

func (i *CertificateProviderRelationship) UnmarshalText(text []byte) error

type CertificateProviderRelationshipLength added in v0.819.0

type CertificateProviderRelationshipLength uint8
const (
	RelationshipLengthUnknown  CertificateProviderRelationshipLength = iota // unknown
	LessThanTwoYears                                                        // lt-2-years
	GreaterThanEqualToTwoYears                                              // gte-2-years
)

func ParseCertificateProviderRelationshipLength added in v0.819.0

func ParseCertificateProviderRelationshipLength(s string) (CertificateProviderRelationshipLength, error)

func (CertificateProviderRelationshipLength) IsGreaterThanEqualToTwoYears added in v0.819.0

func (i CertificateProviderRelationshipLength) IsGreaterThanEqualToTwoYears() bool

func (CertificateProviderRelationshipLength) IsLessThanTwoYears added in v0.819.0

func (i CertificateProviderRelationshipLength) IsLessThanTwoYears() bool

func (CertificateProviderRelationshipLength) IsRelationshipLengthUnknown added in v0.819.0

func (i CertificateProviderRelationshipLength) IsRelationshipLengthUnknown() bool

func (CertificateProviderRelationshipLength) MarshalText added in v0.912.0

func (i CertificateProviderRelationshipLength) MarshalText() ([]byte, error)

func (CertificateProviderRelationshipLength) String added in v0.819.0

func (*CertificateProviderRelationshipLength) UnmarshalText added in v0.1095.0

func (i *CertificateProviderRelationshipLength) UnmarshalText(text []byte) error

type CertificateProviderRelationshipLengthOptions added in v0.819.0

type CertificateProviderRelationshipLengthOptions struct {
	RelationshipLengthUnknown  CertificateProviderRelationshipLength
	LessThanTwoYears           CertificateProviderRelationshipLength
	GreaterThanEqualToTwoYears CertificateProviderRelationshipLength
}

type CertificateProviderRelationshipOptions

type CertificateProviderRelationshipOptions struct {
	Personally     CertificateProviderRelationship
	Professionally CertificateProviderRelationship
}

type CertificateProviderTasks

type CertificateProviderTasks struct {
	ConfirmYourDetails    TaskState
	ConfirmYourIdentity   TaskState
	ReadTheLpa            TaskState
	ProvideTheCertificate TaskState
}

type Channel added in v0.1127.0

type Channel uint8
const (
	ChannelPaper  Channel = iota + 1 // paper
	ChannelOnline                    // online
)

func ParseChannel added in v0.1127.0

func ParseChannel(s string) (Channel, error)

func (Channel) Empty added in v0.1127.0

func (i Channel) Empty() bool

func (Channel) IsOnline added in v0.1127.0

func (i Channel) IsOnline() bool

func (Channel) IsPaper added in v0.1127.0

func (i Channel) IsPaper() bool

func (Channel) MarshalText added in v0.1127.0

func (i Channel) MarshalText() ([]byte, error)

func (Channel) String added in v0.1127.0

func (i Channel) String() string

func (*Channel) UnmarshalText added in v0.1127.0

func (i *Channel) UnmarshalText(text []byte) error

type ChannelOptions added in v0.1127.0

type ChannelOptions struct {
	Paper  Channel
	Online Channel
}

type Correspondent added in v0.1105.0

type Correspondent struct {
	FirstNames   string
	LastName     string
	Email        string
	Organisation string
	Telephone    string
	WantAddress  form.YesNo
	Address      place.Address
	Share        CorrespondentShare
}

func (Correspondent) FullName added in v0.1105.0

func (c Correspondent) FullName() string

type CorrespondentShare added in v0.1105.0

type CorrespondentShare uint8
const (
	CorrespondentShareAttorneys CorrespondentShare = 2 << iota
	CorrespondentShareCertificateProvider
)

func ParseCorrespondentShare added in v0.1105.0

func ParseCorrespondentShare(strs []string) (CorrespondentShare, error)

func (CorrespondentShare) Empty added in v0.1105.0

func (i CorrespondentShare) Empty() bool

func (CorrespondentShare) HasAttorneys added in v0.1105.0

func (i CorrespondentShare) HasAttorneys() bool

func (CorrespondentShare) HasCertificateProvider added in v0.1105.0

func (i CorrespondentShare) HasCertificateProvider() bool

func (CorrespondentShare) String added in v0.1105.0

func (i CorrespondentShare) String() string

func (CorrespondentShare) Strings added in v0.1105.0

func (i CorrespondentShare) Strings() []string

type CorrespondentShareOptions added in v0.1105.0

type CorrespondentShareOptions struct {
	Attorneys           CorrespondentShare
	CertificateProvider CorrespondentShare
}

type Donor

type Donor struct {
	// UID for the actor
	UID actoruid.UID
	// First names of the donor
	FirstNames string
	// Last name of the donor
	LastName string
	// Email of the donor
	Email string
	// Other names the donor is known by
	OtherNames string
	// Date of birth of the donor
	DateOfBirth date.Date
	// Address of the donor
	Address place.Address
	// ThinksCanSign is what the donor thinks about their ability to sign online
	ThinksCanSign YesNoMaybe
	// CanSign is Yes if the donor has said they will sign online
	CanSign form.YesNo
	// Channel is how the Donor is applying for their LPA (paper or online)
	Channel Channel
	// ContactLanguagePreference is the language the donor prefers to receive notifications in
	ContactLanguagePreference localize.Lang
}

Donor contains details about the donor, provided by the applicant

func (Donor) FullName

func (d Donor) FullName() string

type DonorProvidedDetails added in v0.837.0

type DonorProvidedDetails struct {
	PK dynamo.LpaKeyType      `hash:"-"`
	SK dynamo.LpaOwnerKeyType `hash:"-"`
	// Hash is used to determine whether the Lpa has been changed since last read
	Hash uint64 `hash:"-"`
	// 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
	// UpdatedAt is when the LPA was last updated
	UpdatedAt time.Time `hash:"-"`
	// 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 LpaType
	// 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 DonorTasks
	// PaymentDetails are records of payments made for the LPA via GOV.UK Pay
	PaymentDetails []Payment
	// Information returned by the identity service related to the applicant
	DonorIdentityUserData identity.UserData
	// 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 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
	// Correspondent is sent updates on an application in place of a (supporter) donor
	Correspondent Correspondent
	// 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
	// Confirmation that the applicant wants to sign the LPA
	WantToSignLpa bool
	// CertificateProviderNotRelatedConfirmedAt is when the donor confirmed the
	// certificate provider is not related to another similar actor
	CertificateProviderNotRelatedConfirmedAt time.Time
	// CheckedAt is when the donor checked their LPA
	CheckedAt time.Time
	// CheckedHash is the Hash value of the LPA when last checked
	CheckedHash uint64 `hash:"-"`
	// SignedAt is when the donor submitted their signature
	SignedAt time.Time
	// SubmittedAt is when the Lpa was sent to the OPG
	SubmittedAt time.Time
	// WithdrawnAt is when the Lpa was withdrawn by the donor
	WithdrawnAt time.Time
	// PerfectAt is when the Lpa transitioned to the PERFECT status in the lpa-store
	PerfectAt time.Time
	// Version is the number of times the LPA has been updated (auto-incremented on PUT)
	Version int `hash:"-"`

	// Codes used for the certificate provider to witness signing
	CertificateProviderCodes WitnessCodes
	// When the signing was witnessed by the certificate provider
	WitnessedByCertificateProviderAt time.Time
	// Codes used for the independent witness to witness signing
	IndependentWitnessCodes WitnessCodes
	// When the signing was witnessed by the independent witness
	WitnessedByIndependentWitnessAt time.Time
	// Used to rate limit witness code attempts
	WitnessCodeLimiter *Limiter

	// FeeType is the type of fee the user is applying for
	FeeType pay.FeeType
	// EvidenceDelivery is the method by which the user wants to send evidence
	EvidenceDelivery pay.EvidenceDelivery
	// PreviousApplicationNumber if the application is related to an existing application
	PreviousApplicationNumber string
	// PreviousFee is the fee previously paid for an LPA
	PreviousFee pay.PreviousFee

	HasSentUidRequestedEvent              bool `hash:"-"`
	HasSentApplicationUpdatedEvent        bool `hash:"-"`
	HasSentPreviousApplicationLinkedEvent bool `hash:"-"`
}

DonorProvidedDetails contains all the data related to the LPA application

func (*DonorProvidedDetails) ActorAddresses added in v0.837.0

func (l *DonorProvidedDetails) ActorAddresses() []place.Address

func (*DonorProvidedDetails) AllLayAttorneysFirstNames added in v0.837.0

func (l *DonorProvidedDetails) AllLayAttorneysFirstNames() []string

func (*DonorProvidedDetails) AllLayAttorneysFullNames added in v0.837.0

func (l *DonorProvidedDetails) AllLayAttorneysFullNames() []string

func (*DonorProvidedDetails) AttorneysAndCpSigningDeadline added in v0.837.0

func (l *DonorProvidedDetails) AttorneysAndCpSigningDeadline() time.Time

func (*DonorProvidedDetails) CertificateProviderSharesDetails added in v0.837.0

func (l *DonorProvidedDetails) CertificateProviderSharesDetails() bool

CertificateProviderSharesDetails will return true if the last name or address of the certificate provider matches that of the donor or one of the attorneys. For a match of the last name we break on '-' to account for double-barrelled names.

func (*DonorProvidedDetails) Cost added in v0.837.0

func (l *DonorProvidedDetails) Cost() int

func (*DonorProvidedDetails) DonorIdentityConfirmed added in v0.837.0

func (l *DonorProvidedDetails) DonorIdentityConfirmed() bool

func (*DonorProvidedDetails) FeeAmount added in v0.837.0

func (l *DonorProvidedDetails) FeeAmount() int

func (*DonorProvidedDetails) GenerateHash added in v0.837.0

func (l *DonorProvidedDetails) GenerateHash() (uint64, error)

func (*DonorProvidedDetails) NamesChanged added in v0.938.0

func (l *DonorProvidedDetails) NamesChanged(firstNames, lastName, otherNames string) bool

func (*DonorProvidedDetails) TrustCorporationsNames added in v0.837.0

func (l *DonorProvidedDetails) TrustCorporationsNames() []string

func (*DonorProvidedDetails) Under18ActorDetails added in v0.910.0

func (l *DonorProvidedDetails) Under18ActorDetails() []Under18ActorDetails

type DonorTasks added in v0.836.0

type DonorTasks struct {
	YourDetails                TaskState
	ChooseAttorneys            TaskState
	ChooseReplacementAttorneys TaskState
	WhenCanTheLpaBeUsed        TaskState // property and affairs only
	LifeSustainingTreatment    TaskState // personal welfare only
	Restrictions               TaskState
	CertificateProvider        TaskState
	CheckYourLpa               TaskState
	PayForLpa                  PaymentTask
	ConfirmYourIdentityAndSign TaskState
	ChooseYourSignatory        TaskState // if .Donor.CanSign.IsNo only
	PeopleToNotify             TaskState
	AddCorrespondent           TaskState // if supporter only
}

type IndependentWitness added in v0.686.0

type IndependentWitness struct {
	FirstNames     string
	LastName       string
	HasNonUKMobile bool
	Mobile         string
	Address        place.Address
}

IndependentWitness contains details of the person who will also witness the signing of the LPA

func (IndependentWitness) FullName added in v0.686.0

func (w IndependentWitness) FullName() string

type LifeSustainingTreatment added in v0.836.0

type LifeSustainingTreatment uint8
const (
	LifeSustainingTreatmentOptionA LifeSustainingTreatment = iota + 1 // option-a
	LifeSustainingTreatmentOptionB                                    // option-b
)

func ParseLifeSustainingTreatment added in v0.836.0

func ParseLifeSustainingTreatment(s string) (LifeSustainingTreatment, error)

func (LifeSustainingTreatment) Empty added in v0.836.0

func (i LifeSustainingTreatment) Empty() bool

func (LifeSustainingTreatment) IsOptionA added in v0.836.0

func (i LifeSustainingTreatment) IsOptionA() bool

func (LifeSustainingTreatment) IsOptionB added in v0.836.0

func (i LifeSustainingTreatment) IsOptionB() bool

func (LifeSustainingTreatment) MarshalText added in v0.912.0

func (i LifeSustainingTreatment) MarshalText() ([]byte, error)

func (LifeSustainingTreatment) String added in v0.836.0

func (i LifeSustainingTreatment) String() string

func (*LifeSustainingTreatment) UnmarshalText added in v0.1095.0

func (i *LifeSustainingTreatment) UnmarshalText(text []byte) error

type LifeSustainingTreatmentOptions added in v0.836.0

type LifeSustainingTreatmentOptions struct {
	OptionA LifeSustainingTreatment
	OptionB LifeSustainingTreatment
}

type Limiter added in v0.836.0

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 added in v0.836.0

func NewLimiter(tokenPer time.Duration, initialTokens, maxTokens float64) *Limiter

func (*Limiter) Allow added in v0.836.0

func (l *Limiter) Allow(now time.Time) bool

type LpaType added in v0.836.0

type LpaType uint8
const (
	LpaTypePersonalWelfare    LpaType = iota + 1 // personal-welfare
	LpaTypePropertyAndAffairs                    // property-and-affairs
)

func ParseLpaType added in v0.836.0

func ParseLpaType(s string) (LpaType, error)

func (LpaType) Empty added in v0.836.0

func (i LpaType) Empty() bool

func (LpaType) IsPersonalWelfare added in v0.912.0

func (i LpaType) IsPersonalWelfare() bool

func (LpaType) IsPropertyAndAffairs added in v0.912.0

func (i LpaType) IsPropertyAndAffairs() bool

func (LpaType) MarshalText added in v0.912.0

func (i LpaType) MarshalText() ([]byte, error)

func (LpaType) String added in v0.836.0

func (i LpaType) String() string

func (*LpaType) UnmarshalText added in v0.1095.0

func (i *LpaType) UnmarshalText(text []byte) error

func (LpaType) WhatLPACoversTransKey added in v0.864.0

func (e LpaType) WhatLPACoversTransKey() string

type LpaTypeOptions added in v0.836.0

type LpaTypeOptions struct {
	PersonalWelfare    LpaType
	PropertyAndAffairs LpaType
}

type Member added in v0.946.0

type Member struct {
	PK dynamo.OrganisationKeyType
	SK dynamo.MemberKeyType
	// CreatedAt is when the Member was created
	CreatedAt time.Time
	// UpdatedAt is when the Member was last updated
	UpdatedAt time.Time
	// ID is a unique identifier for the Member
	ID string
	// OrganisationID identifies the organisation the member belongs to
	OrganisationID string
	Email          string
	FirstNames     string
	LastName       string
	// Permission is the type of permissions assigned to the member to set available actions in an Organisation
	Permission Permission
	// Status controls access to the Organisation
	Status Status
	// LastLoggedInAt is when the Member last logged in to the service
	LastLoggedInAt time.Time
}

A Member is the association of a OneLogin user with an Organisation.

func (Member) FullName added in v0.1023.0

func (i Member) FullName() string

type MemberInvite added in v0.949.0

type MemberInvite struct {
	PK dynamo.OrganisationKeyType
	SK dynamo.MemberInviteKeyType
	// CreatedAt is when the MemberInvite was created
	CreatedAt time.Time
	// UpdatedAt is when the MemberInvite was last updated
	UpdatedAt time.Time
	// OrganisationID identifies the organisation the invite is for
	OrganisationID string
	// OrganisationName is the name of the organisation the invite is for
	OrganisationName string
	// Email is the address the new Member must sign in as for the invite
	Email      string
	FirstNames string
	LastName   string
	// Permission is the type of permissions assigned to the member to set available actions in an Organisation
	Permission Permission
	// ReferenceNumber is a unique code used to invite a Member to and Organisation
	ReferenceNumber string
}

A MemberInvite is created to allow a new Member to join an Organisation

func (MemberInvite) FullName added in v0.1005.0

func (i MemberInvite) FullName() string

func (MemberInvite) HasExpired added in v0.949.0

func (i MemberInvite) HasExpired() bool

type Organisation added in v0.946.0

type Organisation struct {
	PK, SK dynamo.OrganisationKeyType
	// CreatedAt is when the Organisation was created
	CreatedAt time.Time
	// UpdatedAt is when the Organisation was last updated
	UpdatedAt time.Time
	// DeletedAt is when the Organisation was (soft) deleted
	DeletedAt time.Time
	// ID is a unique identifier for the Organisation
	ID string
	// Name of the Organisation, this is unique across all Organisations
	Name string
}

An Organisation contains users associated with a set of permissions that work on the same set of LPAs.

type Payment added in v0.836.0

type Payment struct {
	// Reference generated for the payment
	PaymentReference string
	// ID returned from GOV.UK Pay
	PaymentId string
	// Amount is the amount paid in pence
	Amount int
}

type PaymentTask

type PaymentTask uint8
const (
	PaymentTaskNotStarted PaymentTask = iota
	PaymentTaskInProgress
	PaymentTaskCompleted
	PaymentTaskPending
	PaymentTaskDenied
	PaymentTaskMoreEvidenceRequired
)

func ParsePaymentTask

func ParsePaymentTask(s string) (PaymentTask, error)

func (PaymentTask) IsCompleted

func (i PaymentTask) IsCompleted() bool

func (PaymentTask) IsDenied

func (i PaymentTask) IsDenied() bool

func (PaymentTask) IsInProgress

func (i PaymentTask) IsInProgress() bool

func (PaymentTask) IsMoreEvidenceRequired added in v0.666.0

func (i PaymentTask) IsMoreEvidenceRequired() bool

func (PaymentTask) IsNotStarted

func (i PaymentTask) IsNotStarted() bool

func (PaymentTask) IsPending

func (i PaymentTask) IsPending() bool

func (PaymentTask) MarshalText added in v0.912.0

func (i PaymentTask) MarshalText() ([]byte, error)

func (PaymentTask) String

func (i PaymentTask) String() string

func (*PaymentTask) UnmarshalText added in v0.1095.0

func (i *PaymentTask) UnmarshalText(text []byte) error

type PaymentTaskOptions

type PaymentTaskOptions struct {
	NotStarted           PaymentTask
	InProgress           PaymentTask
	Completed            PaymentTask
	Pending              PaymentTask
	Denied               PaymentTask
	MoreEvidenceRequired PaymentTask
}

type PeopleToNotify

type PeopleToNotify []PersonToNotify

func (*PeopleToNotify) Delete

func (ps *PeopleToNotify) Delete(personToNotify PersonToNotify) bool

func (PeopleToNotify) Get

func (PeopleToNotify) Put

func (ps PeopleToNotify) Put(person PersonToNotify) bool

type Permission added in v0.1002.0

type Permission uint8
const (
	PermissionNone  Permission = iota // none
	PermissionAdmin                   // admin
)

func ParsePermission added in v0.1002.0

func ParsePermission(s string) (Permission, error)

func (Permission) IsAdmin added in v0.1002.0

func (i Permission) IsAdmin() bool

func (Permission) IsNone added in v0.1002.0

func (i Permission) IsNone() bool

func (Permission) MarshalText added in v0.1002.0

func (i Permission) MarshalText() ([]byte, error)

func (Permission) String added in v0.1002.0

func (i Permission) String() string

func (*Permission) UnmarshalText added in v0.1095.0

func (i *Permission) UnmarshalText(text []byte) error

type PermissionOptions added in v0.1002.0

type PermissionOptions struct {
	None  Permission
	Admin Permission
}

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

type ReplacementAttorneysStepIn added in v0.836.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.836.0

func ParseReplacementAttorneysStepIn(s string) (ReplacementAttorneysStepIn, error)

func (ReplacementAttorneysStepIn) Empty added in v0.836.0

func (i ReplacementAttorneysStepIn) Empty() bool

func (ReplacementAttorneysStepIn) IsAnotherWay added in v0.836.0

func (i ReplacementAttorneysStepIn) IsAnotherWay() bool

func (ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct added in v0.836.0

func (i ReplacementAttorneysStepIn) IsWhenAllCanNoLongerAct() bool

func (ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct added in v0.836.0

func (i ReplacementAttorneysStepIn) IsWhenOneCanNoLongerAct() bool

func (ReplacementAttorneysStepIn) MarshalText added in v0.912.0

func (i ReplacementAttorneysStepIn) MarshalText() ([]byte, error)

func (ReplacementAttorneysStepIn) String added in v0.836.0

func (*ReplacementAttorneysStepIn) UnmarshalText added in v0.1095.0

func (i *ReplacementAttorneysStepIn) UnmarshalText(text []byte) error

type ReplacementAttorneysStepInOptions added in v0.836.0

type ReplacementAttorneysStepInOptions struct {
	WhenAllCanNoLongerAct ReplacementAttorneysStepIn
	WhenOneCanNoLongerAct ReplacementAttorneysStepIn
	AnotherWay            ReplacementAttorneysStepIn
}

type SameNameWarning

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

func NewSameNameWarning

func NewSameNameWarning(actor, matches Type, firstNames, lastName string) *SameNameWarning

func (*SameNameWarning) Format

func (*SameNameWarning) String

func (w *SameNameWarning) String() string

type ShareCodeData

type ShareCodeData struct {
	PK                    dynamo.ShareKeyType
	SK                    dynamo.ShareSortKeyType
	UpdatedAt             time.Time
	LpaKey                dynamo.LpaKeyType
	LpaOwnerKey           dynamo.LpaOwnerKeyType
	ActorUID              actoruid.UID
	IsReplacementAttorney bool
	IsTrustCorporation    bool

	// InviteSentTo is the email address the supporter sent the invite to
	InviteSentTo string
	// LpaLinkedAt is the time the donor entered the access code
	LpaLinkedAt time.Time
	// LpaLinkedTo is set to the email address the donor used to sign-in when
	// using the code
	LpaLinkedTo string
}

type Status added in v0.1040.0

type Status uint8
const (
	StatusActive    Status = iota // active
	StatusSuspended               // suspended
)

func ParseStatus added in v0.1040.0

func ParseStatus(s string) (Status, error)

func (Status) IsActive added in v0.1040.0

func (i Status) IsActive() bool

func (Status) IsSuspended added in v0.1040.0

func (i Status) IsSuspended() bool

func (Status) MarshalText added in v0.1040.0

func (i Status) MarshalText() ([]byte, error)

func (Status) String added in v0.1040.0

func (i Status) String() string

func (*Status) UnmarshalText added in v0.1095.0

func (i *Status) UnmarshalText(text []byte) error

type StatusOptions added in v0.1040.0

type StatusOptions struct {
	Active    Status
	Suspended Status
}

type TaskState

type TaskState uint8
const (
	TaskNotStarted TaskState = iota
	TaskInProgress
	TaskCompleted
)

func (TaskState) Completed

func (t TaskState) Completed() bool

func (TaskState) InProgress

func (t TaskState) InProgress() bool

func (TaskState) NotStarted

func (t TaskState) NotStarted() bool

func (TaskState) String

func (t TaskState) String() string

type TrustCorporation

type TrustCorporation struct {
	// UID for the actor
	UID actoruid.UID
	// Name of the company
	Name string
	// CompanyNumber as registered by Companies House
	CompanyNumber 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 added in v0.1163.0

func (tc TrustCorporation) Channel() Channel

type TrustCorporationSignatory added in v0.686.0

type TrustCorporationSignatory struct {
	FirstNames        string
	LastName          string
	ProfessionalTitle string
	Confirmed         time.Time
}

TrustCorporationSignatory contains the details of a person who signed the LPA on behalf of a trust corporation

type Type

type Type uint8
const (
	TypeNone Type = iota
	TypeDonor
	TypeAttorney
	TypeReplacementAttorney
	TypeCertificateProvider
	TypePersonToNotify
	TypeAuthorisedSignatory
	TypeIndependentWitness
	TypeTrustCorporation
	TypeReplacementTrustCorporation
)

func (Type) String

func (t Type) String() string

type Types

type Types struct {
	None                        Type
	Donor                       Type
	Attorney                    Type
	ReplacementAttorney         Type
	TrustCorporation            Type
	ReplacementTrustCorporation Type
	CertificateProvider         Type
	PersonToNotify              Type
	AuthorisedSignatory         Type
	IndependentWitness          Type
}

type Under18ActorDetails added in v0.910.0

type Under18ActorDetails struct {
	FullName    string
	DateOfBirth date.Date
	UID         actoruid.UID
	Type        Type
}

type WitnessCode added in v0.836.0

type WitnessCode struct {
	Code    string
	Created time.Time
}

func (WitnessCode) HasExpired added in v0.836.0

func (w WitnessCode) HasExpired() bool

type WitnessCodes added in v0.836.0

type WitnessCodes []WitnessCode

func (WitnessCodes) CanRequest added in v0.836.0

func (ws WitnessCodes) CanRequest(now time.Time) bool

func (WitnessCodes) Find added in v0.836.0

func (ws WitnessCodes) Find(code string) (WitnessCode, bool)

type YesNoMaybe added in v0.681.0

type YesNoMaybe uint8
const (
	Yes YesNoMaybe = iota + 1
	No
	Maybe
)

func ParseYesNoMaybe added in v0.681.0

func ParseYesNoMaybe(s string) (YesNoMaybe, error)

func (YesNoMaybe) Empty added in v0.681.0

func (i YesNoMaybe) Empty() bool

func (YesNoMaybe) IsMaybe added in v0.681.0

func (i YesNoMaybe) IsMaybe() bool

func (YesNoMaybe) IsNo added in v0.681.0

func (i YesNoMaybe) IsNo() bool

func (YesNoMaybe) IsYes added in v0.681.0

func (i YesNoMaybe) IsYes() bool

func (YesNoMaybe) MarshalText added in v0.912.0

func (i YesNoMaybe) MarshalText() ([]byte, error)

func (YesNoMaybe) String added in v0.681.0

func (i YesNoMaybe) String() string

func (*YesNoMaybe) UnmarshalText added in v0.1095.0

func (i *YesNoMaybe) UnmarshalText(text []byte) error

type YesNoMaybeOptions added in v0.681.0

type YesNoMaybeOptions struct {
	Yes   YesNoMaybe
	No    YesNoMaybe
	Maybe YesNoMaybe
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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