dav

package
v0.0.0-...-f1f8139 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2020 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ANNEXPEEKSIZE = 1024

Variables

View Source
var (
	RE_GETRNAME = regexp.MustCompile(`.+\/(.+)\/_dav`)
	RE_GETROWN  = regexp.MustCompile(`\/(.+)\/.+\/_dav`)
	RE_GETFPATH = regexp.MustCompile("/_dav/(.+)")
)

Functions

func Dav

func Dav(c *gctx.Context, handler *webdav.Handler)

func DavMiddle

func DavMiddle() macaron.Handler

DavMiddle initialises and returns a WebDav middleware handler (macaron.Handler) [0]: issues, [1]: wiki

func Logger

func Logger(req *http.Request, err error)

func Webdav401

func Webdav401(c *gctx.Context)

Types

type GinFS

type GinFS struct {
	BasePath string
}

GinFS implements webdav (it implements webdav.Habdler) read only access to a repository

func (*GinFS) Mkdir

func (fs *GinFS) Mkdir(ctx context.Context, name string, perm os.FileMode) error

Mkdir not implemented: Just return an error. -> Read Only

func (*GinFS) OpenFile

func (fs *GinFS) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)

OpenFile returns a named file from the repository

func (*GinFS) RemoveAll

func (fs *GinFS) RemoveAll(ctx context.Context, name string) error

RemoveAll not implemented: Just return an error. -> Read Only

func (*GinFS) Rename

func (fs *GinFS) Rename(ctx context.Context, oldName, newName string) error

Rename not implemented: Just return an error. -> Read Only

func (*GinFS) Stat

func (fs *GinFS) Stat(ctx context.Context, name string) (os.FileInfo, error)

type GinFile

type GinFile struct {
	LChange time.Time
	// contains filtered or unexported fields
}

func (*GinFile) Close

func (f *GinFile) Close() error

func (*GinFile) Read

func (f *GinFile) Read(p []byte) (int, error)

func (*GinFile) Readdir

func (f *GinFile) Readdir(count int) ([]os.FileInfo, error)

func (*GinFile) Seek

func (f *GinFile) Seek(offset int64, whence int) (int64, error)

func (GinFile) Stat

func (f GinFile) Stat() (os.FileInfo, error)

func (*GinFile) Write

func (f *GinFile) Write(p []byte) (n int, err error)

type GinFinfo

type GinFinfo struct {
	*git.TreeEntry
	LChange time.Time
}

func (GinFinfo) ModTime

func (i GinFinfo) ModTime() time.Time

func (GinFinfo) Mode

func (i GinFinfo) Mode() os.FileMode

func (GinFinfo) Sys

func (i GinFinfo) Sys() interface{}

Jump to

Keyboard shortcuts

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