interactions

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) GetRestrictionsForOrg

func (c Client) GetRestrictionsForOrg(ctx context.Context, req *GetRestrictionsForOrgReq, opt ...requests.Option) (*GetRestrictionsForOrgResponse, error)

GetRestrictionsForOrg performs requests for "interactions/get-restrictions-for-org"

Get interaction restrictions for an organization.

GET /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization

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

func (Client) GetRestrictionsForRepo

func (c Client) GetRestrictionsForRepo(ctx context.Context, req *GetRestrictionsForRepoReq, opt ...requests.Option) (*GetRestrictionsForRepoResponse, error)

GetRestrictionsForRepo performs requests for "interactions/get-restrictions-for-repo"

Get interaction restrictions for a repository.

GET /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository

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

func (Client) RemoveRestrictionsForOrg

func (c Client) RemoveRestrictionsForOrg(ctx context.Context, req *RemoveRestrictionsForOrgReq, opt ...requests.Option) (*RemoveRestrictionsForOrgResponse, error)

RemoveRestrictionsForOrg performs requests for "interactions/remove-restrictions-for-org"

Remove interaction restrictions for an organization.

DELETE /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization

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

func (Client) RemoveRestrictionsForRepo

func (c Client) RemoveRestrictionsForRepo(ctx context.Context, req *RemoveRestrictionsForRepoReq, opt ...requests.Option) (*RemoveRestrictionsForRepoResponse, error)

RemoveRestrictionsForRepo performs requests for "interactions/remove-restrictions-for-repo"

Remove interaction restrictions for a repository.

DELETE /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository

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

func (Client) SetRestrictionsForOrg

func (c Client) SetRestrictionsForOrg(ctx context.Context, req *SetRestrictionsForOrgReq, opt ...requests.Option) (*SetRestrictionsForOrgResponse, error)

SetRestrictionsForOrg performs requests for "interactions/set-restrictions-for-org"

Set interaction restrictions for an organization.

PUT /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#set-interaction-restrictions-for-an-organization

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

func (Client) SetRestrictionsForRepo

func (c Client) SetRestrictionsForRepo(ctx context.Context, req *SetRestrictionsForRepoReq, opt ...requests.Option) (*SetRestrictionsForRepoResponse, error)

SetRestrictionsForRepo performs requests for "interactions/set-restrictions-for-repo"

Set interaction restrictions for a repository.

PUT /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#set-interaction-restrictions-for-a-repository

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

type GetRestrictionsForOrgReq

