module

package
v0.0.0-...-88c3b2e Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UNZIP_NO     = 0
	UNZIP_NORMAL = 1
	UNZIP_FORCE  = 2
)

Variables

This section is empty.

Functions

func OnCommand

func OnCommand(command, filename string, w http.ResponseWriter, r *http.Request, s *storage.Storage) (cont bool, err error)

func OnSave

func OnSave(file *storage.File, w http.ResponseWriter, r *http.Request, s *storage.Storage) (err error)

func RegisterModules

func RegisterModules()

Types

type FileInfo

type FileInfo struct {
	Name        string `json:"name"`
	Size        int64  `json:"size"`
	ContentType string `json:"content-type,omitmepty"`
	MD5         string `json:"md5,omitempty"`
	Modified    int64  `json:"modified,omitempty"`
}

type FileList

type FileList struct {
	Err  *string    `json:"error,omitempty"`
	List []FileInfo `json:"list"`
}

type Module

type Module interface {
	OnSave(file *storage.File, w http.ResponseWriter, r *http.Request, s *storage.Storage) (err error)
	OnCommand(command, filename string, w http.ResponseWriter, r *http.Request, s *storage.Storage) (cont bool, err error)
}

Jump to

Keyboard shortcuts

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