handler

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: 0BSD Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TimeAgo

func TimeAgo(t time.Time) string

Types

type HttpHandler

type HttpHandler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(store store.Store, maxSize int64, tmplPattern string) *HttpHandler

func (*HttpHandler) HandleGet

func (h *HttpHandler) HandleGet(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) HandleHome

func (h *HttpHandler) HandleHome(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) HandleRaw

func (h *HttpHandler) HandleRaw(w http.ResponseWriter, r *http.Request)

func (*HttpHandler) HandleSet

func (h *HttpHandler) HandleSet(w http.ResponseWriter, r *http.Request)

type ViewData

type ViewData struct {
	Title      string
	Content    string
	ID         string
	IsPreview  bool
	TimeAgo    string
	LineCount  int
	GutterSize int
	Error      string
}

Jump to

Keyboard shortcuts

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