controller

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanDirtyPath

func CleanDirtyPath(p string) string

func CopyDir added in v1.7.0

func CopyDir(src string, dst string) error

func CopyFile added in v1.7.0

func CopyFile(src, dst string) error

func CryptFile added in v1.6.0

func CryptFile(path, pass string) (bool, error)

openssl aes-256-cbc -a -salt -in file.txt -out file.txt.cr -pass pass:123

func DecryptFile added in v1.6.0

func DecryptFile(path, pass string) (bool, error)

openssl aes-256-cbc -d -a -in file.txt.cr -out file.txt.new -pass pass:123

func GetAll

func GetAll(c *fiber.Ctx) error

func GetEditCode added in v1.9.0

func GetEditCode(c *fiber.Ctx) error

func GetEditDoc added in v1.9.0

func GetEditDoc(c *fiber.Ctx) error

func GetExtNorm added in v1.5.4

func GetExtNorm(path string) string

get ext and normalize

func GetFileName added in v1.5.4

func GetFileName(path string) string

func GetMd5File added in v1.5.5

func GetMd5File(path string) string

func GetResize added in v1.2.0

func GetResize(c *fiber.Ctx) error

func LogPrefix

func LogPrefix(c *fiber.Ctx, status string, addition string)

func MultipartToFile added in v1.4.0

func MultipartToFile(file *multipart.FileHeader) *os.File

func MutexUnLocked added in v1.6.0

func MutexUnLocked(m *sync.Mutex) bool

func OptionsAll

func OptionsAll(c *fiber.Ctx) error

func PostCopy added in v1.7.0

func PostCopy(c *fiber.Ctx) error

func PostDelete

func PostDelete(c *fiber.Ctx) error

func PostEdit added in v1.8.0

func PostEdit(c *fiber.Ctx) error

func PostFolder

func PostFolder(c *fiber.Ctx) error

func PostMove added in v1.3.0

func PostMove(c *fiber.Ctx) error

func PostRename added in v1.7.0

func PostRename(c *fiber.Ctx) error

func PostUpload

func PostUpload(c *fiber.Ctx) error

func PostZip

func PostZip(c *fiber.Ctx) error

func PrettyByteSize added in v1.5.5

func PrettyByteSize(b int64) string

func RandStringRunes

func RandStringRunes(n int) string

func WalkAndClearOld added in v1.5.6

func WalkAndClearOld(path string)

func WalkAndClearZeroFile added in v1.5.6

func WalkAndClearZeroFile(path string, deep int)

func WalkAndMakeThumbnail added in v1.5.4

func WalkAndMakeThumbnail(path string, deep int)

Types

type FileRow added in v1.2.3

type FileRow struct {
	IsDir    bool
	FullPath string
	Name     string

	Size      int64
	SizeHuman string

	ModTime      time.Time
	ModTimeHuman string
	Md5          string

	IsPreviewImg bool
	IsPreviewDoc bool
	IsEditDoc    bool
	IsEditCode   bool
	Rndm         string
}

type TreeRow added in v1.3.0

type TreeRow struct {
	Text string `json:"text"`
	Path string `json:"path"`

	Expanded bool `json:"expanded"`

	Nodes []TreeRow `json:"nodes"`
}

func WalkAndTreeBuild added in v1.3.0

func WalkAndTreeBuild(path string, prev_path string, deep int) []TreeRow

Jump to

Keyboard shortcuts

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