Documentation ¶
Index ¶
- Constants
- type Service
- func (service *Service) BucketName() string
- func (service *Service) Create(webhook *portainer.Webhook) error
- func (service *Service) DeleteWebhook(ID portainer.WebhookID) error
- func (service *Service) UpdateWebhook(ID portainer.WebhookID, webhook *portainer.Webhook) error
- func (service *Service) Webhook(ID portainer.WebhookID) (*portainer.Webhook, error)
- func (service *Service) WebhookByResourceID(ID string) (*portainer.Webhook, error)
- func (service *Service) WebhookByToken(token string) (*portainer.Webhook, error)
- func (service *Service) Webhooks() ([]portainer.Webhook, error)
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) DeleteWebhook ¶
DeleteWebhook deletes a webhook.
func (*Service) UpdateWebhook ¶
UpdateWebhook update a webhook.
func (*Service) WebhookByResourceID ¶
WebhookByResourceID returns a webhook by the ResourceID it is associated with.
func (*Service) WebhookByToken ¶
WebhookByToken returns a webhook by the random token it is associated with.
Click to show internal directories.
Click to hide internal directories.