Documentation
¶
Overview ¶
Package testoutbox defines the capturing email and SMS senders that authtest publishes as authtest.Outbox. It depends only on iam, so AuthKit's engine tests use it too.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
Channel string `json:"channel"` // "email" or "sms"
Kind iam.MessageKind `json:"kind"`
To string `json:"to"`
Language string `json:"language"`
Purpose iam.VerificationPurpose `json:"purpose,omitempty"`
Code string `json:"code,omitempty"`
Link string `json:"link,omitempty"`
// Token is the "token" parameter of Link's fragment (or query).
Token string `json:"token,omitempty"`
ContactChange *iam.ContactChange `json:"contact_change,omitempty"`
DeviceKey *iam.DeviceKeyNotice `json:"device_key,omitempty"`
At time.Time `json:"at"`
}
Message is one email or SMS AuthKit asked the host to deliver.
type Outbox ¶
type Outbox struct {
// contains filtered or unexported fields
}
Outbox records every message in order; it is safe for concurrent use. The zero value is ready: wire Email and SMS as Deps.Email and Deps.SMS.
func (*Outbox) Last ¶
Last returns the newest message of kind sent to to (an empty to matches any recipient). The test fails when there is none.
Click to show internal directories.
Click to hide internal directories.