notify

package
v0.1604.0-MLPAB2747lpa... Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package notify provides a client for GOV.UK's Notify service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttorneyOptedOutEmail added in v0.1313.0

type AttorneyOptedOutEmail struct {
	Greeting          string
	AttorneyFullName  string
	DonorFullName     string
	LpaType           string
	LpaUID            string
	DonorStartPageURL string
}

type CertificateProviderActingDigitallyHasConfirmedPersonalDetailsLPADetailsChangedPromptSMS added in v0.867.0

type CertificateProviderActingDigitallyHasConfirmedPersonalDetailsLPADetailsChangedPromptSMS struct {
	DonorFullNamePossessive string
	LpaType                 string
	LpaUID                  string
	DonorFirstNames         string
}

type CertificateProviderActingDigitallyHasNotConfirmedPersonalDetailsLPADetailsChangedPromptSMS added in v0.867.0

type CertificateProviderActingDigitallyHasNotConfirmedPersonalDetailsLPADetailsChangedPromptSMS struct {
	DonorFullName string
	LpaType       string
}

type CertificateProviderActingOnPaperDetailsChangedSMS added in v0.864.0

type CertificateProviderActingOnPaperDetailsChangedSMS struct {
	DonorFullName   string
	LpaUID          string
	DonorFirstNames string
}

type CertificateProviderActingOnPaperMeetingPromptSMS added in v0.864.0

type CertificateProviderActingOnPaperMeetingPromptSMS struct {
	DonorFullName                   string
	LpaType                         string
	DonorFirstNames                 string
	CertificateProviderStartPageURL string
}

type CertificateProviderCertificateProvidedEmail added in v0.842.0

type CertificateProviderCertificateProvidedEmail struct {
	DonorFullNamePossessive     string
	LpaType                     string
	CertificateProviderFullName string
	CertificateProvidedDateTime string
	DonorFirstNamesPossessive   string
}

type CertificateProviderFailedIdentityCheckEmail added in v0.1483.0

type CertificateProviderFailedIdentityCheckEmail struct {
	Greeting                    string
	DonorFullName               string
	CertificateProviderFullName string
	LpaType                     string
	DonorStartPageURL           string
}

type CertificateProviderInviteEmail

type CertificateProviderInviteEmail struct {
	DonorFullName                string
	LpaType                      string
	CertificateProviderFullName  string
	DonorFirstNames              string
	DonorFirstNamesPossessive    string
	WhatLpaCovers                string
	CertificateProviderStartURL  string
	ShareCode                    string
	CertificateProviderOptOutURL string
}

type CertificateProviderOptedOutPostWitnessingEmail added in v0.1255.0

type CertificateProviderOptedOutPostWitnessingEmail struct {
	Greeting                      string
	CertificateProviderFirstNames string
	CertificateProviderFullName   string
	DonorFullName                 string
	LpaType                       string
	LpaUID                        string
	DonorStartPageURL             string
}

type CertificateProviderOptedOutPreWitnessingEmail added in v0.1255.0

type CertificateProviderOptedOutPreWitnessingEmail struct {
	Greeting                    string
	CertificateProviderFullName string
	DonorFullName               string
	LpaType                     string
	LpaUID                      string
	DonorStartPageURL           string
}

type CertificateProviderProvideCertificatePromptEmail added in v0.864.0

type CertificateProviderProvideCertificatePromptEmail struct {
	DonorFullName               string
	DonorFullNamePossessive     string
	LpaType                     string
	CertificateProviderFullName string
	CertificateProviderStartURL string
	ShareCode                   string
}

type Client

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

func New

func New(logger Logger, isProduction bool, baseURL, apiKey string, httpClient Doer, eventClient EventClient, bundle *localize.Bundle) (*Client, error)

func (*Client) EmailGreeting added in v0.1346.0

func (c *Client) EmailGreeting(lpa *lpadata.Lpa) string

func (*Client) SendActorEmail added in v0.980.0

func (c *Client) SendActorEmail(ctx context.Context, to ToEmail, lpaUID string, email Email) error

func (*Client) SendActorSMS added in v0.992.0

func (c *Client) SendActorSMS(ctx context.Context, to ToMobile, lpaUID string, sms SMS) error

func (*Client) SendEmail added in v0.881.0

func (c *Client) SendEmail(ctx context.Context, to ToEmail, email Email) error

type Doer

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

type DonorAccessEmail added in v0.1079.0

type DonorAccessEmail struct {
	SupporterFullName string
	OrganisationName  string
	LpaType           string
	DonorName         string
	URL               string
	ShareCode         string
}

type DonorIdentityCheckExpiredEmail added in v0.1393.0

type DonorIdentityCheckExpiredEmail struct{}

type Email

type Email interface {
	// contains filtered or unexported methods
}

type EventClient added in v0.980.0

type EventClient interface {
	SendNotificationSent(ctx context.Context, event event.NotificationSent) error
}

type InitialOriginalAttorneyEmail added in v0.881.0

type InitialOriginalAttorneyEmail struct {
	DonorFullName             string
	LpaType                   string
	AttorneyFullName          string
	DonorFirstNames           string
	AttorneyStartPageURL      string
	ShareCode                 string
	DonorFirstNamesPossessive string
	AttorneyOptOutURL         string
}

type InitialReplacementAttorneyEmail added in v0.883.0

