notification

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel string
const (
	ChannelUndefined Channel = ""
	ChannelWeb       Channel = "web"
	ChannelEmail     Channel = "email"
)

type Notification

type Notification struct {
	ID               string           `db:"id"`
	CodebaseID       string           `db:"codebase_id"`
	UserID           string           `db:"user_id"`
	NotificationType NotificationType `db:"type"`
	ReferenceID      string           `db:"reference_id"`
	CreatedAt        time.Time        `db:"created_at"`
	ArchivedAt       *time.Time       `db:"archived_at"`
}

type NotificationType

type NotificationType string
const (
	NotificationTypeUndefined       NotificationType = ""
	CommentNotificationType         NotificationType = "comment"
	ReviewNotificationType          NotificationType = "review"
	RequestedReviewNotificationType NotificationType = "requested_review"
	NewSuggestionNotificationType   NotificationType = "new_suggesion"
	GitHubRepositoryImported        NotificationType = "github_repository_imported"
)

type Preference

type Preference struct {
	UserID  string           `db:"user_id"`
	Type    NotificationType `db:"type"`
	Channel Channel          `db:"channel"`
	Enabled bool             `db:"enabled"`
}

Preference is used to determine if user with _UserID_ wants to receive notifications of type _Type_ via _Channel_.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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