webhook

package
v0.0.0-...-418cb44 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const CreateWebhookNotificationCreatedCode int = 201

CreateWebhookNotificationCreatedCode is the HTTP code returned for type CreateWebhookNotificationCreated

View Source
const CreateWebhookNotificationInternalServerErrorCode int = 500

CreateWebhookNotificationInternalServerErrorCode is the HTTP code returned for type CreateWebhookNotificationInternalServerError

View Source
const CreateWebhookNotificationUnprocessableEntityCode int = 422

CreateWebhookNotificationUnprocessableEntityCode is the HTTP code returned for type CreateWebhookNotificationUnprocessableEntity

View Source
const ReceiveWebhookNotificationBadRequestCode int = 400

ReceiveWebhookNotificationBadRequestCode is the HTTP code returned for type ReceiveWebhookNotificationBadRequest

View Source
const ReceiveWebhookNotificationForbiddenCode int = 403

ReceiveWebhookNotificationForbiddenCode is the HTTP code returned for type ReceiveWebhookNotificationForbidden

View Source
const ReceiveWebhookNotificationInternalServerErrorCode int = 500

ReceiveWebhookNotificationInternalServerErrorCode is the HTTP code returned for type ReceiveWebhookNotificationInternalServerError

View Source
const ReceiveWebhookNotificationOKCode int = 200

ReceiveWebhookNotificationOKCode is the HTTP code returned for type ReceiveWebhookNotificationOK

View Source
const ReceiveWebhookNotificationUnauthorizedCode int = 401

ReceiveWebhookNotificationUnauthorizedCode is the HTTP code returned for type ReceiveWebhookNotificationUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateWebhookNotification

type CreateWebhookNotification struct {
	Context *middleware.Context
	Handler CreateWebhookNotificationHandler
}
CreateWebhookNotification swagger:route POST /webhook-notifications webhook createWebhookNotification

Test endpoint for creating webhook notifications

This endpoint creates a webhook notification in the database. If the webhook client is running, it may send the notification soon after creation.

func NewCreateWebhookNotification

func NewCreateWebhookNotification(ctx *middleware.Context, handler CreateWebhookNotificationHandler) *CreateWebhookNotification

NewCreateWebhookNotification creates a new http.Handler for the create webhook notification operation

func (*CreateWebhookNotification) ServeHTTP

type CreateWebhookNotificationCreated

type CreateWebhookNotificationCreated struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.WebhookNotification `json:"body,omitempty"`
}

CreateWebhookNotificationCreated Successful creation

swagger:response createWebhookNotificationCreated

func NewCreateWebhookNotificationCreated

func NewCreateWebhookNotificationCreated() *CreateWebhookNotificationCreated

NewCreateWebhookNotificationCreated creates CreateWebhookNotificationCreated with default headers values

func (*CreateWebhookNotificationCreated) SetPayload

SetPayload sets the payload to the create webhook notification created response

func (*CreateWebhookNotificationCreated) WithPayload

WithPayload adds the payload to the create webhook notification created response

func (*CreateWebhookNotificationCreated) WriteResponse

func (o *CreateWebhookNotificationCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type CreateWebhookNotificationHandler

type CreateWebhookNotificationHandler interface {
	Handle(CreateWebhookNotificationParams) middleware.Responder
}

CreateWebhookNotificationHandler interface for that can handle valid create webhook notification params

type CreateWebhookNotificationHandlerFunc

type CreateWebhookNotificationHandlerFunc func(CreateWebhookNotificationParams) middleware.Responder

CreateWebhookNotificationHandlerFunc turns a function with the right signature into a create webhook notification handler

func (CreateWebhookNotificationHandlerFunc) Handle

Handle executing the request and returning a response

type CreateWebhookNotificationInternalServerError

type CreateWebhookNotificationInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.Error `json:"body,omitempty"`
}

CreateWebhookNotificationInternalServerError A server error occurred.

swagger:response createWebhookNotificationInternalServerError

func NewCreateWebhookNotificationInternalServerError

func NewCreateWebhookNotificationInternalServerError() *CreateWebhookNotificationInternalServerError

NewCreateWebhookNotificationInternalServerError creates CreateWebhookNotificationInternalServerError with default headers values

func (*CreateWebhookNotificationInternalServerError) SetPayload

SetPayload sets the payload to the create webhook notification internal server error response

func (*CreateWebhookNotificationInternalServerError) WithPayload

WithPayload adds the payload to the create webhook notification internal server error response

func (*CreateWebhookNotificationInternalServerError) WriteResponse

WriteResponse to the client

type CreateWebhookNotificationParams

type CreateWebhookNotificationParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The notification sent by webhook-client.
	  In: body
	*/
	Body *supportmessages.WebhookNotification
}

CreateWebhookNotificationParams contains all the bound params for the create webhook notification operation typically these are obtained from a http.Request

swagger:parameters createWebhookNotification

func NewCreateWebhookNotificationParams

