lpastore

package
v0.1607.0-MLPAB2018sen... Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package lpastore provides a client for the LPA store.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("lpa not found in lpa-store")

Functions

func LpaFromDonorProvided added in v0.1603.0

func LpaFromDonorProvided(l *donordata.Provided) *lpadata.Lpa

Types

type Client

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

func New

func New(baseURL string, secretsClient SecretsClient, secretARN string, lambdaClient Doer) *Client

func (*Client) CheckHealth

func (c *Client) CheckHealth(ctx context.Context) error

func (*Client) Lpa added in v0.1099.0

func (c *Client) Lpa(ctx context.Context, lpaUID string) (*lpadata.Lpa, error)

func (*Client) Lpas added in v0.1150.0

func (c *Client) Lpas(ctx context.Context, lpaUIDs []string) ([]*lpadata.Lpa, error)

func (*Client) SendAttorney added in v0.926.0

func (c *Client) SendAttorney(ctx context.Context, lpa *lpadata.Lpa, attorney *attorneydata.Provided) error

func (*Client) SendAttorneyOptOut added in v0.1363.0

func (c *Client) SendAttorneyOptOut(ctx context.Context, lpaUID string, attorneyUID actoruid.UID, actorType actor.Type) error

func (*Client) SendCertificateProvider added in v0.922.0

func (c *Client) SendCertificateProvider(ctx context.Context, certificateProvider *certificateproviderdata.Provided, lpa *lpadata.Lpa) error

func (*Client) SendCertificateProviderConfirmIdentity added in v0.1247.0

func (c *Client) SendCertificateProviderConfirmIdentity(ctx context.Context, lpaUID string, certificateProvider *certificateproviderdata.Provided) error

func (*Client) SendCertificateProviderOptOut added in v0.1181.0

func (c *Client) SendCertificateProviderOptOut(ctx context.Context, lpaUID string, certificateProviderUid actoruid.UID) error

func (*Client) SendChangeStatus added in v0.1599.0

func (c *Client) SendChangeStatus(ctx context.Context, lpaUID string, oldStatus, newStatus lpadata.Status) error

func (*Client) SendDonorConfirmIdentity added in v0.1247.0

func (c *Client) SendDonorConfirmIdentity(ctx context.Context, donor *donordata.Provided) error

func (*Client) SendDonorWithdrawLPA added in v0.1355.0

func (c *Client) SendDonorWithdrawLPA(ctx context.Context, lpaUID string) error

func (*Client) SendLpa

func (c *Client) SendLpa(ctx context.Context, uid string, body CreateLpa) error

func (*Client) SendRegister added in v0.1145.0

func (c *Client) SendRegister(ctx context.Context, lpaUID string) error

func (*Client) SendStatutoryWaitingPeriod added in v0.1535.0

func (c *Client) SendStatutoryWaitingPeriod(ctx context.Context, lpaUID string) error

type CreateLpa added in v0.1603.0

type CreateLpa struct {
	LpaType                                     lpadata.LpaType                    `json:"lpaType"`
	Channel                                     lpadata.Channel                    `json:"channel"`
	Donor                                       lpadata.Donor                      `json:"donor"`
	Attorneys                                   []lpadata.Attorney                 `json:"attorneys"`
	TrustCorporations                           []lpadata.TrustCorporation         `json:"trustCorporations,omitempty"`
	CertificateProvider                         lpadata.CertificateProvider        `json:"certificateProvider"`
	PeopleToNotify                              []lpadata.PersonToNotify           `json:"peopleToNotify,omitempty"`
	IndependentWitness                          *lpadata.IndependentWitness        `json:"independentWitness,omitempty"`
	AuthorisedSignatory                         *lpadata.AuthorisedSignatory       `json:"authorisedSignatory,omitempty"`
	HowAttorneysMakeDecisions                   lpadata.AttorneysAct               `json:"howAttorneysMakeDecisions,omitempty"`
	HowAttorneysMakeDecisionsDetails            string                             `json:"howAttorneysMakeDecisionsDetails,omitempty"`
	HowReplacementAttorneysMakeDecisions        lpadata.AttorneysAct               `json:"howReplacementAttorneysMakeDecisions,omitempty"`
	HowReplacementAttorneysMakeDecisionsDetails string                             `json:"howReplacementAttorneysMakeDecisionsDetails,omitempty"`
	HowReplacementAttorneysStepIn               lpadata.ReplacementAttorneysStepIn `json:"howReplacementAttorneysStepIn,omitempty"`
	HowReplacementAttorneysStepInDetails        string                             `json:"howReplacementAttorneysStepInDetails,omitempty"`
	Restrictions                                string                             `json:"restrictionsAndConditions"`
	WhenTheLpaCanBeUsed                         lpadata.CanBeUsedWhen              `json:"whenTheLpaCanBeUsed,omitempty"`
	LifeSustainingTreatmentOption               lpadata.LifeSustainingTreatment    `json:"lifeSustainingTreatmentOption,omitempty"`
	SignedAt                                    time.Time                          `json:"signedAt"`
	WitnessedByCertificateProviderAt            time.Time                          `json:"witnessedByCertificateProviderAt"`
	WitnessedByIndependentWitnessAt             *time.Time                         `json:"witnessedByIndependentWitnessAt,omitempty"`
	CertificateProviderNotRelatedConfirmedAt    *time.Time                         `json:"certificateProviderNotRelatedConfirmedAt,omitempty"`
}

func CreateLpaFromDonorProvided added in v0.1603.0

func CreateLpaFromDonorProvided(donor *donordata.Provided) CreateLpa

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type DonorStore added in v0.1116.0

type DonorStore interface {
	GetAny(ctx context.Context) (*donordata.Provided, error)
}

type LpaClient added in v0.1116.0

type LpaClient interface {
	Lpa(ctx context.Context, lpaUID string) (*lpadata.Lpa, error)
	Lpas(ctx context.Context, lpaUIDs []string) ([]*lpadata.Lpa, error)
}

type ResolvingService added in v0.1116.0

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

A ResolvingService wraps a Client so that an Lpa can be retrieved without passing its UID.

func NewResolvingService added in v0.1116.0

func NewResolvingService(donorStore DonorStore, client LpaClient) *ResolvingService

func (*ResolvingService) Get added in v0.1116.0

func (s *ResolvingService) Get(ctx context.Context) (*lpadata.Lpa, error)

func (*ResolvingService) ResolveList added in v0.1150.0

func (s *ResolvingService) ResolveList(ctx context.Context, donors []*donordata.Provided) ([]*lpadata.Lpa, error)

type SecretsClient

type SecretsClient interface {
	Secret(ctx context.Context, name string) (string, error)
}

Directories

Path Synopsis
Package lpadata provides types that describe the data used by the LPA store.
Package lpadata provides types that describe the data used by the LPA store.

Jump to

Keyboard shortcuts

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