webhook

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WebhookProvider

type WebhookProvider struct {
	DomainFilter endpoint.DomainFilter
	// contains filtered or unexported fields
}

func NewWebhookProvider

func NewWebhookProvider(u string) (*WebhookProvider, error)

func (WebhookProvider) AdjustEndpoints

func (p WebhookProvider) AdjustEndpoints(e []*endpoint.Endpoint) ([]*endpoint.Endpoint, error)

AdjustEndpoints will call the provider doing a POST on `/adjustendpoints` which will return a list of modified endpoints based on a provider specific requirement. This method returns an empty slice in case there is a technical error on the provider's side so that no endpoints will be considered.

func (WebhookProvider) ApplyChanges

func (p WebhookProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges will make a POST to remoteServerURL/records with the changes

func (WebhookProvider) GetDomainFilter

func (p WebhookProvider) GetDomainFilter() endpoint.DomainFilterInterface

GetDomainFilter make calls to get the serialized version of the domain filter

func (WebhookProvider) Records

func (p WebhookProvider) Records(ctx context.Context) ([]*endpoint.Endpoint, error)

Records will make a GET call to remoteServerURL/records and return the results

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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