Documentation ¶
Overview ¶
Package mocks implements mocks for unit testing APNs and the HTTP/2 API.
Index ¶
- type MockPushServiceType
- func (pst *MockPushServiceType) BuildDeliveryPointFromMap(map[string]string, *push.DeliveryPoint) error
- func (pst *MockPushServiceType) BuildPushServiceProviderFromMap(kv map[string]string, psp *push.PushServiceProvider) error
- func (pst *MockPushServiceType) Finalize()
- func (pst *MockPushServiceType) Name() string
- func (pst *MockPushServiceType) Preview(*push.Notification) ([]byte, push.Error)
- func (pst *MockPushServiceType) Push(*push.PushServiceProvider, <-chan *push.DeliveryPoint, chan<- *push.Result, ...)
- func (pst *MockPushServiceType) SetErrorReportChan(errChan chan<- push.Error)
- func (pst *MockPushServiceType) SetPushServiceConfig(*push.PushServiceConfig)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPushServiceType ¶
type MockPushServiceType struct{}
MockPushServiceType contains mocks of enough functionality of a push service type for unit testing. It panics for unimplemented functionality.
func (*MockPushServiceType) BuildDeliveryPointFromMap ¶
func (pst *MockPushServiceType) BuildDeliveryPointFromMap(map[string]string, *push.DeliveryPoint) error
BuildDeliveryPointFromMap panics due to not being used in any tests.
func (*MockPushServiceType) BuildPushServiceProviderFromMap ¶
func (pst *MockPushServiceType) BuildPushServiceProviderFromMap(kv map[string]string, psp *push.PushServiceProvider) error
BuildPushServiceProviderFromMap unserializes a push service provider from kv, for this mock of the APNs push service type.
func (*MockPushServiceType) Finalize ¶
func (pst *MockPushServiceType) Finalize()
Finalize will do nothing in this mock.
func (*MockPushServiceType) Name ¶
func (pst *MockPushServiceType) Name() string
Name returns the name of the push service.
func (*MockPushServiceType) Preview ¶
func (pst *MockPushServiceType) Preview(*push.Notification) ([]byte, push.Error)
Preview will panic (not used by tests using this mock).
func (*MockPushServiceType) Push ¶
func (pst *MockPushServiceType) Push(*push.PushServiceProvider, <-chan *push.DeliveryPoint, chan<- *push.Result, *push.Notification)
Push will panic (not used by tests using this mock).
func (*MockPushServiceType) SetErrorReportChan ¶
func (pst *MockPushServiceType) SetErrorReportChan(errChan chan<- push.Error)
SetErrorReportChan will panic (not used by tests using this mock).
func (*MockPushServiceType) SetPushServiceConfig ¶
func (pst *MockPushServiceType) SetPushServiceConfig(*push.PushServiceConfig)
SetPushServiceConfig will panic (not used by tests using this mock).