handlers

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDirFiles

func ListDirFiles(baseDir string) gin.HandlerFunc

ListDirFiles provides a gin.HandlerFunc that describes the directories/files in a directory.

func ZipDir added in v0.2.0

func ZipDir(baseDir string) gin.HandlerFunc

ZipDir provides a gin.HandlerFunc that will zip the contents of the directory.

Types

type DirFiles

type DirFiles struct {
	Dir            []string         `json:"dir"`
	FileDescriptor []FileDescriptor `json:"file_descriptor,omitempty"`
}

DirFiles is used to list the directories/files in a directory.

type FileDescriptor

type FileDescriptor struct {
	IsDir   bool      `json:"is_dir"`
	ModTime time.Time `json:"mod_time,omitempty"`
	Mode    string    `json:"mode,omitempty"`
	Name    string    `json:"name,omitempty"`
	Size    int64     `json:"size,omitempty"`
}

FileDescriptor provides the directory/file description.

type URIDir added in v0.2.0

type URIDir struct {
	Dir string `uri:"dir"`
}

URIDir binds the directory from the URI.

Jump to

Keyboard shortcuts

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