misc

package
v1.26.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DummyOK

func DummyOK(w http.ResponseWriter, req *http.Request)

func LocationRedirect

func LocationRedirect(target string) func(w http.ResponseWriter, req *http.Request)

func Markup

func Markup(ctx *context.Context)

Markup render markup document to HTML

func RobotsTxt

func RobotsTxt(w http.ResponseWriter, req *http.Request)

func SSHInfo

func SSHInfo(rw 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 Swagger

func Swagger(ctx *context.Context)

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 WebBannerDismiss(ctx *context.Context)

func WebThemeApply

func WebThemeApply(ctx *context.Context)

func WebThemeList

func WebThemeList(ctx *context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL