aldanin

package module
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2024 License: ISC Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	// Used when a required template isn't found, or when a panic is caught
	Printf func(format string, a ...any) (n int, err error)
	// Zero-value sets the HTTP Cache-Control Header value to "no-cache, must-revalidate"
	CacheHeaderMaxAge int
	/* Structure expected inside Files:
	www/
		(should have any non-template file needed, like css, js, favicon.ico, etc.)
		templates/
			index.html
			blob.html
			commitLine.html
			directRepo.html
			header.html
			repos.html
			refLine.html
			treeLine.html
	*/
	Files embed.FS
	Repos []struct {
		Name        string
		Description string
		Meta        string // Can be any value. Available to templates for customization
	}
	Root       string // Something like `/repos`
	BrowseRoot string // Something like `/browse`
}

func (Base) ServeHTTP

func (c Base) ServeHTTP(w http.ResponseWriter, r *http.Request)

Directories

Path Synopsis
sample module

Jump to

Keyboard shortcuts

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