Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Add(ctx context.Context, orgName string, wh *hub.Webhook) error
- func (m *Manager) Delete(ctx context.Context, webhookID string) error
- func (m *Manager) GetJSON(ctx context.Context, webhookID string) ([]byte, error)
- func (m *Manager) GetOwnedByOrgJSON(ctx context.Context, orgName string, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *Manager) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *Manager) GetSubscribedTo(ctx context.Context, e *hub.Event) ([]*hub.Webhook, error)
- func (m *Manager) Update(ctx context.Context, wh *hub.Webhook) error
- type ManagerMock
- func (m *ManagerMock) Add(ctx context.Context, orgName string, wh *hub.Webhook) error
- func (m *ManagerMock) Delete(ctx context.Context, webhookID string) error
- func (m *ManagerMock) GetJSON(ctx context.Context, webhookID string) ([]byte, error)
- func (m *ManagerMock) GetOwnedByOrgJSON(ctx context.Context, orgName string, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *ManagerMock) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
- func (m *ManagerMock) GetSubscribedTo(ctx context.Context, e *hub.Event) ([]*hub.Webhook, error)
- func (m *ManagerMock) Update(ctx context.Context, wh *hub.Webhook) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides an API to manage webhooks.
func (*Manager) GetOwnedByOrgJSON ¶
func (m *Manager) GetOwnedByOrgJSON( ctx context.Context, orgName string, p *hub.Pagination, ) (*hub.JSONQueryResult, error)
GetOwnedByOrgJSON returns the webhooks belonging to the provided organization as a json array.
func (*Manager) GetOwnedByUserJSON ¶
func (m *Manager) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
GetOwnedByUserJSON returns the webhooks belonging to the requesting user as a json array.
func (*Manager) GetSubscribedTo ¶
GetSubscribedTo returns the webhooks subscribed to the event provided.
type ManagerMock ¶
ManagerMock is a mock implementation of the WebhookManager interface.
func (*ManagerMock) Delete ¶
func (m *ManagerMock) Delete(ctx context.Context, webhookID string) error
Delete implements the WebhookManager interface.
func (*ManagerMock) GetOwnedByOrgJSON ¶
func (m *ManagerMock) GetOwnedByOrgJSON( ctx context.Context, orgName string, p *hub.Pagination, ) (*hub.JSONQueryResult, error)
GetOwnedByOrgJSON implements the WebhookManager interface.
func (*ManagerMock) GetOwnedByUserJSON ¶
func (m *ManagerMock) GetOwnedByUserJSON(ctx context.Context, p *hub.Pagination) (*hub.JSONQueryResult, error)
GetOwnedByUserJSON implements the WebhookManager interface.
func (*ManagerMock) GetSubscribedTo ¶
GetSubscribedTo implements the WebhookManager interface.
Click to show internal directories.
Click to hide internal directories.