notify

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	EN string `json:"en"`
}

type Headings

type Headings struct {
	EN string `json:"en"`
}

type Notifier

type Notifier interface {
	SendNotifyToAllUser(headings string, content string) error                      // 向所有用户推送
	SendNotifyToCustomUser(userIds []string, headings string, content string) error // 推送自定义通知
	//SendNotifySystemMessageToUser(userIds []string, title string, content string) error // 推送系统通知
	//SendNotifyUserMessageToUser(userIds []string, title string, content string) error   // 推送用户消息
	SendNotifyToLoginAbnormalUser(userInfo schema.ProfilePublic) error // 推送用户登录异常
}
var Notify *Notifier

type NotifierOneSignal

type NotifierOneSignal struct {
}

func NewNotifierOneSignal

func NewNotifierOneSignal() *NotifierOneSignal

func (*NotifierOneSignal) SendNotifyToAllUser

func (n *NotifierOneSignal) SendNotifyToAllUser(headings string, content string) error

func (*NotifierOneSignal) SendNotifyToCustomUser

func (n *NotifierOneSignal) SendNotifyToCustomUser(userId []string, headings string, content string) error

func (*NotifierOneSignal) SendNotifyToLoginAbnormalUser

func (n *NotifierOneSignal) SendNotifyToLoginAbnormalUser(userInfo schema.ProfilePublic) error

type SendNotifyEvent

type SendNotifyEvent string
const (
	SendNotifyEventSendNotifyToAllUser           SendNotifyEvent = "SendNotifyToAllUser"
	SendNotifyEventSendNotifyToCustomUser        SendNotifyEvent = "SendNotifyToCustomUser"
	SendNotifyEventSendNotifyToLoginAbnormalUser SendNotifyEvent = "SendNotifyToLoginAbnormalUser"
)

Jump to

Keyboard shortcuts

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