{"modulePath":"github.com/stephen-soltesz/github-webhook-receiver","version":"v0.0.0-20200210200834-da893e214504","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package githubx\n\nPackage githubx extends operations in the google/go-github package.\n\n## Functions\n\n```go\nfunc NewAppClient(privateKey string, appID, installationID int64) *github.Client\n```\nNewAppClient creates a new \\*github.Client authenticated using the given privateKey file name, appID, and installationID. Future operations are performed as the Github App associated with these parameters.\n\n```go\nfunc NewClient(installationID int64) *github.Client\n```\nNewClient creates a new, authenticated \\*github.Client. Depending on the value of installationID, NewClient performs authentication using available environment variables. If required environment variables are not found, NewClient logs a warning and returns nil.\n\nIf the installationID is zero, then NewClient authenticates using a personal access token from the GITHUB\\_AUTH\\_TOKEN environment vairable. Personal access tokens perform actions as the user associated with the token.\n\nIf the installationID is not zero, then NewClient authenticates using a Github App private key read from the absolute path contained in GITHUB\\_PRIVATE\\_KEY and the Github App ID (About -\u003e ID, \\*not\\* \"OAuth Client ID\") contained in the GITHUB\\_APP\\_ID environment variables. Both values are created during Github App registration. Github Apps perform actions as the application not as a user, so permissions may have different restrictions.\n\nMultiple users may install a single Github App, so each installation receives a unique \"installation ID\". All events related to a specific installation include the installation ID.\n\n```go\nfunc NewPersonalClient(authToken string) *github.Client\n```\nNewPersonalClient creates a \\*github.Client authenticated using the given Github authToken. Future operations are performed as the user associated with the token.\n\n","path":"github.com/stephen-soltesz/github-webhook-receiver/githubx","name":"githubx","synopsis":"Package githubx extends operations in the google/go-github package.","isRedistributable":true}
