Documentation
¶
Overview ¶
Package pushtest is a fake Web Push service and a fake browser for tests. The service checks each request the way real push services do (VAPID signature and audience, content coding, TTL) and the browser decrypts what it received, so a test sees the notification a person would.
Index ¶
Constants ¶
View Source
const Origin = "https://example.com"
Origin is the audience the VAPID claims must name. The test TLS certificate is for example.com, so tests reach the service under that name.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Browser ¶
type Browser struct {
// contains filtered or unexported fields
}
Browser is one push subscription's private side.
type Request ¶
type Request struct {
Path string
Header http.Header
Body []byte
Problem string // why it was refused, "" if accepted
}
Request is one push received by the service.
Click to show internal directories.
Click to hide internal directories.