Documentation
¶
Overview ¶
Package ghsecret turns credential Secrets referenced by Forge and Integration resources into GitHub clients. One Secret shape serves both kinds: a PAT under "token" (dev), or a GitHub App under "appID" + "privateKey" (production), with "webhookSecret" carrying the receiver HMAC secret where relevant. Apps are memoized per Secret resourceVersion so rotation transparently rebuilds while steady state costs nothing.
Index ¶
Constants ¶
const ( // KeyToken is a PAT — the dev fallback; production uses App auth. KeyToken = "token" // KeyAppID is the GitHub App ID (decimal string). KeyAppID = "appID" // KeyPrivateKey is the App's PEM-encoded RSA private key. KeyPrivateKey = "privateKey" // KeyWebhookSecret is the receiver HMAC secret. KeyWebhookSecret = "webhookSecret" )
Secret keys.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Apps ¶
type Apps struct {
// contains filtered or unexported fields
}
Apps memoizes ghclient.App instances per credential Secret.
func (*Apps) FromSecret ¶
FromSecret builds (or returns the memoized) App from the secret's appID/privateKey keys. baseURL points at GHES; empty means github.com.