types

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotificationIndexes = []repos.IndexField{
	{
		Field: []repos.IndexKey{
			{Key: "id", Value: repos.IndexAsc},
		},
		Unique: true,
	},
}

Functions

This section is empty.

Types

type Notification

type Notification struct {
	repos.BaseEntity `json:",inline" graphql:"noinput"`
	Type             NotificationType `json:"notificationType" graphql:"noinput"`

	Content     NotifyContent `json:"content" graphql:"noinput"`
	Priority    int           `json:"priority" graphql:"noinput"`
	AccountName string        `json:"accountName" graphql:"noinput"`
	Read        bool          `json:"read" graphql:"noinput"`
}

func (*Notification) ParseBytes

func (obj *Notification) ParseBytes(data []byte) error

func (*Notification) ToBytes

func (obj *Notification) ToBytes() ([]byte, error)

func (*Notification) ToPlain

func (obj *Notification) ToPlain() string

type NotificationType

type NotificationType string
const (
	NotifyTypeAlert  NotificationType = "alert"
	NotifyTypeNotify NotificationType = "notification"
)

type NotifyContent

type NotifyContent struct {
	Title   string `json:"title" graphql:"noinput"`
	Subject string `json:"subject" graphql:"noinput"`
	Body    string `json:"body" graphql:"noinput"`
	Link    string `json:"link" graphql:"noinput"`
	Image   string `json:"image" graphql:"noinput"`
}

Jump to

Keyboard shortcuts

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