notifications

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe added in v0.5.0

func Describe(i interface{}) (string, string)

Describe prints a notification

func NewID added in v0.9.2

func NewID() string

NewID generates a new unique ID.

func Serialize

func Serialize(i interface{}) []byte

Serialize serializes a notification.

Types

type ChatMessage added in v0.3.1

type ChatMessage struct {
	MessageID string    `json:"messageId"`
	PeerID    string    `json:"peerId"`
	Subject   string    `json:"subject"`
	Message   string    `json:"message"`
	Timestamp time.Time `json:"timestamp"`
}

ChatMessage is sent when you receive a chat message.

type ChatRead added in v0.5.0

type ChatRead struct {
	MessageID string `json:"messageId"`
	PeerID    string `json:"peerId"`
	Subject   string `json:"subject"`
}

ChatRead is sent when someone reads a chat message.

type ChatTyping added in v0.5.0

type ChatTyping struct {
	PeerID  string `json:"peerId"`
	Subject string `json:"subject"`
}

ChatTyping is sent when someone in a chat starts typing

type CompletionNotification added in v0.2.2

type CompletionNotification struct {
	ID          string    `json:"notificationId"`
	Type        string    `json:"type"`
	OrderID     string    `json:"orderId"`
	Thumbnail   Thumbnail `json:"thumbnail"`
	BuyerHandle string    `json:"buyerHandle"`
	BuyerID     string    `json:"buyerId"`
}

CompletionNotification is sent when an order is completed.

type Data added in v0.3.1

type Data interface {
}

Data is the actual data used for a notification.

type DisputeAcceptedNotification added in v0.7.0

type DisputeAcceptedNotification struct {
	ID               string    `json:"notificationId"`
	Type             string    `json:"type"`
	OrderID          string    `json:"orderId"`
	Thumbnail        Thumbnail `json:"thumbnail"`
	OtherPartyID     string    `json:"otherPartyId"`
	OtherPartyHandle string    `json:"otherPartyHandle"`
	Buyer            string    `json:"buyer"`
}

DisputeAcceptedNotification is sent when a dispute is accepted.

type DisputeCloseNotification added in v0.3.0

type DisputeCloseNotification struct {
	ID               string    `json:"notificationId"`
	Type             string    `json:"type"`
	OrderID          string    `json:"orderId"`
	Thumbnail        Thumbnail `json:"thumbnail"`
	OtherPartyID     string    `json:"otherPartyId"`
	OtherPartyHandle string    `json:"otherPartyHandle"`
	Buyer            string    `json:"buyer"`
}

DisputeCloseNotification is sent when a dispute is closed.

type DisputeOpenNotification added in v0.3.0

type DisputeOpenNotification struct {
	ID             string    `json:"notificationId"`
	Type           string    `json:"type"`
	OrderID        string    `json:"orderId"`
	Thumbnail      Thumbnail `json:"thumbnail"`
	DisputerID     string    `json:"disputerId"`
	DisputerHandle string    `json:"disputerHandle"`
	DisputeeID     string    `json:"disputeeId"`
	DisputeeHandle string    `json:"disputeeHandle"`
	Buyer          string    `json:"buyer"`
}

DisputeOpenNotification is sent when an order is disputed.

type DisputeUpdateNotification added in v0.3.0

type DisputeUpdateNotification struct {
	ID             string    `json:"notificationId"`
	Type           string    `json:"type"`
	OrderID        string    `json:"orderId"`
	Thumbnail      Thumbnail `json:"thumbnail"`
	DisputerID     string    `json:"disputerId"`
	DisputerHandle string    `json:"disputerHandle"`
	DisputeeID     string    `json:"disputeeId"`
	DisputeeHandle string    `json:"disputeeHandle"`
	Buyer          string    `json:"buyer"`
}

DisputeUpdateNotification is sent when a dispute is updated.

type FollowNotification

type FollowNotification struct {
	ID     string `json:"notificationId"`
	Type   string `json:"type"`
	PeerID string `json:"peerId"`
}

FollowNotification is sent when a user follows you.

type FulfillmentNotification added in v0.2.2

type FulfillmentNotification struct {
	ID           string    `json:"notificationId"`
	Type         string    `json:"type"`
	OrderID      string    `json:"orderId"`
	Thumbnail    Thumbnail `json:"thumbnail"`
	VendorHandle string    `json:"vendorHandle"`
	VendorID     string    `json:"vendorId"`
}

FulfillmentNotification is sent when an order is fulfilled

type IncomingTransaction added in v0.5.3