type GetRestrictionsForOrgReq struct {
	Org string

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

GetRestrictionsForOrgReq is request data for Client.GetRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization

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

func (*GetRestrictionsForOrgReq) HTTPRequest

func (r *GetRestrictionsForOrgReq) 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 (*GetRestrictionsForOrgReq) 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 GetRestrictionsForOrgResponse

type GetRestrictionsForOrgResponse struct {
	Data components.InteractionLimit
	// contains filtered or unexported fields
}

GetRestrictionsForOrgResponse is a response for GetRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization

func GetRestrictionsForOrg

func GetRestrictionsForOrg(ctx context.Context, req *GetRestrictionsForOrgReq, opt ...requests.Option) (*GetRestrictionsForOrgResponse, error)

GetRestrictionsForOrg performs requests for "interactions/get-restrictions-for-org"

Get interaction restrictions for an organization.

GET /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#get-interaction-restrictions-for-an-organization

func (*GetRestrictionsForOrgResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*GetRestrictionsForOrgResponse) ReadResponse

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

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

type GetRestrictionsForRepoReq

type GetRestrictionsForRepoReq struct {
	Owner string
	Repo  string

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

GetRestrictionsForRepoReq is request data for Client.GetRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository

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

func (*GetRestrictionsForRepoReq) HTTPRequest

func (r *GetRestrictionsForRepoReq) 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 (*GetRestrictionsForRepoReq) 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 GetRestrictionsForRepoResponse

type GetRestrictionsForRepoResponse struct {
	Data components.InteractionLimit
	// contains filtered or unexported fields
}

GetRestrictionsForRepoResponse is a response for GetRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository

func GetRestrictionsForRepo

func GetRestrictionsForRepo(ctx context.Context, req *GetRestrictionsForRepoReq, opt ...requests.Option) (*GetRestrictionsForRepoResponse, error)

GetRestrictionsForRepo performs requests for "interactions/get-restrictions-for-repo"

Get interaction restrictions for a repository.

GET /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#get-interaction-restrictions-for-a-repository

func (*GetRestrictionsForRepoResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*GetRestrictionsForRepoResponse) ReadResponse

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

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

type RemoveRestrictionsForOrgReq

type RemoveRestrictionsForOrgReq struct {
	Org string

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

RemoveRestrictionsForOrgReq is request data for Client.RemoveRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization

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

func (*RemoveRestrictionsForOrgReq) HTTPRequest

func (r *RemoveRestrictionsForOrgReq) 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 (*RemoveRestrictionsForOrgReq) 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 RemoveRestrictionsForOrgResponse

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

RemoveRestrictionsForOrgResponse is a response for RemoveRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization

func RemoveRestrictionsForOrg

RemoveRestrictionsForOrg performs requests for "interactions/remove-restrictions-for-org"

Remove interaction restrictions for an organization.

DELETE /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#remove-interaction-restrictions-for-an-organization

func (*RemoveRestrictionsForOrgResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*RemoveRestrictionsForOrgResponse) ReadResponse

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

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

type RemoveRestrictionsForRepoReq

type RemoveRestrictionsForRepoReq struct {
	Owner string
	Repo  string

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

RemoveRestrictionsForRepoReq is request data for Client.RemoveRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository

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

func (*RemoveRestrictionsForRepoReq) HTTPRequest

func (r *RemoveRestrictionsForRepoReq) 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 (*RemoveRestrictionsForRepoReq) 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 RemoveRestrictionsForRepoResponse

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

RemoveRestrictionsForRepoResponse is a response for RemoveRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository

func RemoveRestrictionsForRepo

RemoveRestrictionsForRepo performs requests for "interactions/remove-restrictions-for-repo"

Remove interaction restrictions for a repository.

DELETE /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#remove-interaction-restrictions-for-a-repository

func (*RemoveRestrictionsForRepoResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*RemoveRestrictionsForRepoResponse) ReadResponse

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

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

type SetRestrictionsForOrgReq

type SetRestrictionsForOrgReq struct {
	Org         string
	RequestBody SetRestrictionsForOrgReqBody

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

SetRestrictionsForOrgReq is request data for Client.SetRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#set-interaction-restrictions-for-an-organization

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

func (*SetRestrictionsForOrgReq) HTTPRequest

func (r *SetRestrictionsForOrgReq) 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 (*SetRestrictionsForOrgReq) 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 SetRestrictionsForOrgReqBody

type SetRestrictionsForOrgReqBody struct {

	/*
		Specifies the group of GitHub users who can comment, open issues, or create pull
		requests in public repositories for the given organization. Must be one of:
		`existing_users`, `contributors_only`, or `collaborators_only`.
	*/
	Limit *string `json:"limit"`
}

SetRestrictionsForOrgReqBody is a request body for interactions/set-restrictions-for-org

https://developer.github.com/v3/interactions/orgs/#set-interaction-restrictions-for-an-organization

type SetRestrictionsForOrgResponse

type SetRestrictionsForOrgResponse struct {
	Data components.InteractionLimit
	// contains filtered or unexported fields
}

SetRestrictionsForOrgResponse is a response for SetRestrictionsForOrg

https://developer.github.com/v3/interactions/orgs/#set-interaction-restrictions-for-an-organization

func SetRestrictionsForOrg

func SetRestrictionsForOrg(ctx context.Context, req *SetRestrictionsForOrgReq, opt ...requests.Option) (*SetRestrictionsForOrgResponse, error)

SetRestrictionsForOrg performs requests for "interactions/set-restrictions-for-org"

Set interaction restrictions for an organization.

PUT /orgs/{org}/interaction-limits

https://developer.github.com/v3/interactions/orgs/#set-interaction-restrictions-for-an-organization

func (*SetRestrictionsForOrgResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*SetRestrictionsForOrgResponse) ReadResponse

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

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

type SetRestrictionsForRepoReq

type SetRestrictionsForRepoReq struct {
	Owner       string
	Repo        string
	RequestBody SetRestrictionsForRepoReqBody

	/*
		The Interactions API is currently in public preview. See the [blog
		post](https://developer.github.com/changes/2018-12-18-interactions-preview)
		preview for more details. To access the API during the preview period, you must
		set this to true.
	*/
	SombraPreview bool
	// contains filtered or unexported fields
}

SetRestrictionsForRepoReq is request data for Client.SetRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#set-interaction-restrictions-for-a-repository

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

func (*SetRestrictionsForRepoReq) HTTPRequest

func (r *SetRestrictionsForRepoReq) 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 (*SetRestrictionsForRepoReq) 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 SetRestrictionsForRepoReqBody

type SetRestrictionsForRepoReqBody struct {

	/*
		Specifies the group of GitHub users who can comment, open issues, or create pull
		requests for the given repository. Must be one of: `existing_users`,
		`contributors_only`, or `collaborators_only`.
	*/
	Limit *string `json:"limit"`
}

SetRestrictionsForRepoReqBody is a request body for interactions/set-restrictions-for-repo

https://developer.github.com/v3/interactions/repos/#set-interaction-restrictions-for-a-repository

type SetRestrictionsForRepoResponse

type SetRestrictionsForRepoResponse struct {
	Data components.InteractionLimit
	// contains filtered or unexported fields
}

SetRestrictionsForRepoResponse is a response for SetRestrictionsForRepo

https://developer.github.com/v3/interactions/repos/#set-interaction-restrictions-for-a-repository

func SetRestrictionsForRepo

func SetRestrictionsForRepo(ctx context.Context, req *SetRestrictionsForRepoReq, opt ...requests.Option) (*SetRestrictionsForRepoResponse, error)

SetRestrictionsForRepo performs requests for "interactions/set-restrictions-for-repo"

Set interaction restrictions for a repository.

PUT /repos/{owner}/{repo}/interaction-limits

https://developer.github.com/v3/interactions/repos/#set-interaction-restrictions-for-a-repository

func (*SetRestrictionsForRepoResponse) HTTPResponse

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

HTTPResponse returns the *http.Response

func (*SetRestrictionsForRepoResponse) ReadResponse

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