mongo

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateCollections = []func(db *Mongo) error{}

Functions

This section is empty.

Types

type Mongo

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

func New

func New(conf configuration.Config) (*Mongo, error)

func (*Mongo) DeleteFcmToken

func (this *Mongo) DeleteFcmToken(token model.FcmToken) (err error, errCode int)

func (*Mongo) Disconnect

func (this *Mongo) Disconnect()

func (*Mongo) GetFcmTokens

func (this *Mongo) GetFcmTokens(userId string) (tokens []model.FcmToken, err error)

func (*Mongo) HandlerBrokerMongoVaultConsistency

func (this *Mongo) HandlerBrokerMongoVaultConsistency(cleanupVaultKeys bool) (err error)

func (*Mongo) ListBrokers

func (this *Mongo) ListBrokers(userId string, o persistence.ListOptions) (result []model.Broker, total int64, err error, errCode int)

func (*Mongo) ListEnabledBrokers

func (this *Mongo) ListEnabledBrokers(userId string) (result []model.Broker, err error)

func (*Mongo) ListNotifications

func (this *Mongo) ListNotifications(userId string, o persistence.ListOptions, topics []model.Topic) (result []model.Notification, total int64, err error, errCode int)

func (*Mongo) MigrateSecretsToVault

func (this *Mongo) MigrateSecretsToVault() (err error)

func (*Mongo) ReadBroker

func (this *Mongo) ReadBroker(userId string, id string) (result model.Broker, err error, errCode int)

func (*Mongo) ReadNotification

func (this *Mongo) ReadNotification(userId string, id string) (result model.Notification, err error, errCode int)

func (*Mongo) ReadNotificationByHash

func (this *Mongo) ReadNotificationByHash(userId string, hash [32]byte, notOlderThan time.Time) (result model.Notification, err error, errCode int)

func (*Mongo) ReadPlatformBroker

func (this *Mongo) ReadPlatformBroker(userId string) (result model.PlatformBroker, err error, errCode int)

func (*Mongo) ReadSettings added in v0.0.4

func (this *Mongo) ReadSettings(userId string) (result model.Settings, err error, errCode int)

func (*Mongo) RemoveBrokers

func (this *Mongo) RemoveBrokers(userId string, ids []string) (error, int)

func (*Mongo) RemoveNotifications

func (this *Mongo) RemoveNotifications(userId string, ids []string) (error, int)

func (*Mongo) RemovePlatformBroker

func (this *Mongo) RemovePlatformBroker(userId string) (error, int)

func (*Mongo) SetBroker

func (this *Mongo) SetBroker(broker model.Broker) (error, int)

func (*Mongo) SetNotification

func (this *Mongo) SetNotification(notification model.Notification) (error, int)

func (*Mongo) SetPlatformBroker

func (this *Mongo) SetPlatformBroker(broker model.PlatformBroker) (error, int)

func (*Mongo) SetSettings added in v0.0.4

func (this *Mongo) SetSettings(settings model.Settings) (error, int)

func (*Mongo) UpsertFcmToken

func (this *Mongo) UpsertFcmToken(token model.FcmToken) (err error, errCode int)

Jump to

Keyboard shortcuts

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