Documentation ¶
Index ¶
- type Manager
- func (m *Manager) Add(ctx context.Context, s *hub.Subscription) error
- func (m *Manager) Delete(ctx context.Context, s *hub.Subscription) error
- func (m *Manager) GetByPackageJSON(ctx context.Context, packageID string) ([]byte, error)
- func (m *Manager) GetByUserJSON(ctx context.Context) ([]byte, error)
- func (m *Manager) GetSubscriptors(ctx context.Context, packageID string, eventKind hub.EventKind) ([]*hub.User, error)
- type ManagerMock
- func (m *ManagerMock) Add(ctx context.Context, s *hub.Subscription) error
- func (m *ManagerMock) Delete(ctx context.Context, s *hub.Subscription) error
- func (m *ManagerMock) GetByPackageJSON(ctx context.Context, packageID string) ([]byte, error)
- func (m *ManagerMock) GetByUserJSON(ctx context.Context) ([]byte, error)
- func (m *ManagerMock) GetSubscriptors(ctx context.Context, packageID string, eventKind hub.EventKind) ([]*hub.User, 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 subscriptions.
func (*Manager) GetByPackageJSON ¶
GetByPackageJSON returns the subscriptions the user has for a given package as json array of objects.
func (*Manager) GetByUserJSON ¶
GetByUserJSON returns all the subscriptions of the user doing the request as as json array of objects.
type ManagerMock ¶
ManagerMock is a mock implementation of the SubscriptionManager interface.
func (*ManagerMock) Add ¶
func (m *ManagerMock) Add(ctx context.Context, s *hub.Subscription) error
Add implements the SubscriptionManager interface.
func (*ManagerMock) Delete ¶
func (m *ManagerMock) Delete(ctx context.Context, s *hub.Subscription) error
Delete implements the SubscriptionManager interface.
func (*ManagerMock) GetByPackageJSON ¶
GetByPackageJSON implements the SubscriptionManager interface.
func (*ManagerMock) GetByUserJSON ¶
func (m *ManagerMock) GetByUserJSON(ctx context.Context) ([]byte, error)
GetByUserJSON implements the SubscriptionManager interface.
Click to show internal directories.
Click to hide internal directories.