server

package
v0.0.0-...-d674f3f Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoSniffFileInfo

type NoSniffFileInfo struct {
	os.FileInfo
}

NoSniffFileInfo wraps any generic FileInfo interface and bypasses mime type sniffing.

func (NoSniffFileInfo) ContentType

func (w NoSniffFileInfo) ContentType(ctx context.Context) (contentType string, err error)

type Provider

type Provider struct{}

func (Provider) Daemon

func (p Provider) Daemon(ctx context.Context, app infra.Resolver)

func (Provider) Register

func (p Provider) Register(binder infra.Binder)

type Server

type Server interface {
	Start(ctx context.Context, listener net.Listener)
}

func New

func New(resolver infra.Resolver, logger log.Logger, handler *webdav.Handler, authSrv service.AuthService) Server

type WebDavDir

type WebDavDir struct {
	webdav.Dir
	NoSniff bool
}

func (WebDavDir) OpenFile

func (d WebDavDir) OpenFile(ctx context.Context, name string, flag int, perm os.FileMode) (webdav.File, error)

func (WebDavDir) Stat

func (d WebDavDir) Stat(ctx context.Context, name string) (os.FileInfo, error)

type WebDavFile

type WebDavFile struct {
	webdav.File
}

func (WebDavFile) Readdir

func (f WebDavFile) Readdir(count int) (fis []os.FileInfo, err error)

func (WebDavFile) Stat

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

Jump to

Keyboard shortcuts

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