adapters

package
v0.0.0-...-a3d3c85 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFirebaseMessagingConnection

func NewFirebaseMessagingConnection(ctx context.Context) (*messaging.Client, error)

func NewSQLiteConnection

func NewSQLiteConnection(path string) (*sqlx.DB, error)

Types

type Messaging

type Messaging struct {
	MessagingClient *messaging.Client
}

func (*Messaging) SendNotification

func (m *Messaging) SendNotification(ctx context.Context, token []string, title string, message string) error

type SQLiteTokenRepository

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

func NewSQLiteTokenRepository

func NewSQLiteTokenRepository(db *sqlx.DB) *SQLiteTokenRepository

func (SQLiteTokenRepository) DeleteToken

func (s SQLiteTokenRepository) DeleteToken(token string) error

func (SQLiteTokenRepository) GetAllToken

func (s SQLiteTokenRepository) GetAllToken() (subscriber []string, err error)

func (SQLiteTokenRepository) GetStatisticToken

func (s SQLiteTokenRepository) GetStatisticToken() (*notification.Stats, error)

func (SQLiteTokenRepository) GetToken

func (s SQLiteTokenRepository) GetToken(value string) (*notification.Token, bool, error)

func (SQLiteTokenRepository) InsertedToken

func (s SQLiteTokenRepository) InsertedToken(tokenID string, updatedAt int64) (*notification.Token, error)

func (SQLiteTokenRepository) UpdatedToken

func (s SQLiteTokenRepository) UpdatedToken(tokenID string, updatedAt int64) (*notification.Token, error)

Jump to

Keyboard shortcuts

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