component

package
v0.0.0-...-1301412 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 11 Imported by: 2

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

This section is empty.

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 notifications.Notifications
}

NotificationsByRepo component displays notifications grouped by repos.

func (NotificationsByRepo) Render

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

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 Time

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

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

Jump to

Keyboard shortcuts

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