type IncomingTransaction struct {
	Txid          string    `json:"txid"`
	Value         int64     `json:"value"`
	Address       string    `json:"address"`
	Status        string    `json:"status"`
	Memo          string    `json:"memo"`
	Timestamp     time.Time `json:"timestamp"`
	Confirmations int32     `json:"confirmations"`
	OrderID       string    `json:"orderId"`
	Thumbnail     string    `json:"thumbnail"`
	Height        int32     `json:"height"`
	CanBumpFee    bool      `json:"canBumpFee"`
}

IncomingTransaction is sent when you receive a new transaction

type ModeratorAddNotification added in v0.5.1

type ModeratorAddNotification struct {
	ID     string `json:"notificationId"`
	Type   string `json:"type"`
	PeerID string `json:"peerId"`
}

ModeratorAddNotification is sent when a moderator is added.

type ModeratorRemoveNotification added in v0.5.1

type ModeratorRemoveNotification struct {
	ID     string `json:"notificationId"`
	Type   string `json:"type"`
	PeerID string `json:"peerId"`
}

ModeratorRemoveNotification is sent when a moderator is removed.

type Notification added in v0.3.1

type Notification struct {
	Data      Data      `json:"notification"`
	Timestamp time.Time `json:"timestamp"`
	Read      bool      `json:"read"`
}

Notification is a single notification to send a user.

type OrderCancelNotification added in v0.2.1

type OrderCancelNotification struct {
	ID          string    `json:"notificationId"`
	Type        string    `json:"type"`
	OrderID     string    `json:"orderId"`
	Thumbnail   Thumbnail `json:"thumbnail"`
	BuyerHandle string    `json:"buyerHandle"`
	BuyerID     string    `json:"buyerId"`
}

OrderCancelNotification is sent when a user cancels their order.

type OrderConfirmationNotification added in v0.2.1

type OrderConfirmationNotification struct {
	ID           string    `json:"notificationId"`
	Type         string    `json:"type"`
	OrderID      string    `json:"orderId"`
	Thumbnail    Thumbnail `json:"thumbnail"`
	VendorHandle string    `json:"vendorHandle"`
	VendorID     string    `json:"vendorId"`
}

OrderConfirmationNotification is sent when an order is confirmed.

type OrderDeclinedNotification added in v0.6.4

type OrderDeclinedNotification struct {
	ID           string    `json:"notificationId"`
	Type         string    `json:"type"`
	OrderID      string    `json:"orderId"`
	Thumbnail    Thumbnail `json:"thumbnail"`
	VendorHandle string    `json:"vendorHandle"`
	VendorID     string    `json:"vendorId"`
}

OrderDeclinedNotification is sent when an order is declined.

type OrderNotification

type OrderNotification struct {
	ID          string    `json:"notificationId"`
	Type        string    `json:"type"`
	Title       string    `json:"title"`
	BuyerID     string    `json:"buyerId"`
	BuyerHandle string    `json:"buyerHandle"`
	Thumbnail   Thumbnail `json:"thumbnail"`
	OrderID     string    `json:"orderId"`
	Slug        string    `json:"slug"`
}

OrderNotification is sent when a user orders an item.

type PaymentNotification

type PaymentNotification struct {
	ID           string `json:"notificationId"`
	Type         string `json:"type"`
	OrderID      string `json:"orderId"`
	FundingTotal uint64 `json:"fundingTotal"`
}

PaymentNotification is sent when a user pays for an item.

type RefundNotification added in v0.2.1

type RefundNotification struct {
	ID           string    `json:"notificationId"`
	Type         string    `json:"type"`
	OrderID      string    `json:"orderId"`
	Thumbnail    Thumbnail `json:"thumbnail"`
	VendorHandle string    `json:"vendorHandle"`
	VendorID     string    `json:"vendorId"`
}

RefundNotification is sent when an order is refunded.

type StatusNotification added in v0.5.0

type StatusNotification struct {
	Status string `json:"status"`
}

StatusNotification is sent when the status changes.

type TestNotification added in v0.9.2

type TestNotification struct{}

TestNotification does nothing.

type Thumbnail added in v0.6.4

type Thumbnail struct {
	Tiny  string `json:"tiny"`
	Small string `json:"small"`
}

Thumbnail is URLs to a thumbnail for some notifications

type UnfollowNotification

type UnfollowNotification struct {
	ID     string `json:"notificationId"`
	Type   string `json:"type"`
	PeerID string `json:"peerId"`
}

UnfollowNotification is sent when a user unfollows you.

Jump to

Keyboard shortcuts

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