fs

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanHistory

func CleanHistory(days uint) error

func FileError

func FileError(w http.ResponseWriter, code int)

Types

type FS

type FS struct {
	RootDir        string
	UrlRoot        string
	MountFunc      MountFunc
	DisabledAlert  bool
	DisabledRecord bool
	DisabledWrite  bool
	// contains filtered or unexported fields
}

func (*FS) ServeHTTP

func (f *FS) ServeHTTP(w http.ResponseWriter, r *http.Request)

type MountFunc

type MountFunc = func(w http.ResponseWriter, r *http.Request) (urlPrefix string, mountPoint string, ownerID string, actorID string, err error)

MountFunc urlPrefix urlRoot+urlPrefix 为serverHttp 匹配的url前缀 mountPoint fs.RootDir+mountPoint 为文件存储路径

Jump to

Keyboard shortcuts

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