{"modulePath":"github.com/integrations/terraform-provider-github/v4","version":"v4.31.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package github\n\n## Constants\n\n```go\nconst (\n\tPROTECTION_ALLOWS_DELETIONS                 = \"allows_deletions\"\n\tPROTECTION_ALLOWS_FORCE_PUSHES              = \"allows_force_pushes\"\n\tPROTECTION_BLOCKS_CREATIONS                 = \"blocks_creations\"\n\tPROTECTION_DISMISSES_STALE_REVIEWS          = \"dismiss_stale_reviews\"\n\tPROTECTION_IS_ADMIN_ENFORCED                = \"enforce_admins\"\n\tPROTECTION_PATTERN                          = \"pattern\"\n\tPROTECTION_REQUIRED_APPROVING_REVIEW_COUNT  = \"required_approving_review_count\"\n\tPROTECTION_REQUIRED_STATUS_CHECK_CONTEXTS   = \"contexts\"\n\tPROTECTION_REQUIRES_APPROVING_REVIEWS       = \"required_pull_request_reviews\"\n\tPROTECTION_REQUIRES_CODE_OWNER_REVIEWS      = \"require_code_owner_reviews\"\n\tPROTECTION_REQUIRES_COMMIT_SIGNATURES       = \"require_signed_commits\"\n\tPROTECTION_REQUIRES_LINEAR_HISTORY          = \"required_linear_history\"\n\tPROTECTION_REQUIRES_CONVERSATION_RESOLUTION = \"require_conversation_resolution\"\n\tPROTECTION_REQUIRES_STATUS_CHECKS           = \"required_status_checks\"\n\tPROTECTION_REQUIRES_STRICT_STATUS_CHECKS    = \"strict\"\n\tPROTECTION_RESTRICTS_PUSHES                 = \"push_restrictions\"\n\tPROTECTION_RESTRICTS_REVIEW_DISMISSALS      = \"restrict_dismissals\"\n\tPROTECTION_RESTRICTS_REVIEW_DISMISSERS      = \"dismissal_restrictions\"\n\tPROTECTION_PULL_REQUESTS_BYPASSERS          = \"pull_request_bypassers\"\n\n\tREPOSITORY_ID = \"repository_id\"\n)\n```\n\n## Functions\n\n```go\nfunc GenerateOAuthTokenFromApp(baseURL, appID, appInstallationID, pemData string) (string, error)\n```\nGenerateOAuthTokenFromApp generates a GitHub OAuth access token from a set of valid GitHub App credentials. The returned token can be used to interact with both GitHub's REST and GraphQL APIs.\n\n```go\nfunc NewEtagTransport(rt http.RoundTripper) *etagTransport\n```\n\n```go\nfunc OwnerOrOrgEnvDefaultFunc() (interface{}, error)\n```\n\n```go\nfunc Provider() terraform.ResourceProvider\n```\n\n```go\nfunc RateLimitedHTTPClient(client *http.Client, writeDelay time.Duration, readDelay time.Duration) *http.Client\n```\n\n## Types\n\n```go\ntype Actor struct {\n\tID   githubv4.ID\n\tName githubv4.String\n}\n```\n\n```go\ntype BranchProtectionResourceData struct {\n\tAllowsDeletions                bool\n\tAllowsForcePushes              bool\n\tBlocksCreations                bool\n\tBranchProtectionRuleID         string\n\tBypassPullRequestActorIDs      []string\n\tDismissesStaleReviews          bool\n\tIsAdminEnforced                bool\n\tPattern                        string\n\tPushActorIDs                   []string\n\tRepositoryID                   string\n\tRequiredApprovingReviewCount   int\n\tRequiredStatusCheckContexts    []string\n\tRequiresApprovingReviews       bool\n\tRequiresCodeOwnerReviews       bool\n\tRequiresCommitSignatures       bool\n\tRequiresLinearHistory          bool\n\tRequiresConversationResolution bool\n\tRequiresStatusChecks           bool\n\tRequiresStrictStatusChecks     bool\n\tRestrictsPushes                bool\n\tRestrictsReviewDismissals      bool\n\tReviewDismissalActorIDs        []string\n}\n```\n\n```go\ntype BranchProtectionRule struct {\n\tRepository struct {\n\t\tID   githubv4.String\n\t\tName githubv4.String\n\t}\n\tPushAllowances struct {\n\t\tNodes []PushActorTypes\n\t} `graphql:\"pushAllowances(first: 100)\"`\n\tReviewDismissalAllowances struct {\n\t\tNodes []DismissalActorTypes\n\t} `graphql:\"reviewDismissalAllowances(first: 100)\"`\n\tBypassPullRequestAllowances struct {\n\t\tNodes []BypassPullRequestActorTypes\n\t} `graphql:\"bypassPullRequestAllowances(first: 100)\"`\n\tAllowsDeletions                githubv4.Boolean\n\tAllowsForcePushes              githubv4.Boolean\n\tBlocksCreations                githubv4.Boolean\n\tDismissesStaleReviews          githubv4.Boolean\n\tID                             githubv4.ID\n\tIsAdminEnforced                githubv4.Boolean\n\tPattern                        githubv4.String\n\tRequiredApprovingReviewCount   githubv4.Int\n\tRequiredStatusCheckContexts    []githubv4.String\n\tRequiresApprovingReviews       githubv4.Boolean\n\tRequiresCodeOwnerReviews       githubv4.Boolean\n\tRequiresCommitSignatures       githubv4.Boolean\n\tRequiresLinearHistory          githubv4.Boolean\n\tRequiresConversationResolution githubv4.Boolean\n\tRequiresStatusChecks           githubv4.Boolean\n\tRequiresStrictStatusChecks     githubv4.Boolean\n\tRestrictsPushes                githubv4.Boolean\n\tRestrictsReviewDismissals      githubv4.Boolean\n}\n```\n\n```go\ntype BypassPullRequestActorTypes struct {\n\tActor struct {\n\t\tTeam Actor `graphql:\"... on Team\"`\n\t\tUser Actor `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype Config struct {\n\tToken      string\n\tOwner      string\n\tBaseURL    string\n\tInsecure   bool\n\tWriteDelay time.Duration\n\tReadDelay  time.Duration\n}\n```\n\n```go\nfunc (c *Config) Anonymous() bool\n```\n\n```go\nfunc (c *Config) AnonymousHTTPClient() *http.Client\n```\n\n```go\nfunc (c *Config) AuthenticatedHTTPClient() *http.Client\n```\n\n```go\nfunc (c *Config) ConfigureOwner(owner *Owner) (*Owner, error)\n```\n\n```go\nfunc (c *Config) Meta() (interface{}, error)\n```\nMeta returns the meta parameter that is passed into subsequent resources [https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#ConfigureFunc](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#ConfigureFunc)\n\n```go\nfunc (c *Config) NewGraphQLClient(client *http.Client) (*githubv4.Client, error)\n```\n\n```go\nfunc (c *Config) NewRESTClient(client *http.Client) (*github.Client, error)\n```\n\n```go\ntype DismissalActorTypes struct {\n\tActor struct {\n\t\tTeam Actor `graphql:\"... on Team\"`\n\t\tUser Actor `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype MemberChange struct {\n\tOld, New map[string]interface{}\n}\n```\n\n```go\ntype Owner struct {\n\tStopContext    context.Context\n\tIsOrganization bool\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype PageInfo struct {\n\tEndCursor   githubv4.String\n\tHasNextPage bool\n}\n```\n\n```go\ntype PushActorTypes struct {\n\tActor struct {\n\t\tApp  Actor `graphql:\"... on App\"`\n\t\tTeam Actor `graphql:\"... on Team\"`\n\t\tUser Actor `graphql:\"... on User\"`\n\t}\n}\n```\n\n```go\ntype RateLimitTransport struct {\n\t// contains filtered or unexported fields\n}\n```\nRateLimitTransport implements GitHub's best practices for avoiding rate limits [https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits](https://developer.github.com/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)\n\n```go\nfunc NewRateLimitTransport(rt http.RoundTripper, options ...RateLimitTransportOption) *RateLimitTransport\n```\nNewRateLimitTransport takes in an http.RoundTripper and a variadic list of optional functions that modify the RateLimitTransport struct itself. This may be used to alter the write delay in between requests, for example.\n\n```go\nfunc (rlt *RateLimitTransport) RoundTrip(req *http.Request) (*http.Response, error)\n```\n\n```go\ntype RateLimitTransportOption func(*RateLimitTransport)\n```\n\n```go\nfunc WithReadDelay(d time.Duration) RateLimitTransportOption\n```\nWithReadDelay is used to set the delay between read requests\n\n```go\nfunc WithWriteDelay(d time.Duration) RateLimitTransportOption\n```\nWithWriteDelay is used to set the write delay between requests\n\n```go\ntype TeamsQuery struct {\n\tOrganization struct {\n\t\tID    githubv4.String\n\t\tTeams struct {\n\t\t\tNodes []struct {\n\t\t\t\tID          githubv4.String\n\t\t\t\tDatabaseID  githubv4.Int\n\t\t\t\tSlug        githubv4.String\n\t\t\t\tName        githubv4.String\n\t\t\t\tDescription githubv4.String\n\t\t\t\tPrivacy     githubv4.String\n\t\t\t\tMembers     struct {\n\t\t\t\t\tNodes []struct {\n\t\t\t\t\t\tLogin githubv4.String\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tRepositories struct {\n\t\t\t\t\tNodes []struct {\n\t\t\t\t\t\tName githubv4.String\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tPageInfo PageInfo\n\t\t} `graphql:\"teams(first:$first, after:$cursor, rootTeamsOnly:$rootTeamsOnly)\"`\n\t} `graphql:\"organization(login:$login)\"`\n}\n```\n\n","path":"github.com/integrations/terraform-provider-github/v4/github","name":"github","synopsis":"","isRedistributable":true}
