Documentation ¶
Index ¶
- type Client
- func (c Client) CreateBlob(ctx context.Context, req *CreateBlobReq, opt ...requests.Option) (*CreateBlobResponse, error)
- func (c Client) CreateCommit(ctx context.Context, req *CreateCommitReq, opt ...requests.Option) (*CreateCommitResponse, error)
- func (c Client) CreateRef(ctx context.Context, req *CreateRefReq, opt ...requests.Option) (*CreateRefResponse, error)
- func (c Client) CreateTag(ctx context.Context, req *CreateTagReq, opt ...requests.Option) (*CreateTagResponse, error)
- func (c Client) CreateTree(ctx context.Context, req *CreateTreeReq, opt ...requests.Option) (*CreateTreeResponse, error)
- func (c Client) DeleteRef(ctx context.Context, req *DeleteRefReq, opt ...requests.Option) (*DeleteRefResponse, error)
- func (c Client) GetBlob(ctx context.Context, req *GetBlobReq, opt ...requests.Option) (*GetBlobResponse, error)
- func (c Client) GetCommit(ctx context.Context, req *GetCommitReq, opt ...requests.Option) (*GetCommitResponse, error)
- func (c Client) GetRef(ctx context.Context, req *GetRefReq, opt ...requests.Option) (*GetRefResponse, error)
- func (c Client) GetTag(ctx context.Context, req *GetTagReq, opt ...requests.Option) (*GetTagResponse, error)
- func (c Client) GetTree(ctx context.Context, req *GetTreeReq, opt ...requests.Option) (*GetTreeResponse, error)
- func (c Client) ListMatchingRefs(ctx context.Context, req *ListMatchingRefsReq, opt ...requests.Option) (*ListMatchingRefsResponse, error)
- func (c Client) UpdateRef(ctx context.Context, req *UpdateRefReq, opt ...requests.Option) (*UpdateRefResponse, error)
- type CreateBlobReq
- type CreateBlobReqBody
- type CreateBlobResponse
- type CreateCommitReq
- type CreateCommitReqBody
- type CreateCommitReqBodyAuthor
- type CreateCommitReqBodyCommitter
- type CreateCommitResponse
- type CreateRefReq
- type CreateRefReqBody
- type CreateRefResponse
- type CreateTagReq
- type CreateTagReqBody
- type CreateTagReqBodyTagger
- type CreateTagResponse
- type CreateTreeReq
- type CreateTreeReqBody
- type CreateTreeReqBodyTree
- type CreateTreeResponse
- type DeleteRefReq
- type DeleteRefResponse
- type GetBlobReq
- type GetBlobResponse
- type GetCommitReq
- type GetCommitResponse
- type GetRefReq
- type GetRefResponse
- type GetTagReq
- type GetTagResponse
- type GetTreeReq
- type GetTreeResponse
- type ListMatchingRefsReq
- type ListMatchingRefsResponse
- type UpdateRefReq
- type UpdateRefReqBody
- type UpdateRefResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a set of options to apply to requests
func (Client) CreateBlob ¶
func (c Client) CreateBlob(ctx context.Context, req *CreateBlobReq, opt ...requests.Option) (*CreateBlobResponse, error)
CreateBlob performs requests for "git/create-blob"
Create a blob.
POST /repos/{owner}/{repo}/git/blobs
https://developer.github.com/v3/git/blobs/#create-a-blob
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateCommit ¶
func (c Client) CreateCommit(ctx context.Context, req *CreateCommitReq, opt ...requests.Option) (*CreateCommitResponse, error)
CreateCommit performs requests for "git/create-commit"
Create a commit.
POST /repos/{owner}/{repo}/git/commits
https://developer.github.com/v3/git/commits/#create-a-commit
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateRef ¶
func (c Client) CreateRef(ctx context.Context, req *CreateRefReq, opt ...requests.Option) (*CreateRefResponse, error)
CreateRef performs requests for "git/create-ref"
Create a reference.
POST /repos/{owner}/{repo}/git/refs
https://developer.github.com/v3/git/refs/#create-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateTag ¶
func (c Client) CreateTag(ctx context.Context, req *CreateTagReq, opt ...requests.Option) (*CreateTagResponse, error)
CreateTag performs requests for "git/create-tag"
Create a tag object.
POST /repos/{owner}/{repo}/git/tags
https://developer.github.com/v3/git/tags/#create-a-tag-object
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) CreateTree ¶
func (c Client) CreateTree(ctx context.Context, req *CreateTreeReq, opt ...requests.Option) (*CreateTreeResponse, error)
CreateTree performs requests for "git/create-tree"
Create a tree.
POST /repos/{owner}/{repo}/git/trees
https://developer.github.com/v3/git/trees/#create-a-tree
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) DeleteRef ¶
func (c Client) DeleteRef(ctx context.Context, req *DeleteRefReq, opt ...requests.Option) (*DeleteRefResponse, error)
DeleteRef performs requests for "git/delete-ref"
Delete a reference.
DELETE /repos/{owner}/{repo}/git/refs/{ref}
https://developer.github.com/v3/git/refs/#delete-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetBlob ¶
func (c Client) GetBlob(ctx context.Context, req *GetBlobReq, opt ...requests.Option) (*GetBlobResponse, error)
GetBlob performs requests for "git/get-blob"
Get a blob.
GET /repos/{owner}/{repo}/git/blobs/{file_sha}
https://developer.github.com/v3/git/blobs/#get-a-blob
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetCommit ¶
func (c Client) GetCommit(ctx context.Context, req *GetCommitReq, opt ...requests.Option) (*GetCommitResponse, error)
GetCommit performs requests for "git/get-commit"
Get a commit.
GET /repos/{owner}/{repo}/git/commits/{commit_sha}
https://developer.github.com/v3/git/commits/#get-a-commit
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetRef ¶
func (c Client) GetRef(ctx context.Context, req *GetRefReq, opt ...requests.Option) (*GetRefResponse, error)
GetRef performs requests for "git/get-ref"
Get a reference.
GET /repos/{owner}/{repo}/git/ref/{ref}
https://developer.github.com/v3/git/refs/#get-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetTag ¶
func (c Client) GetTag(ctx context.Context, req *GetTagReq, opt ...requests.Option) (*GetTagResponse, error)
GetTag performs requests for "git/get-tag"
Get a tag.
GET /repos/{owner}/{repo}/git/tags/{tag_sha}
https://developer.github.com/v3/git/tags/#get-a-tag
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetTree ¶
func (c Client) GetTree(ctx context.Context, req *GetTreeReq, opt ...requests.Option) (*GetTreeResponse, error)
GetTree performs requests for "git/get-tree"
Get a tree.
GET /repos/{owner}/{repo}/git/trees/{tree_sha}
https://developer.github.com/v3/git/trees/#get-a-tree
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) ListMatchingRefs ¶
func (c Client) ListMatchingRefs(ctx context.Context, req *ListMatchingRefsReq, opt ...requests.Option) (*ListMatchingRefsResponse, error)
ListMatchingRefs performs requests for "git/list-matching-refs"
List matching references.
GET /repos/{owner}/{repo}/git/matching-refs/{ref}
https://developer.github.com/v3/git/refs/#list-matching-references
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) UpdateRef ¶
func (c Client) UpdateRef(ctx context.Context, req *UpdateRefReq, opt ...requests.Option) (*UpdateRefResponse, error)
UpdateRef performs requests for "git/update-ref"
Update a reference.
PATCH /repos/{owner}/{repo}/git/refs/{ref}
https://developer.github.com/v3/git/refs/#update-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
type CreateBlobReq ¶
type CreateBlobReq struct { Owner string Repo string RequestBody CreateBlobReqBody // contains filtered or unexported fields }
CreateBlobReq is request data for Client.CreateBlob
https://developer.github.com/v3/git/blobs/#create-a-blob
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateBlobReq) HTTPRequest ¶
func (r *CreateBlobReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateBlobReq) Rel ¶
func (r *CreateBlobReq) Rel(link string, resp *CreateBlobResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateBlobReqBody ¶
type CreateBlobReqBody struct { // The new blob's content. Content *string `json:"content"` // The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. Encoding *string `json:"encoding,omitempty"` }
CreateBlobReqBody is a request body for git/create-blob
type CreateBlobResponse ¶
type CreateBlobResponse struct { Data components.ShortBlob // contains filtered or unexported fields }
CreateBlobResponse is a response for CreateBlob
https://developer.github.com/v3/git/blobs/#create-a-blob
func CreateBlob ¶
func CreateBlob(ctx context.Context, req *CreateBlobReq, opt ...requests.Option) (*CreateBlobResponse, error)
CreateBlob performs requests for "git/create-blob"
Create a blob.
POST /repos/{owner}/{repo}/git/blobs
func (*CreateBlobResponse) HTTPResponse ¶
func (r *CreateBlobResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateBlobResponse) ReadResponse ¶
func (r *CreateBlobResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateCommitReq ¶
type CreateCommitReq struct { Owner string Repo string RequestBody CreateCommitReqBody // contains filtered or unexported fields }
CreateCommitReq is request data for Client.CreateCommit
https://developer.github.com/v3/git/commits/#create-a-commit
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateCommitReq) HTTPRequest ¶
func (r *CreateCommitReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateCommitReq) Rel ¶
func (r *CreateCommitReq) Rel(link string, resp *CreateCommitResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateCommitReqBody ¶
type CreateCommitReqBody struct { /* Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ Author *CreateCommitReqBodyAuthor `json:"author,omitempty"` /* Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ Committer *CreateCommitReqBodyCommitter `json:"committer,omitempty"` // The commit message Message *string `json:"message"` /* The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ Parents []string `json:"parents,omitempty"` /* The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ Signature *string `json:"signature,omitempty"` // The SHA of the tree object this commit points to Tree *string `json:"tree"` }
CreateCommitReqBody is a request body for git/create-commit
https://developer.github.com/v3/git/commits/#create-a-commit
type CreateCommitReqBodyAuthor ¶
type CreateCommitReqBodyAuthor struct { /* Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Date *string `json:"date,omitempty"` // The email of the author (or committer) of the commit Email *string `json:"email,omitempty"` // The name of the author (or committer) of the commit Name *string `json:"name,omitempty"` }
CreateCommitReqBodyAuthor is a value for CreateCommitReqBody's Author field
type CreateCommitReqBodyCommitter ¶
type CreateCommitReqBodyCommitter struct { /* Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Date *string `json:"date,omitempty"` // The email of the author (or committer) of the commit Email *string `json:"email,omitempty"` // The name of the author (or committer) of the commit Name *string `json:"name,omitempty"` }
CreateCommitReqBodyCommitter is a value for CreateCommitReqBody's Committer field
type CreateCommitResponse ¶
type CreateCommitResponse struct { Data components.GitCommit // contains filtered or unexported fields }
CreateCommitResponse is a response for CreateCommit
https://developer.github.com/v3/git/commits/#create-a-commit
func CreateCommit ¶
func CreateCommit(ctx context.Context, req *CreateCommitReq, opt ...requests.Option) (*CreateCommitResponse, error)
CreateCommit performs requests for "git/create-commit"
Create a commit.
POST /repos/{owner}/{repo}/git/commits
https://developer.github.com/v3/git/commits/#create-a-commit
func (*CreateCommitResponse) HTTPResponse ¶
func (r *CreateCommitResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateCommitResponse) ReadResponse ¶
func (r *CreateCommitResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateRefReq ¶
type CreateRefReq struct { Owner string Repo string RequestBody CreateRefReqBody // contains filtered or unexported fields }
CreateRefReq is request data for Client.CreateRef
https://developer.github.com/v3/git/refs/#create-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateRefReq) HTTPRequest ¶
func (r *CreateRefReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateRefReq) Rel ¶
func (r *CreateRefReq) Rel(link string, resp *CreateRefResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateRefReqBody ¶
type CreateRefReqBody struct { Key *string `json:"key,omitempty"` /* The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ Ref *string `json:"ref"` // The SHA1 value for this reference. Sha *string `json:"sha"` }
CreateRefReqBody is a request body for git/create-ref
https://developer.github.com/v3/git/refs/#create-a-reference
type CreateRefResponse ¶
type CreateRefResponse struct { Data components.GitRef // contains filtered or unexported fields }
CreateRefResponse is a response for CreateRef
https://developer.github.com/v3/git/refs/#create-a-reference
func CreateRef ¶
func CreateRef(ctx context.Context, req *CreateRefReq, opt ...requests.Option) (*CreateRefResponse, error)
CreateRef performs requests for "git/create-ref"
Create a reference.
POST /repos/{owner}/{repo}/git/refs
https://developer.github.com/v3/git/refs/#create-a-reference
func (*CreateRefResponse) HTTPResponse ¶
func (r *CreateRefResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateRefResponse) ReadResponse ¶
func (r *CreateRefResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateTagReq ¶
type CreateTagReq struct { Owner string Repo string RequestBody CreateTagReqBody // contains filtered or unexported fields }
CreateTagReq is request data for Client.CreateTag
https://developer.github.com/v3/git/tags/#create-a-tag-object
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateTagReq) HTTPRequest ¶
func (r *CreateTagReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateTagReq) Rel ¶
func (r *CreateTagReq) Rel(link string, resp *CreateTagResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateTagReqBody ¶
type CreateTagReqBody struct { // The tag message. Message *string `json:"message"` // The SHA of the git object this is tagging. Object *string `json:"object"` // The tag's name. This is typically a version (e.g., "v0.0.1"). Tag *string `json:"tag"` // An object with information about the individual creating the tag. Tagger *CreateTagReqBodyTagger `json:"tagger,omitempty"` // The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. Type *string `json:"type"` }
CreateTagReqBody is a request body for git/create-tag
https://developer.github.com/v3/git/tags/#create-a-tag-object
type CreateTagReqBodyTagger ¶
type CreateTagReqBodyTagger struct { /* When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ Date *string `json:"date,omitempty"` // The email of the author of the tag Email *string `json:"email,omitempty"` // The name of the author of the tag Name *string `json:"name,omitempty"` }
CreateTagReqBodyTagger is a value for CreateTagReqBody's Tagger field
type CreateTagResponse ¶
type CreateTagResponse struct { Data components.GitTag // contains filtered or unexported fields }
CreateTagResponse is a response for CreateTag
https://developer.github.com/v3/git/tags/#create-a-tag-object
func CreateTag ¶
func CreateTag(ctx context.Context, req *CreateTagReq, opt ...requests.Option) (*CreateTagResponse, error)
CreateTag performs requests for "git/create-tag"
Create a tag object.
POST /repos/{owner}/{repo}/git/tags
https://developer.github.com/v3/git/tags/#create-a-tag-object
func (*CreateTagResponse) HTTPResponse ¶
func (r *CreateTagResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateTagResponse) ReadResponse ¶
func (r *CreateTagResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type CreateTreeReq ¶
type CreateTreeReq struct { Owner string Repo string RequestBody CreateTreeReqBody // contains filtered or unexported fields }
CreateTreeReq is request data for Client.CreateTree
https://developer.github.com/v3/git/trees/#create-a-tree
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*CreateTreeReq) HTTPRequest ¶
func (r *CreateTreeReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*CreateTreeReq) Rel ¶
func (r *CreateTreeReq) Rel(link string, resp *CreateTreeResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type CreateTreeReqBody ¶
type CreateTreeReqBody struct { /* The SHA1 of the tree you want to update with new data. If you don't set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. */ BaseTree *string `json:"base_tree,omitempty"` // Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. Tree []CreateTreeReqBodyTree `json:"tree"` }
CreateTreeReqBody is a request body for git/create-tree
type CreateTreeReqBodyTree ¶
type CreateTreeReqBodyTree struct { /* The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. */ Content *string `json:"content,omitempty"` /* The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. */ Mode *string `json:"mode,omitempty"` // The file referenced in the tree. Path *string `json:"path,omitempty"` /* The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. */ Sha *string `json:"sha,omitempty"` // Either `blob`, `tree`, or `commit`. Type *string `json:"type,omitempty"` }
CreateTreeReqBodyTree is a value for CreateTreeReqBody's Tree field
type CreateTreeResponse ¶
type CreateTreeResponse struct { Data components.GitTree // contains filtered or unexported fields }
CreateTreeResponse is a response for CreateTree
https://developer.github.com/v3/git/trees/#create-a-tree
func CreateTree ¶
func CreateTree(ctx context.Context, req *CreateTreeReq, opt ...requests.Option) (*CreateTreeResponse, error)
CreateTree performs requests for "git/create-tree"
Create a tree.
POST /repos/{owner}/{repo}/git/trees
func (*CreateTreeResponse) HTTPResponse ¶
func (r *CreateTreeResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*CreateTreeResponse) ReadResponse ¶
func (r *CreateTreeResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type DeleteRefReq ¶
type DeleteRefReq struct { Owner string Repo string // ref+ parameter Ref string // contains filtered or unexported fields }
DeleteRefReq is request data for Client.DeleteRef
https://developer.github.com/v3/git/refs/#delete-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*DeleteRefReq) HTTPRequest ¶
func (r *DeleteRefReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*DeleteRefReq) Rel ¶
func (r *DeleteRefReq) Rel(link string, resp *DeleteRefResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type DeleteRefResponse ¶
type DeleteRefResponse struct {
// contains filtered or unexported fields
}
DeleteRefResponse is a response for DeleteRef
https://developer.github.com/v3/git/refs/#delete-a-reference
func DeleteRef ¶
func DeleteRef(ctx context.Context, req *DeleteRefReq, opt ...requests.Option) (*DeleteRefResponse, error)
DeleteRef performs requests for "git/delete-ref"
Delete a reference.
DELETE /repos/{owner}/{repo}/git/refs/{ref}
https://developer.github.com/v3/git/refs/#delete-a-reference
func (*DeleteRefResponse) HTTPResponse ¶
func (r *DeleteRefResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*DeleteRefResponse) ReadResponse ¶
func (r *DeleteRefResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetBlobReq ¶
type GetBlobReq struct { Owner string Repo string // file_sha parameter FileSha string // contains filtered or unexported fields }
GetBlobReq is request data for Client.GetBlob
https://developer.github.com/v3/git/blobs/#get-a-blob
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetBlobReq) HTTPRequest ¶
func (r *GetBlobReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetBlobReq) Rel ¶
func (r *GetBlobReq) Rel(link string, resp *GetBlobResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetBlobResponse ¶
type GetBlobResponse struct { Data components.Blob // contains filtered or unexported fields }
GetBlobResponse is a response for GetBlob
https://developer.github.com/v3/git/blobs/#get-a-blob
func GetBlob ¶
func GetBlob(ctx context.Context, req *GetBlobReq, opt ...requests.Option) (*GetBlobResponse, error)
GetBlob performs requests for "git/get-blob"
Get a blob.
GET /repos/{owner}/{repo}/git/blobs/{file_sha}
func (*GetBlobResponse) HTTPResponse ¶
func (r *GetBlobResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetBlobResponse) ReadResponse ¶
func (r *GetBlobResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetCommitReq ¶
type GetCommitReq struct { Owner string Repo string // commit_sha+ parameter CommitSha string // contains filtered or unexported fields }
GetCommitReq is request data for Client.GetCommit
https://developer.github.com/v3/git/commits/#get-a-commit
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetCommitReq) HTTPRequest ¶
func (r *GetCommitReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetCommitReq) Rel ¶
func (r *GetCommitReq) Rel(link string, resp *GetCommitResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetCommitResponse ¶
type GetCommitResponse struct { Data components.GitCommit // contains filtered or unexported fields }
GetCommitResponse is a response for GetCommit
https://developer.github.com/v3/git/commits/#get-a-commit
func GetCommit ¶
func GetCommit(ctx context.Context, req *GetCommitReq, opt ...requests.Option) (*GetCommitResponse, error)
GetCommit performs requests for "git/get-commit"
Get a commit.
GET /repos/{owner}/{repo}/git/commits/{commit_sha}
func (*GetCommitResponse) HTTPResponse ¶
func (r *GetCommitResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetCommitResponse) ReadResponse ¶
func (r *GetCommitResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetRefReq ¶
type GetRefReq struct { Owner string Repo string // ref+ parameter Ref string // contains filtered or unexported fields }
GetRefReq is request data for Client.GetRef
https://developer.github.com/v3/git/refs/#get-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetRefReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type GetRefResponse ¶
type GetRefResponse struct { Data components.GitRef // contains filtered or unexported fields }
GetRefResponse is a response for GetRef
https://developer.github.com/v3/git/refs/#get-a-reference
func GetRef ¶
GetRef performs requests for "git/get-ref"
Get a reference.
GET /repos/{owner}/{repo}/git/ref/{ref}
func (*GetRefResponse) HTTPResponse ¶
func (r *GetRefResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetRefResponse) ReadResponse ¶
func (r *GetRefResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetTagReq ¶
type GetTagReq struct { Owner string Repo string // tag_sha parameter TagSha string // contains filtered or unexported fields }
GetTagReq is request data for Client.GetTag
https://developer.github.com/v3/git/tags/#get-a-tag
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetTagReq) HTTPRequest ¶
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
type GetTagResponse ¶
type GetTagResponse struct { Data components.GitTag // contains filtered or unexported fields }
GetTagResponse is a response for GetTag
https://developer.github.com/v3/git/tags/#get-a-tag
func GetTag ¶
GetTag performs requests for "git/get-tag"
Get a tag.
GET /repos/{owner}/{repo}/git/tags/{tag_sha}
func (*GetTagResponse) HTTPResponse ¶
func (r *GetTagResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetTagResponse) ReadResponse ¶
func (r *GetTagResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetTreeReq ¶
type GetTreeReq struct { Owner string Repo string // tree_sha parameter TreeSha string /* Setting this parameter to any value returns the objects or subtrees referenced by the tree specified in `:tree_sha`. For example, setting `recursive` to any of the following will enable returning objects or subtrees: `0`, `1`, `"true"`, and `"false"`. Omit this parameter to prevent recursively returning objects or subtrees. */ Recursive *string // contains filtered or unexported fields }
GetTreeReq is request data for Client.GetTree
https://developer.github.com/v3/git/trees/#get-a-tree
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetTreeReq) HTTPRequest ¶
func (r *GetTreeReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*GetTreeReq) Rel ¶
func (r *GetTreeReq) Rel(link string, resp *GetTreeResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type GetTreeResponse ¶
type GetTreeResponse struct { Data components.GitTree // contains filtered or unexported fields }
GetTreeResponse is a response for GetTree
https://developer.github.com/v3/git/trees/#get-a-tree
func GetTree ¶
func GetTree(ctx context.Context, req *GetTreeReq, opt ...requests.Option) (*GetTreeResponse, error)
GetTree performs requests for "git/get-tree"
Get a tree.
GET /repos/{owner}/{repo}/git/trees/{tree_sha}
func (*GetTreeResponse) HTTPResponse ¶
func (r *GetTreeResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetTreeResponse) ReadResponse ¶
func (r *GetTreeResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type ListMatchingRefsReq ¶
type ListMatchingRefsReq struct { Owner string Repo string // ref+ parameter Ref string // Results per page (max 100) PerPage *int64 // Page number of the results to fetch. Page *int64 // contains filtered or unexported fields }
ListMatchingRefsReq is request data for Client.ListMatchingRefs
https://developer.github.com/v3/git/refs/#list-matching-references
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*ListMatchingRefsReq) HTTPRequest ¶
func (r *ListMatchingRefsReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*ListMatchingRefsReq) Rel ¶
func (r *ListMatchingRefsReq) Rel(link string, resp *ListMatchingRefsResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type ListMatchingRefsResponse ¶
type ListMatchingRefsResponse struct { Data []components.GitRef // contains filtered or unexported fields }
ListMatchingRefsResponse is a response for ListMatchingRefs
https://developer.github.com/v3/git/refs/#list-matching-references
func ListMatchingRefs ¶
func ListMatchingRefs(ctx context.Context, req *ListMatchingRefsReq, opt ...requests.Option) (*ListMatchingRefsResponse, error)
ListMatchingRefs performs requests for "git/list-matching-refs"
List matching references.
GET /repos/{owner}/{repo}/git/matching-refs/{ref}
https://developer.github.com/v3/git/refs/#list-matching-references
func (*ListMatchingRefsResponse) HTTPResponse ¶
func (r *ListMatchingRefsResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*ListMatchingRefsResponse) ReadResponse ¶
func (r *ListMatchingRefsResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type UpdateRefReq ¶
type UpdateRefReq struct { Owner string Repo string // ref+ parameter Ref string RequestBody UpdateRefReqBody // contains filtered or unexported fields }
UpdateRefReq is request data for Client.UpdateRef
https://developer.github.com/v3/git/refs/#update-a-reference
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*UpdateRefReq) HTTPRequest ¶
func (r *UpdateRefReq) HTTPRequest(ctx context.Context, opt ...requests.Option) (*http.Request, error)
HTTPRequest builds an *http.Request. Non-nil errors will have the type *requests.RequestError.
func (*UpdateRefReq) Rel ¶
func (r *UpdateRefReq) Rel(link string, resp *UpdateRefResponse) bool
Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.
type UpdateRefReqBody ¶
type UpdateRefReqBody struct { /* Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. */ Force *bool `json:"force,omitempty"` // The SHA1 value to set this reference to Sha *string `json:"sha"` }
UpdateRefReqBody is a request body for git/update-ref
https://developer.github.com/v3/git/refs/#update-a-reference
type UpdateRefResponse ¶
type UpdateRefResponse struct { Data components.GitRef // contains filtered or unexported fields }
UpdateRefResponse is a response for UpdateRef
https://developer.github.com/v3/git/refs/#update-a-reference
func UpdateRef ¶
func UpdateRef(ctx context.Context, req *UpdateRefReq, opt ...requests.Option) (*UpdateRefResponse, error)
UpdateRef performs requests for "git/update-ref"
Update a reference.
PATCH /repos/{owner}/{repo}/git/refs/{ref}
https://developer.github.com/v3/git/refs/#update-a-reference
func (*UpdateRefResponse) HTTPResponse ¶
func (r *UpdateRefResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*UpdateRefResponse) ReadResponse ¶
func (r *UpdateRefResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.