Documentation ¶
Index ¶
- Variables
- func InitApplePush(ctx context.Context, appConfig *config.AppConfig)
- func InitFirebasePush(ctx context.Context, appConfig *config.AppConfig)
- func NewApplePushClientItem(ctx context.Context, appConfig *config.AppConfig, bundleID string) (*apns2.Client, error)
- func NewFirebasePushClientItem(ctx context.Context, appConfig *config.AppConfig, packageName string) (*messaging.Client, error)
- type ApplePushClient
- type FirebasePushClient
- type MessageFirebaseItem
- type Pusher
- type WrappedError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CanNotGetClientFromConfig = errors.New("can not get client from config") CanNotGetPushClient = errors.New("can not get push client") ConvertToSpecificPlatformClientFailed = errors.New("convert to specific platform client failed") ConvertToSpecificPlatformMessageFailed = errors.New("convert to specific platform message failed") SendMessageResponseNotOk = errors.New("request send message to platform push service reply http status code not ok") )
View Source
var ( GlobalApplePushClient = NewApplePushClient() GlobalFirebasePushClient = NewFirebasePushClient() )
Functions ¶
func NewApplePushClientItem ¶
Types ¶
type ApplePushClient ¶
type ApplePushClient struct {
// contains filtered or unexported fields
}
func NewApplePushClient ¶
func NewApplePushClient() *ApplePushClient
func (*ApplePushClient) GetClientByAppID ¶
func (a *ApplePushClient) GetClientByAppID(ctx context.Context, appID string) (interface{}, bool)
func (*ApplePushClient) Push ¶
func (a *ApplePushClient) Push(ctx context.Context, message *models.PushMessage) (interface{}, error)
type FirebasePushClient ¶
type FirebasePushClient struct {
// contains filtered or unexported fields
}
func NewFirebasePushClient ¶
func NewFirebasePushClient() *FirebasePushClient
func (*FirebasePushClient) GetClientByAppID ¶
func (f *FirebasePushClient) GetClientByAppID(ctx context.Context, appID string) (interface{}, bool)
func (*FirebasePushClient) Push ¶
func (f *FirebasePushClient) Push(ctx context.Context, message *models.PushMessage) (interface{}, error)
type MessageFirebaseItem ¶
type WrappedError ¶
type WrappedError struct {
// contains filtered or unexported fields
}
func NewWrappedError ¶
func NewWrappedError(msg string, err error) *WrappedError
func (*WrappedError) Error ¶
func (w *WrappedError) Error() string
func (*WrappedError) Unwrap ¶
func (w *WrappedError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.