gitignore

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client []requests.Option

Client is a set of options to apply to requests

func NewClient

func NewClient(opt ...requests.Option) Client

NewClient returns a new Client

func (Client) GetAllTemplates

func (c Client) GetAllTemplates(ctx context.Context, req *GetAllTemplatesReq, opt ...requests.Option) (*GetAllTemplatesResponse, error)

GetAllTemplates performs requests for "gitignore/get-all-templates"

Get all gitignore templates.

GET /gitignore/templates

https://developer.github.com/v3/gitignore/#get-all-gitignore-templates

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.

func (Client) GetTemplate

func (c Client) GetTemplate(ctx context.Context, req *GetTemplateReq, opt ...requests.Option) (*GetTemplateResponse, error)

GetTemplate performs requests for "gitignore/get-template"

Get a gitignore template.

GET /gitignore/templates/{name}

https://developer.github.com/v3/gitignore/#get-a-gitignore-template

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.

type GetAllTemplatesReq

type GetAllTemplatesReq struct {
	// contains filtered or unexported fields
}

GetAllTemplatesReq is request data for Client.GetAllTemplates

https://developer.github.com/v3/gitignore/#get-all-gitignore-templates

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.

func (*GetAllTemplatesReq) HTTPRequest

func (r *GetAllTemplatesReq) 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 (*GetAllTemplatesReq) Rel

Rel updates this request to point to a relative link from resp. Returns false if the link does not exist. Handy for paging.

type GetAllTemplatesResponse

type GetAllTemplatesResponse struct {
	Data GetAllTemplatesResponseBody
	// contains filtered or unexported fields
}

GetAllTemplatesResponse is a response for GetAllTemplates

https://developer.github.com/v3/gitignore/#get-all-gitignore-templates

func GetAllTemplates

func GetAllTemplates(ctx context.Context, req *GetAllTemplatesReq, opt ...requests.Option) (*GetAllTemplatesResponse, error)

GetAllTemplates performs requests for "gitignore/get-all-templates"

Get all gitignore templates.

GET /gitignore/templates

https://developer.github.com/v3/gitignore/#get-all-gitignore-templates

func (*GetAllTemplatesResponse) HTTPResponse

func (r *GetAllTemplatesResponse) HTTPResponse() *http.Response

HTTPResponse returns the *http.Response

func (*GetAllTemplatesResponse) ReadResponse

func (r *GetAllTemplatesResponse) ReadResponse(resp *http.Response) error

ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.

type GetAllTemplatesResponseBody

type GetAllTemplatesResponseBody []string

GetAllTemplatesResponseBody is a response body for GetAllTemplates

https://developer.github.com/v3/gitignore/#get-all-gitignore-templates

type GetTemplateReq

type GetTemplateReq struct {

	// name parameter
	Name string
	// contains filtered or unexported fields
}

GetTemplateReq is request data for Client.GetTemplate

https://developer.github.com/v3/gitignore/#get-a-gitignore-template

Non-nil errors will have the type *requests.RequestError, octo.ResponseError or url.Error.

func (*GetTemplateReq) HTTPRequest

func (r *GetTemplateReq) 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 (*GetTemplateReq) Rel

func (r *GetTemplateReq) Rel(link string, resp *GetTemplateResponse) 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 GetTemplateResponse

type GetTemplateResponse struct {
	Data components.GitignoreTemplate
	// contains filtered or unexported fields
}

GetTemplateResponse is a response for GetTemplate

https://developer.github.com/v3/gitignore/#get-a-gitignore-template

func GetTemplate

func GetTemplate(ctx context.Context, req *GetTemplateReq, opt ...requests.Option) (*GetTemplateResponse, error)

GetTemplate performs requests for "gitignore/get-template"

Get a gitignore template.

GET /gitignore/templates/{name}

https://developer.github.com/v3/gitignore/#get-a-gitignore-template

func (*GetTemplateResponse) HTTPResponse

func (r *GetTemplateResponse) HTTPResponse() *http.Response

HTTPResponse returns the *http.Response

func (*GetTemplateResponse) ReadResponse

func (r *GetTemplateResponse) ReadResponse(resp *http.Response) error

ReadResponse reads an *http.Response. Non-nil errors will have the type octo.ResponseError.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL