database

package
v0.0.0-...-755121c Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 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 ChannelPlugin

type ChannelPlugin struct {
	NotificationKey string
}

func (*ChannelPlugin) Init

func (p *ChannelPlugin) Init(options *plug.Options)

func (*ChannelPlugin) RequireOptions

func (p *ChannelPlugin) RequireOptions() []string

type Config

type Config struct {
	DBName string
}

func (*Config) DBNameOrSystem

func (c *Config) DBNameOrSystem() string

type Database

type Database struct {
	Config *Config
}

func New

func New() *Database

func (*Database) GetDB

func (database *Database) GetDB(context *core.Context) *aorm.DB

func (*Database) GetNotification

func (database *Database) GetNotification(user common.User, notificationID string, _ *notification.Notification, context *core.Context) (*notification.QorNotification, error)

func (*Database) GetNotifications

func (database *Database) GetNotifications(user common.User, results *notification.NotificationsResult, _ *notification.Notification, context *core.Context) error

func (*Database) GetUnresolvedNotificationsCount

func (database *Database) GetUnresolvedNotificationsCount(user common.User, _ *notification.Notification, context *core.Context) uint

func (*Database) Send

func (database *Database) Send(message *notification.Message, context *core.Context) error

func (*Database) Setup

func (d *Database) Setup(db *aorm.DB) error

Jump to

Keyboard shortcuts

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