notification

package
v0.0.0-...-4b98c26 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notification

type Notification struct {
	NID  string `json:"_id,omitempty"`
	NRev string `json:"_rev,omitempty"`

	SourceID   string `json:"source_id"`
	Originator string `json:"originator,omitempty"`
	Slug       string `json:"slug,omitempty"`
	Category   string `json:"category"`
	CategoryID string `json:"category_id,omitempty"`

	CreatedAt time.Time `json:"created_at"`
	LastSent  time.Time `json:"last_sent"`

	Title    string                 `json:"title,omitempty"`
	Message  string                 `json:"message,omitempty"`
	Priority string                 `json:"priority,omitempty"`
	Sound    string                 `json:"sound,omitempty"`
	State    interface{}            `json:"state,omitempty"`
	Data     map[string]interface{} `json:"data,omitempty"`

	PreferredChannels []string `json:"preferred_channels,omitempty"`
	At                string   `json:"at,omitempty"`

	// XXX retro-compatible fields for sending rich mail
	Content     string `json:"content,omitempty"`
	ContentHTML string `json:"content_html,omitempty"`
}

Notification data containing associated to an application a list of actions

func (*Notification) Clone

func (n *Notification) Clone() couchdb.Doc

Clone implements couchdb.Doc

func (*Notification) DocType

func (n *Notification) DocType() string

DocType is used to implement the couchdb.Doc interface

func (*Notification) Fetch

func (n *Notification) Fetch(field string) []string

Fetch implements permissions.Fetcher

func (*Notification) ID

func (n *Notification) ID() string

ID is used to implement the couchdb.Doc interface

func (*Notification) Rev

func (n *Notification) Rev() string

Rev is used to implement the couchdb.Doc interface

func (*Notification) SetID

func (n *Notification) SetID(id string)

SetID is used to implement the couchdb.Doc interface

func (*Notification) SetRev

func (n *Notification) SetRev(rev string)

SetRev is used to implement the couchdb.Doc interface

func (*Notification) Source

func (n *Notification) Source() string

Source returns the complete normalized source value. This should be recorded in the `source_id` field.

type Properties

type Properties struct {
	Description     string            `json:"description,omitempty"`
	Collapsible     bool              `json:"collapsible,omitempty"`
	Multiple        bool              `json:"multiple,omitempty"`
	Stateful        bool              `json:"stateful,omitempty"`
	DefaultPriority string            `json:"default_priority,omitempty"`
	TimeToLive      time.Duration     `json:"time_to_live,omitempty"`
	Templates       map[string]string `json:"templates,omitempty"`
	MinInterval     time.Duration     `json:"min_interval,omitempty"`

	MailTemplate string `json:"-"`
}

Properties is a notification type parameters, describing how a specific notification group should behave.

func (*Properties) Clone

func (p *Properties) Clone() *Properties

Clone returns a cloned Properties struct pointer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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