{"modulePath":"github.com/cruxstack/github-app-setup-go","version":"v0.8.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package installer\n\nPackage installer provides a web-based installer for creating GitHub Apps using the GitHub App Manifest flow.\n\n## Constants\n\n```go\nconst (\n\tEnvGitHubURL = \"GITHUB_URL\"\n\tEnvGitHubOrg = \"GITHUB_ORG\"\n)\n```\n\n## Types\n\n```go\ntype Config struct {\n\tStore              configstore.Store\n\tManifest           Manifest\n\tAppDisplayName     string\n\tGitHubURL          string\n\tGitHubOrg          string\n\tRedirectURL        string\n\tWebhookURL         string\n\tOnCredentialsSaved CredentialsSavedFunc\n\n\t// Icon is an optional logo for the app: a PNG, JPEG, or GIF of at most\n\t// 1 MB. GitHub can't set a logo from a manifest, so the installer pages\n\t// show it with a link to download it and say where to upload it.\n\tIcon []byte\n\n\t// OnReloadNeeded is called after credentials are saved to trigger\n\t// a configuration reload. This should be wired to the Runtime's\n\t// ReloadCallback() or a custom reload function.\n\tOnReloadNeeded func()\n}\n```\nConfig holds the installer configuration.\n\n```go\nfunc NewConfigFromEnv() Config\n```\nNewConfigFromEnv creates a Config from environment variables.\n\n```go\ntype CredentialsSavedFunc func(ctx context.Context, creds *configstore.AppCredentials) error\n```\nCredentialsSavedFunc is called after credentials are saved.\n\n```go\ntype Handler struct {\n\t// contains filtered or unexported fields\n}\n```\nHandler handles the GitHub App manifest installation flow.\n\n```go\nfunc New(cfg Config) (*Handler, error)\n```\nNew creates a new installer Handler with the given configuration.\n\n```go\nfunc (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)\n```\nServeHTTP implements http.Handler.\n\n```go\ntype HookAttributes struct {\n\tURL    string `json:\"url\"`\n\tActive bool   `json:\"active\"`\n}\n```\nHookAttributes configures the webhook for the GitHub App.\n\n```go\ntype Manifest struct {\n\tName           string            `json:\"name,omitempty\"`\n\tURL            string            `json:\"url\"`\n\tHookAttributes HookAttributes    `json:\"hook_attributes\"`\n\tRedirectURL    string            `json:\"redirect_url\"`\n\tPublic         bool              `json:\"public\"`\n\tDefaultPerms   map[string]string `json:\"default_permissions\"`\n\tDefaultEvents  []string          `json:\"default_events\"`\n}\n```\nManifest represents a GitHub App manifest.\n\n```go\nfunc (m *Manifest) Clone() *Manifest\n```\nClone returns a deep copy of the manifest.\n\n","path":"github.com/cruxstack/github-app-setup-go/installer","name":"installer","synopsis":"Package installer provides a web-based installer for creating GitHub Apps using the GitHub App Manifest flow.","isRedistributable":true}
