attorneypage

package
v0.1530.0-weblatepr.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package attorneypage provides the pages that an attorney or trust corporation interacts with.

Index

Constants

View Source
const (
	None handleOpt = 1 << iota
	RequireSession
	CanGoBack
)

Variables

This section is empty.

Functions

func ConfirmDontWantToBeAttorneyLoggedOut

func ConfirmDontWantToBeAttorneyLoggedOut(tmpl template.Template, shareCodeStore ShareCodeStore, lpaStoreResolvingService LpaStoreResolvingService, sessionStore SessionStore, notifyClient NotifyClient, appPublicURL string, lpaStoreClient LpaStoreClient) page.Handler

func EnterReferenceNumber

func EnterReferenceNumber(tmpl template.Template, shareCodeStore ShareCodeStore, sessionStore SessionStore, attorneyStore AttorneyStore) page.Handler

func EnterReferenceNumberOptOut

func EnterReferenceNumberOptOut(tmpl template.Template, shareCodeStore ShareCodeStore, sessionStore SessionStore) page.Handler

func Register

func Register(
	rootMux *http.ServeMux,
	logger Logger,
	commonTmpls, tmpls template.Templates,
	sessionStore SessionStore,
	attorneyStore AttorneyStore,
	oneLoginClient OneLoginClient,
	shareCodeStore ShareCodeStore,
	errorHandler page.ErrorHandler,
	dashboardStore DashboardStore,
	lpaStoreClient LpaStoreClient,
	lpaStoreResolvingService LpaStoreResolvingService,
	notifyClient NotifyClient,
	appPublicURL string,
)

Types

type AddressClient

type AddressClient interface {
	LookupPostcode(ctx context.Context, postcode string) ([]place.Address, error)
}

type AttorneyStore

type AttorneyStore interface {
	Create(ctx context.Context, shareCode sharecodedata.Link, email string) (*attorneydata.Provided, error)
	Get(ctx context.Context) (*attorneydata.Provided, error)
	Put(ctx context.Context, attorney *attorneydata.Provided) error
	Delete(ctx context.Context) error
}

type DashboardStore

type DashboardStore interface {
	GetAll(ctx context.Context) (results dashboarddata.Results, err error)
	SubExistsForActorType(ctx context.Context, sub string, actorType actor.Type) (bool, error)
}

type ErrorHandler

type ErrorHandler func(http.ResponseWriter, *http.Request, error)

type Handler

type Handler func(data appcontext.Data, w http.ResponseWriter, r *http.Request, details *attorneydata.Provided) error

func ConfirmDontWantToBeAttorney

func ConfirmDontWantToBeAttorney(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, attorneyStore AttorneyStore, notifyClient NotifyClient, appPublicURL string, lpaStoreClient LpaStoreClient) Handler

func ConfirmYourDetails

func ConfirmYourDetails(tmpl template.Template, attorneyStore AttorneyStore, lpaStoreResolvingService LpaStoreResolvingService) Handler

func Guidance

func Guidance(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler

func PhoneNumber added in v0.1380.0

func PhoneNumber(tmpl template.Template, attorneyStore AttorneyStore) Handler

func Progress

func Progress(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler

func ReadTheLpa

func ReadTheLpa(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, attorneyStore AttorneyStore) Handler

func Sign

func Sign(
	tmpl template.Template,
	lpaStoreResolvingService LpaStoreResolvingService,
	attorneyStore AttorneyStore,
	lpaStoreClient LpaStoreClient,
	now func() time.Time,
) Handler

func TaskList

func TaskList(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler

func WouldLikeSecondSignatory

func WouldLikeSecondSignatory(tmpl template.Template, attorneyStore AttorneyStore, lpaStoreResolvingService LpaStoreResolvingService, lpaStoreClient LpaStoreClient) Handler

func YourPreferredLanguage

func YourPreferredLanguage(tmpl template.Template, attorneyStore AttorneyStore, lpaStoreResolvingService LpaStoreResolvingService) Handler

type Localizer

type Localizer interface {
	page.Localizer
}

type Logger

type Logger interface {
	InfoContext(ctx context.Context, msg string, args ...any)
	WarnContext(ctx context.Context, msg string, args ...any)
	ErrorContext(ctx context.Context, msg string, args ...any)
}

type LpaStoreClient

type LpaStoreClient interface {
	SendAttorney(context.Context, *lpadata.Lpa, *attorneydata.Provided) error
	SendAttorneyOptOut(ctx context.Context, lpaUID string, attorneyUID actoruid.UID, actorType actor.Type) error
}

type LpaStoreResolvingService

type LpaStoreResolvingService interface {
	Get(ctx context.Context) (*lpadata.Lpa, error)
}

type NotifyClient

type NotifyClient interface {
	EmailGreeting(lpa *lpadata.Lpa) string
	SendActorEmail(ctx context.Context, lang localize.Lang, to, lpaUID string, email notify.Email) error
}

type OneLoginClient

type OneLoginClient interface {
	AuthCodeURL(state, nonce, locale string, identity bool) (string, error)
	Exchange(ctx context.Context, code, nonce string) (idToken, accessToken string, err error)
	UserInfo(ctx context.Context, accessToken string) (onelogin.UserInfo, error)
}

type SessionStore

type SessionStore interface {
	Login(r *http.Request) (*sesh.LoginSession, error)
	LpaData(r *http.Request) (*sesh.LpaDataSession, error)
	OneLogin(r *http.Request) (*sesh.OneLoginSession, error)
	SetLogin(r *http.Request, w http.ResponseWriter, session *sesh.LoginSession) error
	SetLpaData(r *http.Request, w http.ResponseWriter, lpaDataSession *sesh.LpaDataSession) error
	SetOneLogin(r *http.Request, w http.ResponseWriter, session *sesh.OneLoginSession) error
}

type ShareCodeStore

type ShareCodeStore interface {
	Get(ctx context.Context, actorType actor.Type, shareCode string) (sharecodedata.Link, error)
	Put(ctx context.Context, actorType actor.Type, shareCode string, data sharecodedata.Link) error
	Delete(ctx context.Context, shareCode sharecodedata.Link) error
}

type Template

type Template func(io.Writer, interface{}) error

Jump to

Keyboard shortcuts

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