Documentation ¶
Overview ¶
Package component contains individual components that can render themselves as HTML.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GopherBotNotification ¶
func GopherBotNotification(n notification.Notification) bool
GopherBotNotification reports whether notification n is known to be authored by GopherBot.
func RenderNotification ¶
func RenderNotification(n notification.Notification) (htmlg.Component, bool)
RenderNotification renders notification n into an HTML component.
Types ¶
type Notification ¶
type Notification struct {
notifications.Notification
}
Notification component for display purposes.
func (Notification) Render ¶
func (n Notification) Render() []*html.Node
type NotificationsByRepo ¶
type NotificationsByRepo struct {
Notifications []notification.Notification
}
NotificationsByRepo component displays notifications grouped by repos.
func (NotificationsByRepo) Render ¶
func (a NotificationsByRepo) Render() []*html.Node
type RGB ¶
type RGB struct {
R, G, B uint8
}
TODO: Dedup.
RGB represents a 24-bit color without alpha channel.
type RepoNotifications ¶
type RepoNotifications struct { Repo notifications.RepoSpec Notifications []Notification // contains filtered or unexported fields }
RepoNotifications component is a collection of notifications for the same repo.
func (RepoNotifications) Render ¶
func (r RepoNotifications) Render() []*html.Node
type Stream ¶
type Stream struct { Notifications []notification.Notification Error string GopherBot bool // Controls whether to show all bot comments. }
Stream component for display purposes.
Click to show internal directories.
Click to hide internal directories.