webhookclient

package
v0.0.0-...-a423d60 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 License: Apache-2.0 Imports: 17 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(httpClient *http.Client, mtlsClient *http.Client) *client

NewClient creates a new webhook client

Types

type FormationAssignmentNotificationRequest

type FormationAssignmentNotificationRequest struct {
	Webhook       *graphql.Webhook
	Object        webhook.FormationAssignmentTemplateInput
	CorrelationID string
}

FormationAssignmentNotificationRequest represents a formation assignment webhook request to be executed

func (*FormationAssignmentNotificationRequest) Clone

Clone returns a copy of the FormationAssignmentNotificationRequest

func (*FormationAssignmentNotificationRequest) GetCorrelationID

func (nr *FormationAssignmentNotificationRequest) GetCorrelationID() string

GetCorrelationID returns the CorrelationID assigned to the FormationAssignmentNotificationRequest

func (*FormationAssignmentNotificationRequest) GetObject

GetObject returns the Object associated with the FormationAssignmentNotificationRequest

func (*FormationAssignmentNotificationRequest) GetWebhook

GetWebhook returns the Webhook associated with the FormationAssignmentNotificationRequest

type FormationAssignmentNotificationRequestExt

type FormationAssignmentNotificationRequestExt struct {
	*FormationAssignmentNotificationRequest
	Operation                  model.FormationOperation
	FormationAssignment        *model.FormationAssignment
	ReverseFormationAssignment *model.FormationAssignment
	Formation                  *model.Formation
	TargetSubtype              string
}

FormationAssignmentNotificationRequestExt is extended FormationAssignmentRequest with Operation, FA, ReverseFA, Formation and Target subtype.

func (*FormationAssignmentNotificationRequestExt) GetFormation

GetFormation returns FormationAssignmentNotificationRequestExt formation

func (*FormationAssignmentNotificationRequestExt) GetFormationAssignment

GetFormationAssignment returns FormationAssignmentNotificationRequestExt formation assignment

func (*FormationAssignmentNotificationRequestExt) GetObjectSubtype

func (f *FormationAssignmentNotificationRequestExt) GetObjectSubtype() string

GetObjectSubtype returns FormationAssignmentNotificationRequestExt object subtype

func (*FormationAssignmentNotificationRequestExt) GetObjectType

GetObjectType returns FormationAssignmentNotificationRequestExt object type

func (*FormationAssignmentNotificationRequestExt) GetOperation

GetOperation returns FormationAssignmentNotificationRequestExt operation

func (*FormationAssignmentNotificationRequestExt) GetReverseFormationAssignment

func (f *FormationAssignmentNotificationRequestExt) GetReverseFormationAssignment() *model.FormationAssignment

GetReverseFormationAssignment returns FormationAssignmentNotificationRequestExt reverse formation assignment

type FormationAssignmentNotificationRequestTargetMapping

type FormationAssignmentNotificationRequestTargetMapping struct {
	*FormationAssignmentNotificationRequest
	Target string
}

FormationAssignmentNotificationRequestTargetMapping represents a formation assignment webhook request to be executed mapped to a target that is to be notified.

type FormationNotificationRequest

type FormationNotificationRequest struct {
	*Request
	Operation     model.FormationOperation
	Formation     *model.Formation
	FormationType string
}

FormationNotificationRequest represents a formation webhook request to be executed with added Operation, Formation and FormationType

func (*FormationNotificationRequest) GetFormation

func (fnr *FormationNotificationRequest) GetFormation() *model.Formation

GetFormation returns FormationNotificationRequest formation

func (*FormationNotificationRequest) GetFormationAssignment

func (fnr *FormationNotificationRequest) GetFormationAssignment() *model.FormationAssignment

GetFormationAssignment returns FormationNotificationRequest formation assignment

func (*FormationNotificationRequest) GetObjectSubtype

func (fnr *FormationNotificationRequest) GetObjectSubtype() string

GetObjectSubtype returns FormationNotificationRequest object subtype

func (*FormationNotificationRequest) GetObjectType

func (fnr *FormationNotificationRequest) GetObjectType() model.ResourceType

GetObjectType returns FormationNotificationRequest object type

func (*FormationNotificationRequest) GetOperation

GetOperation returns FormationNotificationRequest operation

func (*FormationNotificationRequest) GetReverseFormationAssignment

func (fnr *FormationNotificationRequest) GetReverseFormationAssignment() *model.FormationAssignment

GetReverseFormationAssignment returns FormationNotificationRequest reverse formation assignment

type PollRequest

type PollRequest struct {
	*Request
	PollURL string
}

PollRequest represents a webhook poll request to be executed

func NewPollRequest

func NewPollRequest(webhook *graphql.Webhook, requestObject webhook.TemplateInput, correlationID string, pollURL string) *PollRequest

NewPollRequest constructs a webhook Request

type Request

type Request struct {
	Webhook       *graphql.Webhook
	Object        webhook.TemplateInput
	CorrelationID string
}

Request represents a webhook request to be executed

func NewRequest

func NewRequest(webhook *graphql.Webhook, requestObject webhook.TemplateInput, correlationID string) *Request

NewRequest constructs a webhook Request

func (*Request) GetCorrelationID

func (r *Request) GetCorrelationID() string

GetCorrelationID returns the CorrelationID assigned to the Request

func (*Request) GetObject

func (r *Request) GetObject() webhook.TemplateInput

GetObject returns the Object associated with the Request

func (*Request) GetWebhook

func (r *Request) GetWebhook() *graphql.Webhook

GetWebhook return the Webhook associated with the Request

type WebhookExtRequest

type WebhookExtRequest interface {
	WebhookRequest
	GetObjectType() model.ResourceType
	GetObjectSubtype() string
	GetOperation() model.FormationOperation
	GetFormationAssignment() *model.FormationAssignment
	GetReverseFormationAssignment() *model.FormationAssignment
	GetFormation() *model.Formation
}

WebhookExtRequest represent an extended request associated with registered webhook

type WebhookRequest

type WebhookRequest interface {
	GetWebhook() *graphql.Webhook
	GetObject() webhook.TemplateInput
	GetCorrelationID() string
}

WebhookRequest represent a request associated with registered webhook

type WebhookStatusGoneErr

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

WebhookStatusGoneErr represents an error type which represents a gone status code returned in response to calling delete webhook.

func NewWebhookStatusGoneErr

func NewWebhookStatusGoneErr(goneStatusCode int) WebhookStatusGoneErr

NewWebhookStatusGoneErr constructs a new WebhookStatusGoneErr with the given error message

Jump to

Keyboard shortcuts

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