Documentation
¶
Overview ¶
SPDX-Copyright: Copyright (c) Brad Rydzewski, project contributors, Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Brad Rydzewski, project contributors, Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-Copyright: Copyright (c) Brad Rydzewski, project contributors, Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Brad Rydzewski, project contributors, Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-Copyright: Copyright (c) Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-Copyright: Copyright (c) Brad Rydzewski, project contributors, Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Brad Rydzewski, project contributors, Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-Copyright: Copyright (c) Brad Rydzewski, project contributors, Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Brad Rydzewski, project contributors, Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
SPDX-Copyright: Copyright (c) Capital One Services, LLC SPDX-License-Identifier: Apache-2.0 Copyright 2017 Capital One Services, LLC
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type Branch
- type Client
- type Github
- func (g *Github) Capabilities(ctx context.Context, u *model.User) (*model.Capabilities, error)
- func (g *Github) CompareBranches(ctx context.Context, u *model.User, repo *model.Repo, base string, head string, ...) (model.BranchCompare, error)
- func (g *Github) CreateEmptyCommit(ctx context.Context, u *model.User, r *model.Repo, sha, msg string) (string, error)
- func (g *Github) CreatePR(ctx context.Context, u *model.User, r *model.Repo, ...) (int, error)
- func (g *Github) CreateReference(ctx context.Context, u *model.User, r *model.Repo, sha, name string) (string, error)
- func (g *Github) CreateURLCompare(c context.Context, u *model.User, r *model.Repo, sha1, sha2 string) string
- func (g *Github) DelHook(ctx context.Context, user *model.User, repo *model.Repo, link string) error
- func (g *Github) DelOrgHook(ctx context.Context, user *model.User, org *model.OrgDb, link string) error
- func (g *Github) DeleteBranch(ctx context.Context, u *model.User, repo *model.Repo, name string) error
- func (g *Github) GetAllComments(ctx context.Context, u *model.User, r *model.Repo, num int) ([]*model.Comment, error)
- func (g *Github) GetAllReviews(ctx context.Context, u *model.User, r *model.Repo, num int) ([]*model.Review, error)
- func (g *Github) GetCollaborators(ctx context.Context, user *model.User, owner, name string) (set.Set, error)
- func (g *Github) GetCommentsSinceHead(ctx context.Context, u *model.User, r *model.Repo, num int, noUIMerge bool) ([]*model.Comment, error)
- func (g *Github) GetCommits(ctx context.Context, u *model.User, r *model.Repo, sha string, ...) ([]string, int, error)
- func (g *Github) GetContents(ctx context.Context, u *model.User, r *model.Repo, path string) ([]byte, error)
- func (g *Github) GetIssue(ctx context.Context, u *model.User, r *model.Repo, number int) (model.Issue, error)
- func (g *Github) GetOrg(ctx context.Context, user *model.User, owner string) (*model.OrgDb, error)
- func (g *Github) GetOrgMembers(ctx context.Context, user *model.User, org string) (set.Set, error)
- func (g *Github) GetOrgPerm(ctx context.Context, user *model.User, owner string) (*model.Perm, error)
- func (g *Github) GetOrgRepos(ctx context.Context, u *model.User, owner string) ([]*model.Repo, error)
- func (g *Github) GetOrgs(ctx context.Context, user *model.User) ([]*model.GitHubOrg, error)
- func (g *Github) GetPerm(ctx context.Context, user *model.User, owner, name string) (*model.Perm, error)
- func (g *Github) GetPerson(ctx context.Context, user *model.User, login string) (*model.Person, error)
- func (g *Github) GetPullRequest(ctx context.Context, u *model.User, r *model.Repo, number int) (model.PullRequest, error)
- func (g *Github) GetPullRequestCommits(ctx context.Context, u *model.User, r *model.Repo, number int) ([]model.Commit, error)
- func (g *Github) GetPullRequestFiles(ctx context.Context, u *model.User, r *model.Repo, number int) ([]model.CommitFile, error)
- func (g *Github) GetPullRequestsForCommit(ctx context.Context, u *model.User, r *model.Repo, sha *string) ([]model.PullRequest, error)
- func (g *Github) GetRepo(ctx context.Context, user *model.User, owner, name string) (*model.Repo, error)
- func (g *Github) GetReviewsSinceHead(ctx context.Context, u *model.User, r *model.Repo, num int, noUIMerge bool) ([]*model.Review, error)
- func (g *Github) GetScopes(ctx context.Context, token string) (string, error)
- func (g *Github) GetStatus(ctx context.Context, u *model.User, r *model.Repo, sha string) (model.CombinedStatus, error)
- func (g *Github) GetTeamMembers(ctx context.Context, user *model.User, org string, team string) (set.Set, error)
- func (g *Github) GetUser(ctx context.Context, res http.ResponseWriter, req *http.Request) (*model.User, error)
- func (g *Github) GetUserRepos(ctx context.Context, u *model.User) ([]*model.Repo, error)
- func (g *Github) GetUserToken(ctx context.Context, token string) (string, error)
- func (g *Github) HasRequiredStatus(ctx context.Context, u *model.User, r *model.Repo, branch, sha string) (bool, error)
- func (g *Github) IsHeadUIMerge(ctx context.Context, u *model.User, r *model.Repo, num int) (bool, error)
- func (g *Github) ListTags(ctx context.Context, u *model.User, r *model.Repo) ([]model.Tag, error)
- func (g *Github) ListTeams(ctx context.Context, user *model.User, org string) (set.Set, error)
- func (g *Github) MergePR(ctx context.Context, u *model.User, r *model.Repo, ...) (string, error)
- func (g *Github) RevokeAuthorization(ctx context.Context, user *model.User) error
- func (g *Github) ScheduleDeployment(ctx context.Context, u *model.User, r *model.Repo, d model.DeploymentInfo) error
- func (g *Github) SetHook(ctx context.Context, user *model.User, repo *model.Repo, link string) error
- func (g *Github) SetOrgHook(ctx context.Context, user *model.User, org *model.OrgDb, link string) error
- func (g *Github) SetStatus(ctx context.Context, u *model.User, r *model.Repo, ...) error
- func (g *Github) Tag(ctx context.Context, u *model.User, r *model.Repo, tag string, sha string) error
- func (g *Github) WriteComment(ctx context.Context, u *model.User, r *model.Repo, num int, message string) error
- type UserTransport
Constants ¶
const ( DefaultURL = "https://github.com" DefaultAPI = "https://api.github.com/" DefaultScope = "read:org,repo:status" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClientToken ¶
NewClientToken returns a client at the specified url that authenticates all outbound requests with the given token.
type Github ¶
func (*Github) Capabilities ¶
func (*Github) CompareBranches ¶
func (*Github) CreateEmptyCommit ¶
func (*Github) CreateReference ¶
func (*Github) CreateURLCompare ¶
func (*Github) DelOrgHook ¶
func (*Github) DeleteBranch ¶
func (*Github) GetAllComments ¶
func (*Github) GetAllReviews ¶
func (*Github) GetCollaborators ¶
func (*Github) GetCommentsSinceHead ¶
func (*Github) GetCommits ¶
func (*Github) GetContents ¶
func (*Github) GetOrgMembers ¶
func (*Github) GetOrgPerm ¶
func (*Github) GetOrgRepos ¶
func (*Github) GetPullRequest ¶
func (*Github) GetPullRequestCommits ¶
func (*Github) GetPullRequestFiles ¶
func (*Github) GetPullRequestsForCommit ¶
func (*Github) GetReviewsSinceHead ¶
func (*Github) GetTeamMembers ¶
func (*Github) GetUserRepos ¶
func (*Github) GetUserToken ¶
func (*Github) HasRequiredStatus ¶
func (*Github) IsHeadUIMerge ¶
func (*Github) RevokeAuthorization ¶
func (*Github) ScheduleDeployment ¶
func (*Github) SetOrgHook ¶
type UserTransport ¶
type UserTransport struct { Login string Event string // Transport is the underlying HTTP transport to use when making requests. // It will default to http.DefaultTransport if nil. Transport http.RoundTripper }