func NewCreateWebhookNotificationParams() CreateWebhookNotificationParams

NewCreateWebhookNotificationParams creates a new CreateWebhookNotificationParams object

There are no default values defined in the spec.

func (*CreateWebhookNotificationParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewCreateWebhookNotificationParams() beforehand.

type CreateWebhookNotificationURL

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

CreateWebhookNotificationURL generates an URL for the create webhook notification operation

func (*CreateWebhookNotificationURL) Build

func (o *CreateWebhookNotificationURL) Build() (*url.URL, error)

Build a url path and query string

func (*CreateWebhookNotificationURL) BuildFull

func (o *CreateWebhookNotificationURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*CreateWebhookNotificationURL) Must

func (o *CreateWebhookNotificationURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*CreateWebhookNotificationURL) SetBasePath

func (o *CreateWebhookNotificationURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*CreateWebhookNotificationURL) String

String returns the string representation of the path with query string

func (*CreateWebhookNotificationURL) StringFull

func (o *CreateWebhookNotificationURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*CreateWebhookNotificationURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type CreateWebhookNotificationUnprocessableEntity

type CreateWebhookNotificationUnprocessableEntity struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.ValidationError `json:"body,omitempty"`
}

CreateWebhookNotificationUnprocessableEntity The payload was unprocessable.

swagger:response createWebhookNotificationUnprocessableEntity

func NewCreateWebhookNotificationUnprocessableEntity

func NewCreateWebhookNotificationUnprocessableEntity() *CreateWebhookNotificationUnprocessableEntity

NewCreateWebhookNotificationUnprocessableEntity creates CreateWebhookNotificationUnprocessableEntity with default headers values

func (*CreateWebhookNotificationUnprocessableEntity) SetPayload

SetPayload sets the payload to the create webhook notification unprocessable entity response

func (*CreateWebhookNotificationUnprocessableEntity) WithPayload

WithPayload adds the payload to the create webhook notification unprocessable entity response

func (*CreateWebhookNotificationUnprocessableEntity) WriteResponse

WriteResponse to the client

type ReceiveWebhookNotification

type ReceiveWebhookNotification struct {
	Context *middleware.Context
	Handler ReceiveWebhookNotificationHandler
}
ReceiveWebhookNotification swagger:route POST /webhook-notify webhook receiveWebhookNotification

Test endpoint for receiving messages from our own webhook-client

This endpoint receives a notification that matches the webhook notification model. This is a test endpoint that represents a receiving server. In production, the Prime will set up a receiving endpoint. In testing, this server accepts notifications at this endpoint and simply responds with success and logs them. The `webhook-client` is responsible for retrieving messages from the webhook_notifications table and sending them to the Prime (this endpoint in our testing case) via an mTLS connection.

func NewReceiveWebhookNotification

func NewReceiveWebhookNotification(ctx *middleware.Context, handler ReceiveWebhookNotificationHandler) *ReceiveWebhookNotification

NewReceiveWebhookNotification creates a new http.Handler for the receive webhook notification operation

func (*ReceiveWebhookNotification) ServeHTTP

type ReceiveWebhookNotificationBadRequest

type ReceiveWebhookNotificationBadRequest struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.ClientError `json:"body,omitempty"`
}

ReceiveWebhookNotificationBadRequest The request payload is invalid.

swagger:response receiveWebhookNotificationBadRequest

func NewReceiveWebhookNotificationBadRequest

func NewReceiveWebhookNotificationBadRequest() *ReceiveWebhookNotificationBadRequest

NewReceiveWebhookNotificationBadRequest creates ReceiveWebhookNotificationBadRequest with default headers values

func (*ReceiveWebhookNotificationBadRequest) SetPayload

SetPayload sets the payload to the receive webhook notification bad request response

func (*ReceiveWebhookNotificationBadRequest) WithPayload

WithPayload adds the payload to the receive webhook notification bad request response

func (*ReceiveWebhookNotificationBadRequest) WriteResponse

WriteResponse to the client

type ReceiveWebhookNotificationForbidden

type ReceiveWebhookNotificationForbidden struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.ClientError `json:"body,omitempty"`
}

ReceiveWebhookNotificationForbidden The request was denied.

swagger:response receiveWebhookNotificationForbidden

func NewReceiveWebhookNotificationForbidden

func NewReceiveWebhookNotificationForbidden() *ReceiveWebhookNotificationForbidden

NewReceiveWebhookNotificationForbidden creates ReceiveWebhookNotificationForbidden with default headers values

func (*ReceiveWebhookNotificationForbidden) SetPayload

SetPayload sets the payload to the receive webhook notification forbidden response

func (*ReceiveWebhookNotificationForbidden) WithPayload

WithPayload adds the payload to the receive webhook notification forbidden response

func (*ReceiveWebhookNotificationForbidden) WriteResponse

WriteResponse to the client

type ReceiveWebhookNotificationHandler

type ReceiveWebhookNotificationHandler interface {
	Handle(ReceiveWebhookNotificationParams) middleware.Responder
}

