notificationsapp: github.com/shurcooL/notificationsapp/component Index | Files

package component

import "github.com/shurcooL/notificationsapp/component"

Package component contains individual components that can render themselves as HTML.

Index

Package Files

component.go

type Notification Uses

type Notification struct {
    notifications.Notification
}

Notification component for display purposes.

func (Notification) Render Uses

func (n Notification) Render() []*html.Node

type NotificationsByRepo Uses

type NotificationsByRepo struct {
    Notifications notifications.Notifications
}

NotificationsByRepo component displays notifications grouped by repos.

func (NotificationsByRepo) Render Uses

func (a NotificationsByRepo) Render() []*html.Node

type RepoNotifications Uses

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 Uses

func (r RepoNotifications) Render() []*html.Node

type Time Uses

type Time struct {
    Time time.Time
}

Time component that displays human friendly relative time (e.g., "2 hours ago", "yesterday"), but also contains a tooltip with the full absolute time (e.g., "Jan 2, 2006, 3:04 PM MST").

func (Time) Render Uses

func (t Time) Render() []*html.Node

Package component imports 11 packages (graph) and is imported by 3 packages. Updated 2018-06-02. Refresh now. Tools for package owners.