webhook

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 8 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 struct {
	// contains filtered or unexported fields
}

Client for webhook API

func (*Client) HandleGithubWebhook

func (a *Client) HandleGithubWebhook(params *HandleGithubWebhookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HandleGithubWebhookOK, error)

HandleGithubWebhook handles git hub webhook events

This endpoint receives GitHub webhook events and processes them accordingly.

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption may be used to customize the behavior of Client methods.

type ClientService

type ClientService interface {
	HandleGithubWebhook(params *HandleGithubWebhookParams, authInfo runtime.ClientAuthInfoWriter, opts ...ClientOption) (*HandleGithubWebhookOK, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new webhook API client.

func NewClientWithBasicAuth

func NewClientWithBasicAuth(host, basePath, scheme, user, password string) ClientService

New creates a new webhook API client with basic auth credentials. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - user: user for basic authentication header. - password: password for basic authentication header.

func NewClientWithBearerToken

func NewClientWithBearerToken(host, basePath, scheme, bearerToken string) ClientService

New creates a new webhook API client with a bearer token for authentication. It takes the following parameters: - host: http host (github.com). - basePath: any base path for the API client ("/v1", "/v3"). - scheme: http scheme ("http", "https"). - bearerToken: bearer token for Bearer authentication header.

type HandleGithubWebhookBadRequest

type HandleGithubWebhookBadRequest struct {
}

HandleGithubWebhookBadRequest describes a response with status code 400, with default header values.

Bad request, e.g., invalid payload or signature

func NewHandleGithubWebhookBadRequest

func NewHandleGithubWebhookBadRequest() *HandleGithubWebhookBadRequest

NewHandleGithubWebhookBadRequest creates a HandleGithubWebhookBadRequest with default headers values

func (*HandleGithubWebhookBadRequest) Code

Code gets the status code for the handle github webhook bad request response

func (*HandleGithubWebhookBadRequest) Error

func (*HandleGithubWebhookBadRequest) IsClientError

func (o *HandleGithubWebhookBadRequest) IsClientError() bool

IsClientError returns true when this handle github webhook bad request response has a 4xx status code

func (*HandleGithubWebhookBadRequest) IsCode

func (o *HandleGithubWebhookBadRequest) IsCode(code int) bool

IsCode returns true when this handle github webhook bad request response a status code equal to that given

func (*HandleGithubWebhookBadRequest) IsRedirect

func (o *HandleGithubWebhookBadRequest) IsRedirect() bool

IsRedirect returns true when this handle github webhook bad request response has a 3xx status code

func (*HandleGithubWebhookBadRequest) IsServerError

func (o *HandleGithubWebhookBadRequest) IsServerError() bool

IsServerError returns true when this handle github webhook bad request response has a 5xx status code

func (*HandleGithubWebhookBadRequest) IsSuccess

func (o *HandleGithubWebhookBadRequest) IsSuccess() bool

IsSuccess returns true when this handle github webhook bad request response has a 2xx status code

func (*HandleGithubWebhookBadRequest) String

type HandleGithubWebhookInternalServerError

type HandleGithubWebhookInternalServerError struct {
}

HandleGithubWebhookInternalServerError describes a response with status code 500, with default header values.

Internal server error while processing the webhook event

func NewHandleGithubWebhookInternalServerError

func NewHandleGithubWebhookInternalServerError() *HandleGithubWebhookInternalServerError

NewHandleGithubWebhookInternalServerError creates a HandleGithubWebhookInternalServerError with default headers values

func (*HandleGithubWebhookInternalServerError) Code

Code gets the status code for the handle github webhook internal server error response

func (*HandleGithubWebhookInternalServerError) Error

func (*HandleGithubWebhookInternalServerError) IsClientError

func (o *HandleGithubWebhookInternalServerError) IsClientError() bool

IsClientError returns true when this handle github webhook internal server error response has a 4xx status code

func (*HandleGithubWebhookInternalServerError) IsCode

IsCode returns true when this handle github webhook internal server error response a status code equal to that given

func (*HandleGithubWebhookInternalServerError) IsRedirect

IsRedirect returns true when this handle github webhook internal server error response has a 3xx status code

func (*HandleGithubWebhookInternalServerError) IsServerError

func (o *HandleGithubWebhookInternalServerError) IsServerError() bool

IsServerError returns true when this handle github webhook internal server error response has a 5xx status code

func (*HandleGithubWebhookInternalServerError) IsSuccess

IsSuccess returns true when this handle github webhook internal server error response has a 2xx status code

func (*HandleGithubWebhookInternalServerError) String

type HandleGithubWebhookOK

type HandleGithubWebhookOK struct {
}

HandleGithubWebhookOK describes a response with status code 200, with default header values.

Webhook event processed successfully

func NewHandleGithubWebhookOK

func NewHandleGithubWebhookOK() *HandleGithubWebhookOK

NewHandleGithubWebhookOK creates a HandleGithubWebhookOK with default headers values

func (*HandleGithubWebhookOK) Code

func (o *HandleGithubWebhookOK) Code() int

Code gets the status code for the handle github webhook o k response

func (*HandleGithubWebhookOK) Error

func (o *HandleGithubWebhookOK) Error() string

func (*HandleGithubWebhookOK) IsClientError

func (o *HandleGithubWebhookOK) IsClientError() bool

IsClientError returns true when this handle github webhook o k response has a 4xx status code

func (*HandleGithubWebhookOK) IsCode

func (o *HandleGithubWebhookOK) IsCode(code int) bool

IsCode returns true when this handle github webhook o k response a status code equal to that given

func (*HandleGithubWebhookOK) IsRedirect

func (o *HandleGithubWebhookOK) IsRedirect() bool

IsRedirect returns true when this handle github webhook o k response has a 3xx status code

func (*HandleGithubWebhookOK) IsServerError

func (o *HandleGithubWebhookOK) IsServerError() bool

IsServerError returns true when this handle github webhook o k response has a 5xx status code

func (*HandleGithubWebhookOK) IsSuccess

func (o *HandleGithubWebhookOK) IsSuccess() bool

IsSuccess returns true when this handle github webhook o k response has a 2xx status code

func (*HandleGithubWebhookOK) String

func (o *HandleGithubWebhookOK) String() string

type HandleGithubWebhookParams

type HandleGithubWebhookParams struct {

	/* XGitHubEvent.

	   The type of GitHub event (e.g., push, pull_request)
	*/
	XGitHubEvent string

	/* AppName.

	   The name of the application associated with the webhook event
	*/
	AppName *string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

HandleGithubWebhookParams contains all the parameters to send to the API endpoint

for the handle github webhook operation.

Typically these are written to a http.Request.

func NewHandleGithubWebhookParams

func NewHandleGithubWebhookParams() *HandleGithubWebhookParams

NewHandleGithubWebhookParams creates a new HandleGithubWebhookParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewHandleGithubWebhookParamsWithContext

func NewHandleGithubWebhookParamsWithContext(ctx context.Context) *HandleGithubWebhookParams

NewHandleGithubWebhookParamsWithContext creates a new HandleGithubWebhookParams object with the ability to set a context for a request.

func NewHandleGithubWebhookParamsWithHTTPClient

func NewHandleGithubWebhookParamsWithHTTPClient(client *http.Client) *HandleGithubWebhookParams

NewHandleGithubWebhookParamsWithHTTPClient creates a new HandleGithubWebhookParams object with the ability to set a custom HTTPClient for a request.

func NewHandleGithubWebhookParamsWithTimeout

func NewHandleGithubWebhookParamsWithTimeout(timeout time.Duration) *HandleGithubWebhookParams

NewHandleGithubWebhookParamsWithTimeout creates a new HandleGithubWebhookParams object with the ability to set a timeout on a request.

func (*HandleGithubWebhookParams) SetAppName

func (o *HandleGithubWebhookParams) SetAppName(appName *string)

SetAppName adds the appName to the handle github webhook params

func (*HandleGithubWebhookParams) SetContext

func (o *HandleGithubWebhookParams) SetContext(ctx context.Context)

SetContext adds the context to the handle github webhook params

func (*HandleGithubWebhookParams) SetDefaults

func (o *HandleGithubWebhookParams) SetDefaults()

SetDefaults hydrates default values in the handle github webhook params (not the query body).

All values with no default are reset to their zero value.

func (*HandleGithubWebhookParams) SetHTTPClient

func (o *HandleGithubWebhookParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the handle github webhook params

func (*HandleGithubWebhookParams) SetTimeout

func (o *HandleGithubWebhookParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the handle github webhook params

func (*HandleGithubWebhookParams) SetXGitHubEvent

func (o *HandleGithubWebhookParams) SetXGitHubEvent(xGitHubEvent string)

SetXGitHubEvent adds the xGitHubEvent to the handle github webhook params

func (*HandleGithubWebhookParams) WithAppName

WithAppName adds the appName to the handle github webhook params

func (*HandleGithubWebhookParams) WithContext

WithContext adds the context to the handle github webhook params

func (*HandleGithubWebhookParams) WithDefaults

WithDefaults hydrates default values in the handle github webhook params (not the query body).

All values with no default are reset to their zero value.

func (*HandleGithubWebhookParams) WithHTTPClient

func (o *HandleGithubWebhookParams) WithHTTPClient(client *http.Client) *HandleGithubWebhookParams

WithHTTPClient adds the HTTPClient to the handle github webhook params

func (*HandleGithubWebhookParams) WithTimeout

WithTimeout adds the timeout to the handle github webhook params

func (*HandleGithubWebhookParams) WithXGitHubEvent

func (o *HandleGithubWebhookParams) WithXGitHubEvent(xGitHubEvent string) *HandleGithubWebhookParams

WithXGitHubEvent adds the xGitHubEvent to the handle github webhook params

func (*HandleGithubWebhookParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type HandleGithubWebhookReader

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

HandleGithubWebhookReader is a Reader for the HandleGithubWebhook structure.

func (*HandleGithubWebhookReader) ReadResponse

func (o *HandleGithubWebhookReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (any, error)

ReadResponse reads a server response into the received o.

Jump to

Keyboard shortcuts

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