type InitialReplacementAttorneyEmail struct {
	DonorFullName             string
	LpaType                   string
	AttorneyFullName          string
	DonorFirstNames           string
	AttorneyStartPageURL      string
	ShareCode                 string
	DonorFirstNamesPossessive string
	AttorneyOptOutURL         string
}

type Logger added in v0.1178.0

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

type OrganisationMemberInviteEmail added in v0.997.0

type OrganisationMemberInviteEmail struct {
	OrganisationName      string
	InviterFullName       string
	InviterEmail          string
	InviteCode            string
	JoinAnOrganisationURL string
}

type PaymentConfirmationEmail added in v0.1311.0

type PaymentConfirmationEmail struct {
	DonorFullNamesPossessive string
	LpaType                  string
	PaymentCardFullName      string
	LpaReferenceNumber       string
	PaymentReferenceID       string
	PaymentConfirmationDate  string
	AmountPaidWithCurrency   string
}

type SMS added in v0.891.0

type SMS interface {
	// contains filtered or unexported methods
}

type Sms

type Sms struct {
	PhoneNumber     string            `json:"phone_number"`
	TemplateID      string            `json:"template_id"`
	Personalisation map[string]string `json:"personalisation,omitempty"`
	Reference       string            `json:"reference,omitempty"`
}

type To added in v0.1579.0

type To interface {
	ToEmail
	ToMobile
}

func ToCertificateProvider added in v0.1579.0

func ToCertificateProvider(certificateProvider donordata.CertificateProvider) To

ToCertificateProvider should only be used for the initial communication with the certificate provider, after that it may be possible to use the data they have entered so only use this as a fallback.

func ToDonor added in v0.1579.0

func ToDonor(donor *donordata.Provided) To

func ToLpaAttorney added in v0.1579.0

func ToLpaAttorney(attorney lpadata.Attorney) To

func ToLpaCertificateProvider added in v0.1579.0

func ToLpaCertificateProvider(provided *certificateproviderdata.Provided, lpa *lpadata.Lpa) To

func ToLpaDonor added in v0.1579.0

func ToLpaDonor(lpa *lpadata.Lpa) To

func ToLpaTrustCorporation added in v0.1579.0

func ToLpaTrustCorporation(trustCorporation lpadata.TrustCorporation) To

func ToProvidedCertificateProvider added in v0.1579.0

func ToProvidedCertificateProvider(provided *certificateproviderdata.Provided, certificateProvider donordata.CertificateProvider) To

type ToEmail added in v0.1579.0

type ToEmail interface {
	// contains filtered or unexported methods
}

func ToCustomEmail added in v0.1579.0

func ToCustomEmail(lang localize.Lang, email string) ToEmail

func ToPayee added in v0.1579.0

func ToPayee(resp pay.GetPaymentResponse) ToEmail

func ToVoucher added in v0.1579.0

func ToVoucher(voucher donordata.Voucher) ToEmail

type ToMobile added in v0.1579.0

type ToMobile interface {
	// contains filtered or unexported methods
}

func ToIndependentWitness added in v0.1579.0

func ToIndependentWitness(independentWitness donordata.IndependentWitness) ToMobile

type VoucherHasConfirmedDonorIdentityEmail added in v0.1462.0

type VoucherHasConfirmedDonorIdentityEmail struct {
	VoucherFullName   string
	DonorFullName     string
	DonorStartPageURL string
}

type VoucherHasConfirmedDonorIdentityOnSignedLpaEmail added in v0.1462.0

type VoucherHasConfirmedDonorIdentityOnSignedLpaEmail struct {
	VoucherFullName   string
	DonorFullName     string
	DonorStartPageURL string
}

type VoucherHasConfirmedDonorIdentityOnSignedLpaSMS added in v0.1462.0

type VoucherHasConfirmedDonorIdentityOnSignedLpaSMS struct {
	VoucherFullName   string
	DonorStartPageURL string
}

type VoucherHasConfirmedDonorIdentitySMS added in v0.1462.0

type VoucherHasConfirmedDonorIdentitySMS struct {
	VoucherFullName   string
	DonorFullName     string
	DonorStartPageURL string
}

type VoucherInformedTheyAreNoLongerNeededToVouchEmail added in v0.1578.0

type VoucherInformedTheyAreNoLongerNeededToVouchEmail struct {
	VoucherFullName string
	DonorFullName   string
}

type VoucherInviteEmail added in v0.1408.0

type VoucherInviteEmail struct {
	VoucherFullName           string
	DonorFullName             string
	DonorFirstNamesPossessive string
	DonorFirstNames           string
	LpaType                   string
	VoucherStartPageURL       string
}

type VouchingFailedAttemptEmail added in v0.1462.0

type VouchingFailedAttemptEmail struct {
	Greeting          string
	VoucherFullName   string
	DonorStartPageURL string
}

type VouchingShareCodeEmail added in v0.1407.0

type VouchingShareCodeEmail struct {
	ShareCode       string
	VoucherFullName string
	DonorFullName   string
	LpaType         string
}

type VouchingShareCodeSMS added in v0.1407.0

type VouchingShareCodeSMS struct {
	ShareCode                 string
	DonorFullNamePossessive   string
	LpaType                   string
	VoucherFullName           string
	DonorFirstNamesPossessive string
}

type WitnessCodeSMS added in v0.867.0

type WitnessCodeSMS struct {
	WitnessCode   string
	DonorFullName string
	LpaType       string
}

Jump to

Keyboard shortcuts

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