Versions in this module Expand all Collapse all v1 v1.18.3 Jun 15, 2024 v1.18.2 Jun 12, 2024 v1.18.1 Jun 9, 2024 v1.18.0 Jun 8, 2024 Changes in this version type PushNotification + APNS *messaging.APNSConfig + Android *messaging.AndroidConfig + FCMOptions *messaging.FCMOptions + Webpush *messaging.WebpushConfig v1.17.1 Apr 21, 2024 v1.17.0 Mar 14, 2024 v1.16.3 Mar 29, 2023 v1.16.2 Feb 27, 2023 v1.16.1 Feb 27, 2023 v1.16.0 Dec 24, 2022 Changes in this version + const HIGH + const NORMAL type PushNotification + InterruptionLevel string v1.15.0 Apr 17, 2022 Changes in this version + const ApnsPriorityHigh + const ApnsPriorityLow + var ApnsClient *apns2.Client + var DialTLS = func(cfg *tls.Config) func(network, addr string) (net.Conn, error) + var FCMClient *fcm.Client + var HMSClient *core.HMSClient + var MaxConcurrentIOSPushes chan struct + var Run = func(cfg *config.ConfYaml) func(ctx context.Context, msg queue.QueuedMessage) error + func CheckMessage(req *PushNotification) error + func CheckPushConf(cfg *config.ConfYaml) error + func DispatchFeedback(log logx.LogPushEntry, url string, timeout int64) error + func GetAndroidNotification(req *PushNotification) *fcm.Message + func GetHuaweiNotification(req *PushNotification) (*model.MessageRequest, error) + func GetIOSNotification(req *PushNotification) *apns2.Notification + func GetPushClient(conf *c.Config) (*client.HMSClient, error) + func InitAPNSClient(cfg *config.ConfYaml) error + func InitFCMClient(cfg *config.ConfYaml, key string) (*fcm.Client, error) + func InitHMSClient(cfg *config.ConfYaml, appSecret, appID string) (*client.HMSClient, error) + func SetProxy(proxy string) error + type Alert struct + Action string + ActionLocKey string + Body string + LaunchImage string + LocArgs []string + LocKey string + Subtitle string + SummaryArg string + SummaryArgCount int + Title string + TitleLocArgs []string + TitleLocKey string + type D map[string]interface + type PushNotification struct + APIKey string + Alert Alert + Apns D + ApnsID string + AppID string + AppSecret string + Badge *int + BiTag string + Category string + CollapseID string + CollapseKey string + Condition string + ContentAvailable bool + Data D + DelayWhileIdle bool + Development bool + DryRun bool + Expiration *int64 + FastAppTarget int + HuaweiCollapseKey int + HuaweiData string + HuaweiNotification *model.AndroidNotification + HuaweiTTL string + ID string + Image string + Message string + MutableContent bool + Notification *fcm.Notification + Platform int + Priority string + Production bool + PushType string + RestrictedPackageName string + Retry int + Sound interface{} + SoundName string + SoundVolume float32 + ThreadID string + TimeToLive *uint + Title string + To string + Tokens []string + Topic string + URLArgs []string + func (p *PushNotification) Bytes() []byte + func (p *PushNotification) IsTopic() bool + type RequestPush struct + Notifications []PushNotification + type ResponsePush struct + Logs []logx.LogPushEntry + func PushToAndroid(req *PushNotification, cfg *config.ConfYaml) (resp *ResponsePush, err error) + func PushToHuawei(req *PushNotification, cfg *config.ConfYaml) (resp *ResponsePush, err error) + func PushToIOS(req *PushNotification, cfg *config.ConfYaml) (resp *ResponsePush, err error) + func SendNotification(req queue.QueuedMessage, cfg *config.ConfYaml) (resp *ResponsePush, err error) + type Sound struct + Critical int + Name string + Volume float32