notification

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsSnsProvider

type AwsSnsProvider struct {
	// contains filtered or unexported fields
}

func (AwsSnsProvider) CreateEndpoint

func (provider AwsSnsProvider) CreateEndpoint(deviceToken string) NotificationChannel

func (AwsSnsProvider) CreateTopic

func (provider AwsSnsProvider) CreateTopic(roomId string) NotificationChannel

func (AwsSnsProvider) DeleteEndpoint

func (provider AwsSnsProvider) DeleteEndpoint(notificationDeviceId string) NotificationChannel

func (AwsSnsProvider) DeleteTopic

func (provider AwsSnsProvider) DeleteTopic(notificationTopicId string) NotificationChannel

func (AwsSnsProvider) Init

func (provider AwsSnsProvider) Init() error

func (AwsSnsProvider) Publish

func (provider AwsSnsProvider) Publish(notificationTopicId string, messageInfo *MessageInfo) NotificationChannel

func (AwsSnsProvider) Subscribe

func (provider AwsSnsProvider) Subscribe(notificationTopicId string, notificationDeviceId string) NotificationChannel

func (AwsSnsProvider) Unsubscribe

func (provider AwsSnsProvider) Unsubscribe(notificationSubscribeId string) NotificationChannel

type MessageInfo

type MessageInfo struct {
	Text  string
	Badge int64
}

type NotificationChannel

type NotificationChannel chan NotificationResult

type NotificationResult

type NotificationResult struct {
	Data          interface{}
	ProblemDetail *models.ProblemDetail
}

type Provider

type Provider interface {
	CreateTopic(string) NotificationChannel
	DeleteTopic(string) NotificationChannel
	CreateEndpoint(string) NotificationChannel
	DeleteEndpoint(string) NotificationChannel
	Subscribe(string, string) NotificationChannel
	Unsubscribe(string) NotificationChannel
	Publish(string, *MessageInfo) NotificationChannel
}

func GetProvider

func GetProvider() Provider

type PushNotification

type PushNotification struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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