{"modulePath":"github.com/nrfcloud/flux-extension-controller","version":"v0.3.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Types\n\n```go\ntype Client struct {\n\t// contains filtered or unexported fields\n}\n```\nClient wraps the GitHub client with App authentication\n\n```go\nfunc NewClient(cfg *config.GitHubConfig) (*Client, error)\n```\nNewClient creates a new GitHub client with App authentication\n\n```go\nfunc (c *Client) GenerateInstallationToken(ctx context.Context, repoURL string) (*github.InstallationToken, error)\n```\nGenerateInstallationToken creates an installation token for the repository\n\n```go\nfunc (c *Client) ValidateRepositoryURL(repoURL string) error\n```\nValidateRepositoryURL checks if the repository URL belongs to the configured organization\n\n```go\ntype GitHubClient interface {\n\tValidateRepositoryURL(repoURL string) error\n\tGenerateInstallationToken(ctx context.Context, repoURL string) (*github.InstallationToken, error)\n}\n```\nGitHubClient interface defines the methods needed for GitHub operations\n\n```go\ntype WebhookManager struct {\n\t*Client\n}\n```\nWebhookManager handles GitHub webhook operations\n\n```go\nfunc NewWebhookManager(client *Client) *WebhookManager\n```\nNewWebhookManager creates a new webhook manager\n\n```go\nfunc (w *WebhookManager) CreateWebhook(ctx context.Context, repoURL, webhookURL, secret string, events []string) (*github.Hook, error)\n```\nCreateWebhook creates a new webhook in the GitHub repository\n\n```go\nfunc (w *WebhookManager) DeleteWebhook(ctx context.Context, repoURL string, hookID int64) error\n```\nDeleteWebhook deletes a webhook\n\n```go\nfunc (w *WebhookManager) GetWebhook(ctx context.Context, repoURL string, hookID int64) (*github.Hook, error)\n```\nGetWebhook retrieves a webhook by ID\n\n```go\nfunc (w *WebhookManager) UpdateWebhook(ctx context.Context, repoURL string, hookID int64, webhookURL, secret string, events []string) (*github.Hook, error)\n```\nUpdateWebhook updates an existing webhook\n\n","path":"github.com/nrfcloud/flux-extension-controller/pkg/github","name":"github","synopsis":"","isRedistributable":true}
