attorney

package
v0.1178.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func EnterReferenceNumber

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

func Register

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

Types

type AddressClient

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

type AttorneyStore

type AttorneyStore interface {
	Create(ctx context.Context, lpaOwnerKey dynamo.LpaOwnerKeyType, attorneyUID actoruid.UID, isReplacement, isTrustCorporation bool, email string) (*actor.AttorneyProvidedDetails, error)
	Get(ctx context.Context) (*actor.AttorneyProvidedDetails, error)
	GetAny(ctx context.Context) ([]*actor.AttorneyProvidedDetails, error)
	Put(ctx context.Context, attorney *actor.AttorneyProvidedDetails) error
}

type CertificateProviderStore

type CertificateProviderStore interface {
	GetAny(ctx context.Context) (*actor.CertificateProviderProvidedDetails, error)
}

type DashboardStore added in v0.899.0

type DashboardStore interface {
	GetAll(ctx context.Context) (donor, attorney, certificateProvider []page.LpaAndActorTasks, err error)
	SubExistsForActorType(ctx context.Context, sub string, actorType actor.Type) (bool, error)
}

type ErrorHandler added in v0.930.0

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

type Handler

type Handler func(data page.AppData, w http.ResponseWriter, r *http.Request, details *actor.AttorneyProvidedDetails) error

func ConfirmYourDetails

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

func Guidance

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

func MobileNumber

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

func Progress added in v0.748.0

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,
	certificateProviderStore CertificateProviderStore,
	attorneyStore AttorneyStore,
	lpaStoreClient LpaStoreClient,
	now func() time.Time,
) Handler

func TaskList

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

func WouldLikeSecondSignatory

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

func YourPreferredLanguage added in v0.884.0

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

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

type LpaStoreClient interface {
	SendAttorney(context.Context, *lpastore.Lpa, *actor.AttorneyProvidedDetails) error
}

type LpaStoreResolvingService added in v0.1116.0

type LpaStoreResolvingService interface {
	Get(ctx context.Context) (*lpastore.Lpa, 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)
	OneLogin(r *http.Request) (*sesh.OneLoginSession, error)
	SetLogin(r *http.Request, w http.ResponseWriter, session *sesh.LoginSession) 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) (actor.ShareCodeData, error)
	Put(ctx context.Context, actorType actor.Type, shareCode string, data actor.ShareCodeData) error
	Delete(ctx context.Context, shareCode actor.ShareCodeData) 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