Documentation
¶
Overview ¶
Package fakegithub is a mock of the GitHub REST API badil calls, served under /api/v3/ from in-memory state, with a control API under /_mock/ that changes the state and sends the matching signed webhook to badil. It is a dev and test tool, not part of badil's release.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// WebURL is the web base of every html_url and repo URL, without a
// trailing "/" (badil's GITHUB_URL).
WebURL string
// WebhookURL is where webhooks are sent: badil's .../webhooks/github.
WebhookURL string
// WebhookSecret signs every webhook (X-Hub-Signature-256).
WebhookSecret string
// InstallationID is the only installation the mock knows; every webhook
// carries it.
InstallationID int64
// AppSlug is the App's slug; its bot user is <AppSlug>[bot].
AppSlug string
// BotUserID is the user id of the App's bot.
BotUserID int64
// TokenTTL is the lifetime of issued installation tokens, defaultTokenTTL
// when zero.
TokenTTL time.Duration
}
Config configures a Server.