models

package
v0.0.54 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ErrUnexpectedNull = "unexpected null"
)

Variables

This section is empty.

Functions

func ListNotificationIds added in v0.0.50

func ListNotificationIds(notifications []Notification) (ids []cmb.Id)

Types

type AddNotificationParams

type AddNotificationParams struct {
	cmr.CommonParams
	UserId cmb.Id   `json:"userId"`
	Text   cmb.Text `json:"text"`
}

type AddNotificationResult

type AddNotificationResult struct {
	cmr.CommonResult

	// ID of the created notification.
	NotificationId cmb.Id `json:"notificationId"`
}

type AddNotificationSParams added in v0.0.41

type AddNotificationSParams struct {
	cmr.CommonParams
	cmr.DKeyParams
	UserId cmb.Id   `json:"userId"`
	Text   cmb.Text `json:"text"`
}

type AddNotificationSResult added in v0.0.41

type AddNotificationSResult struct {
	cmr.CommonResult

	// ID of the created notification.
	NotificationId cmb.Id `json:"notificationId"`
}

type CountUnreadNotificationsParams

type CountUnreadNotificationsParams struct {
	cmr.CommonParams
}

type CountUnreadNotificationsResult

type CountUnreadNotificationsResult struct {
	cmr.CommonResult
	UNC cmb.Count `json:"unc"`
}

type DeleteNotificationParams

type DeleteNotificationParams struct {
	cmr.CommonParams
	NotificationId cmb.Id `json:"notificationId"`
}

type DeleteNotificationResult

type DeleteNotificationResult = cmr.CommonResultWithSuccess

type GetDKeyParams added in v0.0.41

type GetDKeyParams struct {
	cmr.CommonParams
}

type GetDKeyResult added in v0.0.41

type GetDKeyResult struct {
	cmr.CommonResult
	DKey cmb.Text `json:"dKey"`
}

type GetNotificationParams

type GetNotificationParams struct {
	cmr.CommonParams
	NotificationId cmb.Id `json:"notificationId"`
}

type GetNotificationResult

type GetNotificationResult struct {
	cmr.CommonResult
	Notification *Notification `json:"notification"`
}

type GetNotificationsOnPageParams added in v0.0.50

type GetNotificationsOnPageParams struct {
	cmr.CommonParams
	Page cmb.Count `json:"page"`
}

type GetNotificationsOnPageResult added in v0.0.50

type GetNotificationsOnPageResult struct {
	cmr.CommonResult
	NotificationsOnPage *NotificationsOnPage `json:"nop"`
}

type GetNotificationsParams added in v0.0.54

type GetNotificationsParams struct {
	cmr.CommonParams
}

type GetNotificationsResult added in v0.0.54

type GetNotificationsResult struct {
	cmr.CommonResult
	NotificationIds *ul.UidList    `json:"notificationIds"`
	Notifications   []Notification `json:"notifications"`
}

type GetUnreadNotificationsParams

type GetUnreadNotificationsParams struct {
	cmr.CommonParams
}

type GetUnreadNotificationsResult

type GetUnreadNotificationsResult struct {
	cmr.CommonResult
	NotificationIds *ul.UidList    `json:"notificationIds"`
	Notifications   []Notification `json:"notifications"`
}

type MarkNotificationAsReadParams

type MarkNotificationAsReadParams struct {
	cmr.CommonParams

	// Identifier of a notification.
	NotificationId cmb.Id `json:"notificationId"`
}

type MarkNotificationAsReadResult

type MarkNotificationAsReadResult = cmr.CommonResultWithSuccess

type Notification

type Notification struct {
	// Identifier of this notification.
	Id cmb.Id `json:"id"`

	// Identifier of a recipient user.
	UserId cmb.Id `json:"userId"`

	// Textual information of this notification.
	Text cmb.Text `json:"text"`

	// Time of creation.
	TimeOfCreation time.Time `json:"toc"`

	// Is the notification read by the recipient ?
	IsRead cmb.Flag `json:"isRead"`

	// Time of reading.
	TimeOfReading *time.Time `json:"tor"`
}

func NewNotification

func NewNotification() (n *Notification)

func NewNotificationArrayFromRows added in v0.0.50

func NewNotificationArrayFromRows(rows *sql.Rows) (ns []Notification, err error)

func NewNotificationFromScannableSource

func NewNotificationFromScannableSource(src cm.IScannable) (n *Notification, err error)

type NotificationsOnPage added in v0.0.50

type NotificationsOnPage struct {
	// Notification parameters. If pagination is used, these lists contain
	// information after the application of pagination.
	NotificationIds *ul.UidList    `json:"notificationIds"`
	Notifications   []Notification `json:"notifications"`
	PageData        *cmr.PageData  `json:"pageData,omitempty"`
}

func NewNotificationsOnPage added in v0.0.50

func NewNotificationsOnPage() (nop *NotificationsOnPage)

type PingParams

type PingParams = cmr.PingParams

type PingResult

type PingResult = cmr.PingResult

type ShowDiagnosticDataParams

type ShowDiagnosticDataParams struct{}

type ShowDiagnosticDataResult

type ShowDiagnosticDataResult struct {
	cmr.CommonResult
	cmr.RequestsCount
}

type TestParams

type TestParams struct {
	N uint `json:"n"`
}

type TestResult

type TestResult struct {
	cmr.CommonResult
}

Jump to

Keyboard shortcuts

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