gateway

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderDirectory

func RenderDirectory(w http.ResponseWriter, data DirectoryTemplateData) error

func RenderHome

func RenderHome(w http.ResponseWriter) error

func ServeStatic

func ServeStatic(w http.ResponseWriter, r *http.Request)

Types

type BaseTemplateData

type BaseTemplateData struct {
	Title string
}

type DirectoryItem

type DirectoryItem struct {
	Name string
	Path string
}

type DirectoryTemplateData

type DirectoryTemplateData struct {
	BaseTemplateData
	ManifestID  string
	DisplayID   string
	SubPath     string
	ParentPath  string
	Directories []DirectoryItem
	Files       []FileItem
	HasParent   bool
	TotalFiles  int
	Pagination  *Pagination
}

type FileItem

type FileItem struct {
	Name         string
	Path         string
	Size         string
	MimeType     string
	ManifestID   string
	ManifestLink string
}

type HomeTemplateData

type HomeTemplateData struct {
	BaseTemplateData
}

type Pagination added in v0.3.2

type Pagination struct {
	BaseURL     string
	CurrentPage int
	TotalPages  int
	HasPrev     bool
	HasNext     bool
	PrevPage    int
	NextPage    int
}

Jump to

Keyboard shortcuts

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