notification

package
v0.0.0-...-d075b32 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ListItem

type ListItem struct {
	Id      int    `json:"id"`
	Nid     int    `json:"nid"`
	Ntype   int    `json:"ntype"`
	Type    string `json:"type"`
	Uid     int    `json:"uid"`
	Target  string `json:"target"`
	Status  bool   `json:"status"`
	Attempt int    `json:"attempt"`
	Subject string `json:"subject"`
	Body    string `json:"body"`
}

type Message

type Message struct {
	Type    NotificationType
	Subject string
	Body    string
}

func New

func New(nt NotificationType, subject string, body string) *Message

func (*Message) String

func (m *Message) String() string

type NotificationType

type NotificationType int
const (
	TypeInformational NotificationType = iota
	TypeAlert
	TypeReminder
)

func (NotificationType) EnumIndex

func (nt NotificationType) EnumIndex() int

func (NotificationType) String

func (nt NotificationType) String() string

type Notifier

type Notifier interface {
	Notify(NotificationType, string, string) error
}

type Request

type Request struct {
	Type    NotificationType `json:"type"`
	Subject string           `json:"subject"`
	Body    string           `json:"body"`
}

func (*Request) String

func (r *Request) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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