ReceiveWebhookNotificationHandler interface for that can handle valid receive webhook notification params

type ReceiveWebhookNotificationHandlerFunc

type ReceiveWebhookNotificationHandlerFunc func(ReceiveWebhookNotificationParams) middleware.Responder

ReceiveWebhookNotificationHandlerFunc turns a function with the right signature into a receive webhook notification handler

func (ReceiveWebhookNotificationHandlerFunc) Handle

Handle executing the request and returning a response

type ReceiveWebhookNotificationInternalServerError

type ReceiveWebhookNotificationInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.Error `json:"body,omitempty"`
}

ReceiveWebhookNotificationInternalServerError A server error occurred.

swagger:response receiveWebhookNotificationInternalServerError

func NewReceiveWebhookNotificationInternalServerError

func NewReceiveWebhookNotificationInternalServerError() *ReceiveWebhookNotificationInternalServerError

NewReceiveWebhookNotificationInternalServerError creates ReceiveWebhookNotificationInternalServerError with default headers values

func (*ReceiveWebhookNotificationInternalServerError) SetPayload

SetPayload sets the payload to the receive webhook notification internal server error response

func (*ReceiveWebhookNotificationInternalServerError) WithPayload

WithPayload adds the payload to the receive webhook notification internal server error response

func (*ReceiveWebhookNotificationInternalServerError) WriteResponse

WriteResponse to the client

type ReceiveWebhookNotificationOK

type ReceiveWebhookNotificationOK struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.WebhookNotification `json:"body,omitempty"`
}

ReceiveWebhookNotificationOK Received notification

swagger:response receiveWebhookNotificationOK

func NewReceiveWebhookNotificationOK

func NewReceiveWebhookNotificationOK() *ReceiveWebhookNotificationOK

NewReceiveWebhookNotificationOK creates ReceiveWebhookNotificationOK with default headers values

func (*ReceiveWebhookNotificationOK) SetPayload

SetPayload sets the payload to the receive webhook notification o k response

func (*ReceiveWebhookNotificationOK) WithPayload

WithPayload adds the payload to the receive webhook notification o k response

func (*ReceiveWebhookNotificationOK) WriteResponse

func (o *ReceiveWebhookNotificationOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type ReceiveWebhookNotificationParams

type ReceiveWebhookNotificationParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The webhook notification being sent
	  Required: true
	  In: body
	*/
	Body *supportmessages.WebhookNotification
}

ReceiveWebhookNotificationParams contains all the bound params for the receive webhook notification operation typically these are obtained from a http.Request

swagger:parameters receiveWebhookNotification

func NewReceiveWebhookNotificationParams

func NewReceiveWebhookNotificationParams() ReceiveWebhookNotificationParams

NewReceiveWebhookNotificationParams creates a new ReceiveWebhookNotificationParams object

There are no default values defined in the spec.

func (*ReceiveWebhookNotificationParams) BindRequest

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.

To ensure default values, the struct must have been initialized with NewReceiveWebhookNotificationParams() beforehand.

type ReceiveWebhookNotificationURL

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

ReceiveWebhookNotificationURL generates an URL for the receive webhook notification operation

func (*ReceiveWebhookNotificationURL) Build

func (o *ReceiveWebhookNotificationURL) Build() (*url.URL, error)

Build a url path and query string

func (*ReceiveWebhookNotificationURL) BuildFull

func (o *ReceiveWebhookNotificationURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*ReceiveWebhookNotificationURL) Must

func (o *ReceiveWebhookNotificationURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*ReceiveWebhookNotificationURL) SetBasePath

func (o *ReceiveWebhookNotificationURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*ReceiveWebhookNotificationURL) String

String returns the string representation of the path with query string

func (*ReceiveWebhookNotificationURL) StringFull

func (o *ReceiveWebhookNotificationURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*ReceiveWebhookNotificationURL) WithBasePath

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type ReceiveWebhookNotificationUnauthorized

type ReceiveWebhookNotificationUnauthorized struct {

	/*
	  In: Body
	*/
	Payload *supportmessages.ClientError `json:"body,omitempty"`
}

ReceiveWebhookNotificationUnauthorized The request was denied.

swagger:response receiveWebhookNotificationUnauthorized

func NewReceiveWebhookNotificationUnauthorized

func NewReceiveWebhookNotificationUnauthorized() *ReceiveWebhookNotificationUnauthorized

NewReceiveWebhookNotificationUnauthorized creates ReceiveWebhookNotificationUnauthorized with default headers values

func (*ReceiveWebhookNotificationUnauthorized) SetPayload

SetPayload sets the payload to the receive webhook notification unauthorized response

func (*ReceiveWebhookNotificationUnauthorized) WithPayload

WithPayload adds the payload to the receive webhook notification unauthorized response

func (*ReceiveWebhookNotificationUnauthorized) WriteResponse

WriteResponse to the client

Jump to

Keyboard shortcuts

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