Documentation ¶
Index ¶
- Constants
- func AddLikeNotification(like *db.MemoLike, updateCache bool) error
- func AddNewFollowerNotification(follow *db.MemoFollow, updateCache bool) error
- func AddReplyNotification(reply *db.MemoPost, updateCache bool) error
- func AttachNamesToNotifications(notifications []*Notification) error
- func AttachProfilePicsToNotifications(notifications []*Notification) error
- type LikeNotification
- type NewFollowerNotification
- func (n NewFollowerNotification) GetAddressString() string
- func (n NewFollowerNotification) GetMessage() string
- func (n NewFollowerNotification) GetName() string
- func (n NewFollowerNotification) GetNotification() *Notification
- func (n NewFollowerNotification) GetPostHashString() string
- func (n NewFollowerNotification) GetTime() time.Time
- type Notification
- type NotificationType
- type ReplyNotification
- func (n ReplyNotification) GetAddressString() string
- func (n ReplyNotification) GetMessage() string
- func (n ReplyNotification) GetName() string
- func (n ReplyNotification) GetNotification() *Notification
- func (n ReplyNotification) GetPostHashString() string
- func (n ReplyNotification) GetTime() time.Time
Constants ¶
View Source
const ( TypeLike = "like" TypeFollow = "follow" TypeReply = "reply" )
Variables ¶
This section is empty.
Functions ¶
func AddNewFollowerNotification ¶
func AddNewFollowerNotification(follow *db.MemoFollow, updateCache bool) error
func AttachNamesToNotifications ¶
func AttachNamesToNotifications(notifications []*Notification) error
func AttachProfilePicsToNotifications ¶
func AttachProfilePicsToNotifications(notifications []*Notification) error
Types ¶
type LikeNotification ¶
type LikeNotification struct { Like *db.MemoLike Post *db.MemoPost Notification *db.Notification Name string }
func (LikeNotification) GetAddressString ¶
func (n LikeNotification) GetAddressString() string
func (LikeNotification) GetMessage ¶
func (n LikeNotification) GetMessage() string
func (LikeNotification) GetName ¶
func (n LikeNotification) GetName() string
func (LikeNotification) GetNotification ¶
func (n LikeNotification) GetNotification() *Notification
func (LikeNotification) GetPostHashString ¶
func (n LikeNotification) GetPostHashString() string
func (LikeNotification) GetTime ¶
func (n LikeNotification) GetTime() time.Time
type NewFollowerNotification ¶
type NewFollowerNotification struct { Follow *db.MemoFollow Notification *db.Notification Name string }
func (NewFollowerNotification) GetAddressString ¶
func (n NewFollowerNotification) GetAddressString() string
func (NewFollowerNotification) GetMessage ¶
func (n NewFollowerNotification) GetMessage() string
func (NewFollowerNotification) GetName ¶
func (n NewFollowerNotification) GetName() string
func (NewFollowerNotification) GetNotification ¶
func (n NewFollowerNotification) GetNotification() *Notification
func (NewFollowerNotification) GetPostHashString ¶
func (n NewFollowerNotification) GetPostHashString() string
func (NewFollowerNotification) GetTime ¶
func (n NewFollowerNotification) GetTime() time.Time
type Notification ¶
type Notification struct { DbId uint DbNotification *db.Notification Type NotificationType Name string PkHash []byte AddressString string PostHashString string Message string Time time.Time ProfilePic *db.MemoSetPic // Reply ParentMessage string ParentHashString string // Like TipAmount int64 }
func GetNotificationsFeed ¶
func GetNotificationsFeed(pkHash []byte, offset uint) ([]*Notification, error)
func (Notification) GetId ¶
func (n Notification) GetId() uint
func (Notification) GetTimeAgo ¶
func (n Notification) GetTimeAgo() string
func (Notification) IsLike ¶
func (n Notification) IsLike() bool
func (Notification) IsNewFollower ¶
func (n Notification) IsNewFollower() bool
func (Notification) IsReply ¶
func (n Notification) IsReply() bool
type NotificationType ¶
type NotificationType string
type ReplyNotification ¶
type ReplyNotification struct { Post *db.MemoPost Parent *db.MemoPost Notification *db.Notification Name string }
func (ReplyNotification) GetAddressString ¶
func (n ReplyNotification) GetAddressString() string
func (ReplyNotification) GetMessage ¶
func (n ReplyNotification) GetMessage() string
func (ReplyNotification) GetName ¶
func (n ReplyNotification) GetName() string
func (ReplyNotification) GetNotification ¶
func (n ReplyNotification) GetNotification() *Notification
func (ReplyNotification) GetPostHashString ¶
func (n ReplyNotification) GetPostHashString() string
func (ReplyNotification) GetTime ¶
func (n ReplyNotification) GetTime() time.Time
Click to show internal directories.
Click to hide internal directories.