provider

package
v0.0.0-...-66e4c3a Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2023 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 FCM

type FCM struct {
	Config FCMConfig
	// contains filtered or unexported fields
}

func NewFCM

func NewFCM(config FCMConfig, opts ...option.ClientOption) (*FCM, error)

func (*FCM) GetProviderType

func (p *FCM) GetProviderType() push.ProviderType

func (*FCM) Send

func (p *FCM) Send(token string, title string, message string) push.ProviderSendResponse

func (*FCM) SendMulticast

func (p *FCM) SendMulticast(tokens []string, title, message string) []push.ProviderSendResponse

type FCMConfig

type FCMConfig struct {
	GoogleApplicationCredentials string `json:"-"` // sensitive
	ProjectID                    string
	ValidateOnly                 bool
}

type Mock

type Mock struct {
	Type push.ProviderType
}

func NewMock

func NewMock(providerType push.ProviderType) *Mock

func (*Mock) GetProviderType

func (p *Mock) GetProviderType() push.ProviderType

func (*Mock) Send

func (p *Mock) Send(token string, title string, message string) push.ProviderSendResponse

func (*Mock) SendMulticast

func (p *Mock) SendMulticast(tokens []string, title, message string) []push.ProviderSendResponse

Jump to

Keyboard shortcuts

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