mocks

package
v0.0.0-...-0805cb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package mocks implements mocks for unit testing APNs and the HTTP/2 API.

Index

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

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).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL