Documentation
¶
Index ¶
- func DummyOK(w http.ResponseWriter, req *http.Request)
- func LocationRedirect(target string) func(w http.ResponseWriter, req *http.Request)
- func Markup(ctx *context.Context)
- func RobotsTxt(w http.ResponseWriter, req *http.Request)
- func SSHInfo(rw http.ResponseWriter, req *http.Request)
- func SiteManifest(w http.ResponseWriter, req *http.Request)
- func StaticRedirect(target string) func(w http.ResponseWriter, req *http.Request)
- func Swagger(ctx *context.Context)
- func Sync(w http.ResponseWriter, req *http.Request)
- func WebBannerDismiss(ctx *context.Context)
- func WebThemeApply(ctx *context.Context)
- func WebThemeList(ctx *context.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocationRedirect ¶
func LocationRedirect(target string) func(w http.ResponseWriter, req *http.Request)
func SiteManifest ¶
func SiteManifest(w http.ResponseWriter, req *http.Request)
func StaticRedirect ¶
func StaticRedirect(target string) func(w http.ResponseWriter, req *http.Request)
func Sync ¶ added in v1.26.18
func Sync(w http.ResponseWriter, req *http.Request)
Sync is the one entry point for "this repo changed upstream, take it now". It exists because an org-level webhook is a single static URL that cannot carry a token header; authenticated callers already have the software's per-repo mirror-sync APIs, so this adds no second door for them.
Direction is a property of the repo, not of this route — a pull mirror fetches, and that fetch propagates to its push mirrors (services/mirror), so one upstream push reaches every platform we mirror to in one hop.
Mounted ahead of the session middleware because the credential is the payload itself: HMAC-SHA256 over the exact bytes in X-Hub-Signature-256, keyed by [mirror] SYNC_SECRET. Fail-closed — an unset secret refuses everything.
A verified event naming a repo we do not mirror is 200, not 404: a delivery log is not a repository-existence oracle, and red deliveries for repos we deliberately skip would train the reader to ignore red.
func WebBannerDismiss ¶
func WebThemeApply ¶
func WebThemeList ¶
Types ¶
This section is empty.