certificateprovider

package
v0.984.0-MLPAB1780invi... Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmYourDetails

func ConfirmYourDetails(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func EnterDateOfBirth

func EnterDateOfBirth(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func EnterReferenceNumber

func EnterReferenceNumber(tmpl template.Template, shareCodeStore ShareCodeStore, sessionStore sessions.Store, certificateProviderStore CertificateProviderStore) page.Handler

func Guidance

func Guidance(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func IdentityWithOneLogin

func IdentityWithOneLogin(oneLoginClient OneLoginClient, store sesh.Store, randomString func(int) string) page.Handler

func IdentityWithOneLoginCallback

func IdentityWithOneLoginCallback(tmpl template.Template, oneLoginClient OneLoginClient, sessionStore sesh.Store, certificateProviderStore CertificateProviderStore, donorStore DonorStore) page.Handler

func ProvideCertificate

func ProvideCertificate(
	tmpl template.Template,
	donorStore DonorStore,
	certificateProviderStore CertificateProviderStore,
	notifyClient NotifyClient,
	shareCodeSender ShareCodeSender,
	lpaStoreClient LpaStoreClient,
	now func() time.Time,
) page.Handler

func ReadTheLpa

func ReadTheLpa(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func Register

func Register(
	rootMux *http.ServeMux,
	logger Logger,
	commonTmpls, tmpls template.Templates,
	sessionStore SessionStore,
	donorStore DonorStore,
	oneLoginClient OneLoginClient,
	shareCodeStore ShareCodeStore,
	errorHandler page.ErrorHandler,
	certificateProviderStore CertificateProviderStore,
	notFoundHandler page.Handler,
	addressClient AddressClient,
	notifyClient NotifyClient,
	shareCodeSender ShareCodeSender,
	dashboardStore DashboardStore,
	lpaStoreClient LpaStoreClient,
)

func TaskList

func TaskList(tmpl template.Template, donorStore DonorStore, certificateProviderStore CertificateProviderStore) page.Handler

func WhatIsYourHomeAddress added in v0.834.0

func WhatIsYourHomeAddress(logger Logger, tmpl template.Template, addressClient AddressClient, certificateProviderStore CertificateProviderStore) page.Handler

func WhoIsEligible

func WhoIsEligible(tmpl template.Template, donorStore DonorStore) page.Handler

func YourPreferredLanguage added in v0.884.0

func YourPreferredLanguage(tmpl template.Template, certificateProviderStore CertificateProviderStore, donorStore DonorStore) page.Handler

Types

type AddressClient added in v0.834.0

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

type CertificateProviderStore

type CertificateProviderStore interface {
	Create(ctx context.Context, sessionID string) (*actor.CertificateProviderProvidedDetails, error)
	Get(ctx context.Context) (*actor.CertificateProviderProvidedDetails, error)
	Put(ctx context.Context, certificateProvider *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 DonorStore

type DonorStore interface {
	GetAny(context.Context) (*actor.DonorProvidedDetails, error)
}

type ErrorHandler added in v0.930.0

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

type Localizer added in v0.842.0

type Localizer interface {
	Format(string, map[string]any) string
	T(string) string
	Count(string, int) string
	FormatCount(string, int, map[string]interface{}) string
	ShowTranslationKeys() bool
	SetShowTranslationKeys(bool)
	Possessive(string) string
	Concat([]string, string) string
	FormatDate(date.TimeOrDate) string
	FormatDateTime(time.Time) string
}

type Logger

type Logger interface {
	Print(v ...interface{})
}

type LpaStoreClient added in v0.922.0

type LpaStoreClient interface {
	SendCertificateProvider(context.Context, string, *actor.CertificateProviderProvidedDetails) error
}

type NotifyClient

type NotifyClient interface {
	SendEmail(ctx context.Context, to string, email notify.Email) error
	SendActorEmail(ctx context.Context, 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)
	ParseIdentityClaim(ctx context.Context, userInfo onelogin.UserInfo) (identity.UserData, error)
}

type SessionStore

type SessionStore interface {
	Get(r *http.Request, name string) (*sessions.Session, error)
	New(r *http.Request, name string) (*sessions.Session, error)
	Save(r *http.Request, w http.ResponseWriter, s *sessions.Session) error
}

type ShareCodeSender added in v0.881.0

type ShareCodeSender interface {
	SendAttorneys(context.Context, page.AppData, *actor.DonorProvidedDetails) 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, shareCodeData 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