messaging

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaximumTokensPerBatch = 500
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SkipFirebaseInit bool
	Firebase         FirebaseConf
}

type FirebaseAccountKey

type FirebaseAccountKey struct {
	Type                    string `json:"type"`
	ProjectID               string `json:"project_id"`
	PrivateKeyID            string `json:"private_key_id"`
	PrivateKey              string `json:"private_key"`
	ClientEmail             string `json:"client_email"`
	ClientID                string `json:"client_id"`
	AuthURI                 string `json:"auth_uri"`
	TokenURI                string `json:"token_uri"`
	AuthProviderx509CertURL string `json:"auth_provider_x509_cert_url"`
	Clientx509CertURL       string `json:"client_x509_cert_url"`
}

type FirebaseConf

type FirebaseConf struct {
	AccountKey FirebaseAccountKey
	ApiKey     string
}

type Interface

type Interface interface {
	SubstribeToTpic(ctx context.Context, deviceToken, topic string) error
	UnsubscribeFromTopic(ctx context.Context, deviceToken, topic string) error
	BroadCastToTopic(ctx context.Context, topic string, payload map[string]string) error
	BatchSendDryRun(ctx context.Context, tokens []string) ([]string, error)
}

func Init

func Init(cfg Config, log logger.Interface, json parser.JsonInterface, httpClient *http.Client) Interface

Jump to

Keyboard shortcuts

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