models

package
v0.0.41 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddNotificationParams

type AddNotificationParams struct {
	cmr.CommonParams

	UserId uint   `json:"userId"`
	Text   string `json:"text"`
}

type AddNotificationResult

type AddNotificationResult struct {
	cmr.CommonResult

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

type AddNotificationSParams added in v0.0.41

type AddNotificationSParams struct {
	cmr.CommonParams
	cmr.DKeyParams

	UserId uint   `json:"userId"`
	Text   string `json:"text"`
}

type AddNotificationSResult added in v0.0.41

type AddNotificationSResult struct {
	cmr.CommonResult

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

type CountUnreadNotificationsParams

type CountUnreadNotificationsParams struct {
	cmr.CommonParams
}

type CountUnreadNotificationsResult

type CountUnreadNotificationsResult struct {
	cmr.CommonResult

	UNC int `json:"unc"`
}

type DeleteNotificationParams

type DeleteNotificationParams struct {
	cmr.CommonParams

	NotificationId uint `json:"notificationId"`
}

type DeleteNotificationResult

type DeleteNotificationResult struct {
	cmr.CommonResult

	OK bool `json:"ok"`
}

type GetAllNotificationsParams

type GetAllNotificationsParams struct {
	cmr.CommonParams
}

type GetAllNotificationsResult

type GetAllNotificationsResult struct {
	cmr.CommonResult

	Notifications []Notification `json:"notifications"`
}

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 string `json:"dKey"`
}

type GetNotificationParams

type GetNotificationParams struct {
	cmr.CommonParams

	NotificationId uint `json:"notificationId"`
}

type GetNotificationResult

type GetNotificationResult struct {
	cmr.CommonResult

	Notification *Notification `json:"notification"`
}

type GetUnreadNotificationsParams

type GetUnreadNotificationsParams struct {
	cmr.CommonParams
}

type GetUnreadNotificationsResult

type GetUnreadNotificationsResult struct {
	cmr.CommonResult

	Notifications []Notification `json:"notifications"`
}

type MarkNotificationAsReadParams

type MarkNotificationAsReadParams struct {
	cmr.CommonParams

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

type MarkNotificationAsReadResult

type MarkNotificationAsReadResult struct {
	cmr.CommonResult

	OK bool `json:"ok"`
}

type Notification

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

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

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

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

	// Is the notification read by the recipient ?
	IsRead bool `json:"isRead"`

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

func NewNotification

func NewNotification() (n *Notification)

func NewNotificationFromScannableSource

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

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