notification

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: MIT Imports: 10 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(userId string, platform int, 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(ctx context.Context, notificationTopicId, roomId 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 int
}

type NotUseProvider added in v0.2.0

type NotUseProvider struct {
}

func (NotUseProvider) CreateEndpoint added in v0.2.0

func (provider NotUseProvider) CreateEndpoint(userId string, platform int, deviceToken string) NotificationChannel

func (NotUseProvider) CreateTopic added in v0.2.0

func (provider NotUseProvider) CreateTopic(roomId string) NotificationChannel

func (NotUseProvider) DeleteEndpoint added in v0.2.0

func (provider NotUseProvider) DeleteEndpoint(notificationDeviceId string) NotificationChannel

func (NotUseProvider) DeleteTopic added in v0.2.0

func (provider NotUseProvider) DeleteTopic(notificationTopicId string) NotificationChannel

func (NotUseProvider) Publish added in v0.2.0

func (provider NotUseProvider) Publish(ctx context.Context, notificationTopicId, roomId string, messageInfo *MessageInfo) NotificationChannel

func (NotUseProvider) Subscribe added in v0.2.0

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

func (NotUseProvider) Unsubscribe added in v0.2.0

func (provider NotUseProvider) Unsubscribe(notificationSubscribeId string) NotificationChannel

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, int, string) NotificationChannel
	DeleteEndpoint(string) NotificationChannel
	Subscribe(string, string) NotificationChannel
	Unsubscribe(string) NotificationChannel
	Publish(context.Context, string, 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