model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const WsAuthOkType = "authentication confirmed"
View Source
const WsAuthRequestType = "please reauthenticate"
View Source
const WsAuthType = "authentication"
View Source
const WsListType = "notification list"
View Source
const WsRefreshType = "refresh"
View Source
const WsUpdateDeleteManyType = "delete notifications"
View Source
const WsUpdateDeleteType = "delete notification"
View Source
const WsUpdateSetType = "put notification"

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	Id        string    `json:"id"`
	Address   string    `json:"address"`
	User      string    `json:"user"`
	Password  string    `json:"password"`
	Topic     string    `json:"topic"`
	Qos       uint8     `json:"qos"`
	Enabled   bool      `json:"enabled"`
	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
	UserId    string    `json:"-" bson:"user_id"`
}

func (*Broker) Equal

func (b *Broker) Equal(other interface{}) bool

type BrokerList

type BrokerList struct {
	Total   int64    `json:"total"`
	Limit   int      `json:"limit"`
	Offset  int      `json:"offset"`
	Brokers []Broker `json:"brokers"`
}

func (*BrokerList) Equal

func (l *BrokerList) Equal(other interface{}) bool

type EventMessage

type EventMessage struct {
	Type    string      `json:"type"`
	Payload interface{} `json:"payload,omitempty"`
}

type FcmToken

type FcmToken struct {
	Token     string    `json:"token"`
	UserId    string    `json:"user_id"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Notification

type Notification struct {
	Id        string    `json:"_id" bson:"_id"`
	UserId    string    `json:"userId" bson:"userId"`
	Title     string    `json:"title" bson:"title"`
	Message   string    `json:"message" bson:"message"`
	IsRead    bool      `json:"isRead" bson:"isRead"`
	CreatedAt time.Time `json:"created_at" bson:"created_at"`
	// contains filtered or unexported fields
}

func (*Notification) Equal

func (n *Notification) Equal(other interface{}) bool

func (*Notification) Hash

func (n *Notification) Hash() [32]byte

func (*Notification) ToDB

func (n *Notification) ToDB() (db NotificationDB, err error)

type NotificationDB

type NotificationDB struct {
	Id        primitive.ObjectID `bson:"_id"`
	UserId    string             `bson:"userId"`
	Title     string             `bson:"title"`
	Message   string             `bson:"message"`
	IsRead    bool               `bson:"isRead"`
	CreatedAt time.Time          `bson:"created_at"`
	Hash      [32]byte           `bson:"hash"`
}

type NotificationList

type NotificationList struct {
	Total         int64          `json:"total"`
	Limit         int            `json:"limit"`
	Offset        int            `json:"offset"`
	Notifications []Notification `json:"notifications"`
}

func (*NotificationList) Equal

func (n *NotificationList) Equal(other interface{}) bool

type PlatformBroker

type PlatformBroker struct {
	Enabled bool   `json:"enabled"`
	UserId  string `json:"-" bson:"user_id"`
}

Jump to

Keyboard shortcuts

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