Documentation ¶
Index ¶
- type Client
- func (c Client) GetAllCodesOfConduct(ctx context.Context, req *GetAllCodesOfConductReq, opt ...requests.Option) (*GetAllCodesOfConductResponse, error)
- func (c Client) GetConductCode(ctx context.Context, req *GetConductCodeReq, opt ...requests.Option) (*GetConductCodeResponse, error)
- func (c Client) GetForRepo(ctx context.Context, req *GetForRepoReq, opt ...requests.Option) (*GetForRepoResponse, error)
- type GetAllCodesOfConductReq
- type GetAllCodesOfConductResponse
- type GetConductCodeReq
- type GetConductCodeResponse
- type GetForRepoReq
- type GetForRepoResponse
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) GetAllCodesOfConduct ¶
func (c Client) GetAllCodesOfConduct(ctx context.Context, req *GetAllCodesOfConductReq, opt ...requests.Option) (*GetAllCodesOfConductResponse, error)
GetAllCodesOfConduct performs requests for "codes-of-conduct/get-all-codes-of-conduct"
Get all codes of conduct.
GET /codes_of_conduct
https://developer.github.com/v3/codes_of_conduct/#get-all-codes-of-conduct
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetConductCode ¶
func (c Client) GetConductCode(ctx context.Context, req *GetConductCodeReq, opt ...requests.Option) (*GetConductCodeResponse, error)
GetConductCode performs requests for "codes-of-conduct/get-conduct-code"
Get a code of conduct.
GET /codes_of_conduct/{key}
https://developer.github.com/v3/codes_of_conduct/#get-a-code-of-conduct
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (Client) GetForRepo ¶
func (c Client) GetForRepo(ctx context.Context, req *GetForRepoReq, opt ...requests.Option) (*GetForRepoResponse, error)
GetForRepo performs requests for "codes-of-conduct/get-for-repo"
Get the code of conduct for a repository.
GET /repos/{owner}/{repo}/community/code_of_conduct
https://developer.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
type GetAllCodesOfConductReq ¶
type GetAllCodesOfConductReq struct { /* The Codes of Conduct API is currently available for developers to preview. To access the API during the preview period, you must set this to true. */ ScarletWitchPreview bool // contains filtered or unexported fields }
GetAllCodesOfConductReq is request data for Client.GetAllCodesOfConduct
https://developer.github.com/v3/codes_of_conduct/#get-all-codes-of-conduct
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetAllCodesOfConductReq) HTTPRequest ¶
func (r *GetAllCodesOfConductReq) 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 (*GetAllCodesOfConductReq) Rel ¶
func (r *GetAllCodesOfConductReq) Rel(link string, resp *GetAllCodesOfConductResponse) 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 GetAllCodesOfConductResponse ¶
type GetAllCodesOfConductResponse struct { Data []components.CodeOfConduct // contains filtered or unexported fields }
GetAllCodesOfConductResponse is a response for GetAllCodesOfConduct
https://developer.github.com/v3/codes_of_conduct/#get-all-codes-of-conduct
func GetAllCodesOfConduct ¶
func GetAllCodesOfConduct(ctx context.Context, req *GetAllCodesOfConductReq, opt ...requests.Option) (*GetAllCodesOfConductResponse, error)
GetAllCodesOfConduct performs requests for "codes-of-conduct/get-all-codes-of-conduct"
Get all codes of conduct.
GET /codes_of_conduct
https://developer.github.com/v3/codes_of_conduct/#get-all-codes-of-conduct
func (*GetAllCodesOfConductResponse) HTTPResponse ¶
func (r *GetAllCodesOfConductResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetAllCodesOfConductResponse) ReadResponse ¶
func (r *GetAllCodesOfConductResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetConductCodeReq ¶
type GetConductCodeReq struct { // key parameter Key string /* The Codes of Conduct API is currently available for developers to preview. To access the API during the preview period, you must set this to true. */ ScarletWitchPreview bool // contains filtered or unexported fields }
GetConductCodeReq is request data for Client.GetConductCode
https://developer.github.com/v3/codes_of_conduct/#get-a-code-of-conduct
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetConductCodeReq) HTTPRequest ¶
func (r *GetConductCodeReq) 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 (*GetConductCodeReq) Rel ¶
func (r *GetConductCodeReq) Rel(link string, resp *GetConductCodeResponse) 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 GetConductCodeResponse ¶
type GetConductCodeResponse struct { Data components.CodeOfConduct // contains filtered or unexported fields }
GetConductCodeResponse is a response for GetConductCode
https://developer.github.com/v3/codes_of_conduct/#get-a-code-of-conduct
func GetConductCode ¶
func GetConductCode(ctx context.Context, req *GetConductCodeReq, opt ...requests.Option) (*GetConductCodeResponse, error)
GetConductCode performs requests for "codes-of-conduct/get-conduct-code"
Get a code of conduct.
GET /codes_of_conduct/{key}
https://developer.github.com/v3/codes_of_conduct/#get-a-code-of-conduct
func (*GetConductCodeResponse) HTTPResponse ¶
func (r *GetConductCodeResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetConductCodeResponse) ReadResponse ¶
func (r *GetConductCodeResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.
type GetForRepoReq ¶
type GetForRepoReq struct { Owner string Repo string /* The Codes of Conduct API is currently available for developers to preview. To access the API during the preview period, you must set this to true. */ ScarletWitchPreview bool // contains filtered or unexported fields }
GetForRepoReq is request data for Client.GetForRepo
https://developer.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository
Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.
func (*GetForRepoReq) HTTPRequest ¶
func (r *GetForRepoReq) 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 (*GetForRepoReq) Rel ¶
func (r *GetForRepoReq) Rel(link string, resp *GetForRepoResponse) 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 GetForRepoResponse ¶
type GetForRepoResponse struct { Data components.CodeOfConduct // contains filtered or unexported fields }
GetForRepoResponse is a response for GetForRepo
https://developer.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository
func GetForRepo ¶
func GetForRepo(ctx context.Context, req *GetForRepoReq, opt ...requests.Option) (*GetForRepoResponse, error)
GetForRepo performs requests for "codes-of-conduct/get-for-repo"
Get the code of conduct for a repository.
GET /repos/{owner}/{repo}/community/code_of_conduct
https://developer.github.com/v3/codes_of_conduct/#get-the-code-of-conduct-for-a-repository
func (*GetForRepoResponse) HTTPResponse ¶
func (r *GetForRepoResponse) HTTPResponse() *http.Response
HTTPResponse returns the *http.Response
func (*GetForRepoResponse) ReadResponse ¶
func (r *GetForRepoResponse) ReadResponse(resp *http.Response) error
ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.