notification

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Notifications displayed in the counter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(feedId, link string) bool

Check with the given feedId and link, there is already a notification or not

Types

type Notification

type Notification struct {
	NotificationId string    `json:"notificationId"`
	FeedId         string    `json:"feedId"`
	Title          string    `json:"title"`
	Link           string    `json:"link"`
	PubDate        time.Time `json:"-"`
}

func Get

func Get(notificationId string) *Notification

Get the notification from a given id

func GetList

func GetList(userId string) []*Notification

Fetch all notifications from the db

func New

func New() *Notification

Instanciate a new Notification

func (*Notification) Delete

func (n *Notification) Delete()

Delete a notification

func (*Notification) Save

func (n *Notification) Save()

Save the notification in the database

Jump to

Keyboard shortcuts

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