notification

package
v0.0.0-...-a894b33 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDummyNotifier

func NewDummyNotifier() *dummyNotifier

Types

type CalendarNotifier

type CalendarNotifier struct {
	NotifierType string
	Serv         *calendar.Service
}

func NewCalendarNotifier

func NewCalendarNotifier() *CalendarNotifier

func (*CalendarNotifier) Notify

func (notif *CalendarNotifier) Notify(notification Notification, user users.User) error

All calendar events are created on whichever users calendar is linked to the server and the recipient for the event is added as an 'Attenddee'.

type EmailNotifier

type EmailNotifier struct {
	NotfierType string
	Serv        *gmail.Service
}

func NewEmailNotifier

func NewEmailNotifier() *EmailNotifier

func (*EmailNotifier) Notify

func (notif *EmailNotifier) Notify(notification Notification, user users.User) error

type Notification

type Notification struct {
	Priority   int
	Send       time.Time
	Expiration time.Time
	Message    string
	UserID     int
}

type Notifier

type Notifier interface {
	Notify(notification Notification, user users.User) error
}

type NotifierStruct

type NotifierStruct struct {
	NotfierType string
}

type SlackNotifier

type SlackNotifier struct {
	NotifierType string
}

func NewSlackNotifier

func NewSlackNotifier() *SlackNotifier

func (*SlackNotifier) Notify

func (notif *SlackNotifier) Notify(notification Notification, user users.User) error

type WebPushNotifier

type WebPushNotifier struct {
	NotfierType     string
	PreferencesJson string
	// contains filtered or unexported fields
}

func NewWebPushNotifier

func NewWebPushNotifier(preferencesJsonFile string, db *sql.DB) *WebPushNotifier

func (*WebPushNotifier) Notify

func (notif *WebPushNotifier) Notify(notification Notification, user users.User) error

Jump to

Keyboard shortcuts

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