app

package
v0.2.55 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLogger

func InitLogger(cnf conf.Log, verbose bool)

func Run

func Run(conf conf.Conf)

Types

type Args

type Args struct {
	Host      string `arg:"-H,--host" help:"host address"`
	Port      int    `arg:"-p,--port" help:"port"`
	Username  string `arg:"-u,--user" help:"username"`
	Verbose   bool   `arg:"-v,--verbose" help:"verbose output"`
	Config    string `arg:"-c,--config" help:"config file"`
	EnabledUI bool   `arg:"--with-ui" help:"enable web ui"`
}

type AuthService

type AuthService interface {
	Authenticate(username, password string) error
	GetAuthorizedSubDir(username string) (string, error)
	GetPathPrefix(username string) (string, error)
}

type WebdavServer

type WebdavServer struct {
	AuthService AuthService
	Host        string
	Port        int
	Path        string
	FsDir       string
	Middlewares []func(http.HandlerFunc) http.HandlerFunc
}

func NewWebdavServer added in v0.1.0

func NewWebdavServer(authService AuthService, host string, port int, path string, fsDir string) *WebdavServer

func (*WebdavServer) AddMiddleware added in v0.2.35

func (s *WebdavServer) AddMiddleware(middleware func(http.HandlerFunc) http.HandlerFunc)

func (*WebdavServer) Listen

func (s *WebdavServer) Listen()

Jump to

Keyboard shortcuts

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