webhook

package
v0.0.0-...-270f78c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketName represents the name of the bucket where this service stores data.
	BucketName = "webhooks"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service represents a service for managing webhook data.

func NewService

func NewService(connection portainer.Connection) (*Service, error)

NewService creates a new instance of a service.

func (*Service) BucketName

func (service *Service) BucketName() string

func (*Service) Create

func (service *Service) Create(webhook *portainer.Webhook) error

CreateWebhook assign an ID to a new webhook and saves it.

func (*Service) DeleteWebhook

func (service *Service) DeleteWebhook(ID portainer.WebhookID) error

DeleteWebhook deletes a webhook.

func (*Service) UpdateWebhook

func (service *Service) UpdateWebhook(ID portainer.WebhookID, webhook *portainer.Webhook) error

UpdateWebhook update a webhook.

func (*Service) Webhook

func (service *Service) Webhook(ID portainer.WebhookID) (*portainer.Webhook, error)

Webhook returns a webhook by ID.

func (*Service) WebhookByResourceID

func (service *Service) WebhookByResourceID(ID string) (*portainer.Webhook, error)

WebhookByResourceID returns a webhook by the ResourceID it is associated with.

func (*Service) WebhookByToken

func (service *Service) WebhookByToken(token string) (*portainer.Webhook, error)

WebhookByToken returns a webhook by the random token it is associated with.

func (*Service) Webhooks

func (service *Service) Webhooks() ([]portainer.Webhook, error)

Webhooks returns an array of all webhooks

Jump to

Keyboard shortcuts

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