Documentation ¶
Index ¶
- Variables
- type MemoryStorage
- func (s *MemoryStorage) CreateWebhook(wh *Webhook) (*Webhook, error)
- func (s *MemoryStorage) DeleteWebhook(id string) error
- func (s *MemoryStorage) GetWebhook(id string) (*Webhook, error)
- func (s *MemoryStorage) ListWebhooks(wh *Webhook) ([]*Webhook, error)
- func (s *MemoryStorage) UpdateWebhook(id string, wh *Webhook) (*Webhook, error)
- type MemoryStorageFactory
- type Storage
- type StorageFactory
- type Webhook
- type WebhookService
- type WebhookServiceOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnknownStorageDriver = errors.New("unknown storage driver") ErrWebhookNotFound = errors.New("webhook not found") )
Functions ¶
This section is empty.
Types ¶
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
func (*MemoryStorage) CreateWebhook ¶
func (s *MemoryStorage) CreateWebhook(wh *Webhook) (*Webhook, error)
func (*MemoryStorage) DeleteWebhook ¶
func (s *MemoryStorage) DeleteWebhook(id string) error
func (*MemoryStorage) GetWebhook ¶
func (s *MemoryStorage) GetWebhook(id string) (*Webhook, error)
func (*MemoryStorage) ListWebhooks ¶
func (s *MemoryStorage) ListWebhooks(wh *Webhook) ([]*Webhook, error)
func (*MemoryStorage) UpdateWebhook ¶
func (s *MemoryStorage) UpdateWebhook(id string, wh *Webhook) (*Webhook, error)
type MemoryStorageFactory ¶
type MemoryStorageFactory struct{}
func (*MemoryStorageFactory) New ¶
func (*MemoryStorageFactory) New(args ...interface{}) (Storage, error)
type Storage ¶
type Storage interface { CreateWebhook(wh *Webhook) (*Webhook, error) DeleteWebhook(id string) error ListWebhooks(wh *Webhook) ([]*Webhook, error) GetWebhook(id string) (*Webhook, error) UpdateWebhook(id string, wh *Webhook) (*Webhook, error) }
func NewStorage ¶
type StorageFactory ¶
type WebhookService ¶
type WebhookService interface { Add(*Webhook) (*Webhook, error) Remove(id string) error List(*Webhook) ([]*Webhook, error) Get(id string) (*Webhook, error) Update(id string, wh *Webhook) (*Webhook, error) Trigger(evt interface{}) error }
func NewWebhookService ¶
func NewWebhookService(opt *WebhookServiceOption, args ...interface{}) (WebhookService, error)
type WebhookServiceOption ¶
type WebhookServiceOption struct {
ContentType string
}
Click to show internal directories.
Click to hide internal directories.