notificator

package
v0.0.0-...-9e59f10 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NotifHandler

type NotifHandler struct {
	ServerKey string
}

NotifHandler holder

func NewNotifHandler

func NewNotifHandler() *NotifHandler

NewNotifHandler instance

func (*NotifHandler) Send

func (h *NotifHandler) Send(payload *Payload)

Send notif with payload

type Payload

type Payload struct {
	NotifID     int64          `json:"notif_id"`
	ReceiverID  int64          `json:"receiver_id"`
	TargetID    int64          `json:"target_id"`
	NotifKind   core.NotifType `json:"notif_kind"`
	Item        interface{}    `json:"item"`
	Title       string         `json:"title"`
	Message     string         `json:"message"`
	Created     *time.Time     `json:"created"`
	ClickAction string         `json:"click_action"`
}

Payload for notificator

Jump to

Keyboard shortcuts

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