issuesapp

package
v0.0.0-...-c858694 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package issuesapp is an issue tracking web app.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(is issues.Service, us users.Service, redirect func(*url.URL), opt Options) *app

Types

type Options

type Options struct {
	// Notification, if not nil, is used to highlight issues containing
	// unread notifications, and to mark issues that are viewed as read.
	Notification notification.Service

	// BodyTop provides components to include at the top of the <body> element. It can be nil.
	BodyTop func(context.Context, State) ([]htmlg.Component, error)
}

Options for configuring issues app.

type State

type State struct {
	ReqURL      *url.URL
	CurrentUser users.User
	RepoSpec    issues.RepoSpec
	BaseURL     string // Must have no trailing slash. Can be empty string.

	IssueID uint64 // IssueID is the current issue ID, or 0 if not applicable (e.g., current page is /new).
}

func (State) RequestURL

func (s State) RequestURL() *url.URL

Directories

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

Jump to

Keyboard shortcuts

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