Documentation ¶
Overview ¶
Package voucherpage provides the pages that a voucher interacts with.
Index ¶
- Constants
- func EnterReferenceNumber(tmpl template.Template, shareCodeStore ShareCodeStore, ...) page.Handler
- func Register(rootMux *http.ServeMux, logger Logger, tmpls template.Templates, ...)
- type DashboardStore
- type DonorStore
- type ErrorHandler
- type Handler
- func ConfirmAllowedToVouch(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, ...) Handler
- func ConfirmYourName(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, ...) Handler
- func Guidance(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler
- func IdentityWithOneLogin(oneLoginClient OneLoginClient, sessionStore SessionStore, ...) Handler
- func IdentityWithOneLoginCallback(oneLoginClient OneLoginClient, sessionStore SessionStore, ...) Handler
- func TaskList(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler
- func VerifyDonorDetails(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, ...) Handler
- func YourDeclaration(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, ...) Handler
- func YourName(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, ...) Handler
- type Localizer
- type Logger
- type LpaStoreResolvingService
- type NotifyClient
- type OneLoginClient
- type SessionStore
- type ShareCodeStore
- type Template
- type VoucherStore
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, voucherStore VoucherStore) page.Handler
func Register ¶
func Register( rootMux *http.ServeMux, logger Logger, tmpls template.Templates, sessionStore SessionStore, voucherStore VoucherStore, oneLoginClient OneLoginClient, shareCodeStore ShareCodeStore, dashboardStore DashboardStore, errorHandler page.ErrorHandler, lpaStoreResolvingService LpaStoreResolvingService, notifyClient NotifyClient, appPublicURL string, donorStore DonorStore, )
Types ¶
type DashboardStore ¶
type DonorStore ¶ added in v0.1400.0
type ErrorHandler ¶
type ErrorHandler func(http.ResponseWriter, *http.Request, error)
type Handler ¶
type Handler func(data appcontext.Data, w http.ResponseWriter, r *http.Request, provided *voucherdata.Provided) error
func ConfirmAllowedToVouch ¶ added in v0.1369.0
func ConfirmAllowedToVouch(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, voucherStore VoucherStore, fail vouchFailer) Handler
func ConfirmYourName ¶ added in v0.1367.0
func ConfirmYourName(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, voucherStore VoucherStore) Handler
func Guidance ¶ added in v0.1373.0
func Guidance(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler
func IdentityWithOneLogin ¶ added in v0.1375.0
func IdentityWithOneLogin(oneLoginClient OneLoginClient, sessionStore SessionStore, randomString func(int) string) Handler
func IdentityWithOneLoginCallback ¶ added in v0.1375.0
func IdentityWithOneLoginCallback(oneLoginClient OneLoginClient, sessionStore SessionStore, voucherStore VoucherStore, lpaStoreResolvingService LpaStoreResolvingService, fail vouchFailer) Handler
func TaskList ¶
func TaskList(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService) Handler
func VerifyDonorDetails ¶ added in v0.1369.0
func VerifyDonorDetails(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, voucherStore VoucherStore, fail vouchFailer) Handler
func YourDeclaration ¶ added in v0.1377.0
func YourDeclaration(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, voucherStore VoucherStore, notifyClient NotifyClient, now func() time.Time, appPublicURL string) Handler
func YourName ¶ added in v0.1369.0
func YourName(tmpl template.Template, lpaStoreResolvingService LpaStoreResolvingService, voucherStore VoucherStore) Handler
type LpaStoreResolvingService ¶ added in v0.1366.0
type NotifyClient ¶ added in v0.1375.0
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(userInfo onelogin.UserInfo) (identity.UserData, 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 {}
type VoucherStore ¶
type VoucherStore interface { Create(ctx context.Context, shareCode sharecodedata.Link, email string) (*voucherdata.Provided, error) Get(ctx context.Context) (*voucherdata.Provided, error) Put(ctx context.Context, provided *voucherdata.Provided) error }
Click to show internal directories.
Click to hide internal directories.