dirHeader

package
v0.0.0-...-ceac6e4 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirHtml

func DirHtml(header *DirHeader, rows []Row) ([]byte, error)

func DirList

func DirList(w http.ResponseWriter, fullPath, uPath string) (int, string)

func RenderMap

func RenderMap(templateStr string, data map[string]interface{}) ([]byte, error)

Types

type Data

type Data struct {
	Header DirHeader
	Rows   []Row
}

func ReadDirectory

func ReadDirectory(fullPath, uPath string) (*Data, error)

type DirHeader

type DirHeader struct {
	TextDirection string `json:"textdirection"`
	Language      string `json:"language"`

	Header        string `json:"header"`
	ParentDirText string `json:"parentDirText"`

	HeaderName         string `json:"headerName"`
	HeaderSize         string `json:"headerSize"`
	HeaderDateModified string `json:"headerDateModified"`
}

type Row

type Row struct {
	Name               string `json:"name"`
	Url                string `json:"url"`
	IsDir              bool   `json:"isdir"`
	Size               int64  `json:"size"`
	SizeString         string `json:"size_string"`
	DateModified       int64  `json:"date_modified"`
	DateModifiedString string `json:"date_modified_string"`
}

Jump to

Keyboard shortcuts

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