Documentation
¶
Overview ¶
Package sentrymock is a fake of the part of Sentry's web API that kōjō reads (internal/surfaces/sentry): an organization and its issues. The development stacks run it (cmd/sentrymock) as alerts.sentry.base_url, so an alert that the end-to-end scenarios deliver is enriched as Sentry would enrich it, with no Sentry account.
Every issue whose ID is a number exists in the configured organization: its short ID is the prefix followed by the number, it is unresolved, and it was seen 3 times by 2 users. The API answers only the configured bearer token. Webhook deliveries are not sent from here: the scenarios sign and send them themselves, so they can also send a bad signature.
Index ¶
Constants ¶
const DefaultShortIDPrefix = "E2E-"
DefaultShortIDPrefix starts every issue's short ID when Options sets none.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
Mock is the fake API, an http.Handler.
type Options ¶
type Options struct {
// Org is the organization slug the API answers for. Required.
Org string
// Token is the only bearer token the API accepts; any token when empty.
Token string
// ShortIDPrefix starts each issue's short ID (DefaultShortIDPrefix when
// empty).
ShortIDPrefix string
Logger *slog.Logger
}
Options configures the mock.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
sentrymock
command
Command sentrymock serves the fake Sentry API of package sentrymock: the alerts.sentry.base_url of the development stacks (make dev-sbx, make dev-kind).
|
Command sentrymock serves the fake Sentry API of package sentrymock: the alerts.sentry.base_url of the development stacks (make dev-sbx, make dev-kind). |