export CommandFunc
parent
aae318028b
commit
36f039a0df
|
@ -11,10 +11,11 @@ import (
|
||||||
"github.com/mholt/caddy"
|
"github.com/mholt/caddy"
|
||||||
)
|
)
|
||||||
|
|
||||||
type commandRunner func(r *http.Request, c *Config, u *User) error
|
// CommandFunc ...
|
||||||
|
type CommandFunc func(r *http.Request, c *Config, u *User) error
|
||||||
|
|
||||||
// CommandRunner ...
|
// CommandRunner ...
|
||||||
func CommandRunner(c *caddy.Controller) (commandRunner, error) {
|
func CommandRunner(c *caddy.Controller) (CommandFunc, error) {
|
||||||
fn := func(r *http.Request, c *Config, u *User) error { return nil }
|
fn := func(r *http.Request, c *Config, u *User) error { return nil }
|
||||||
|
|
||||||
args := c.RemainingArgs()
|
args := c.RemainingArgs()
|
||||||
|
|
|
@ -24,8 +24,8 @@ type Config struct {
|
||||||
HugoEnabled bool // Enables the Hugo plugin for File Manager
|
HugoEnabled bool // Enables the Hugo plugin for File Manager
|
||||||
Users map[string]*User
|
Users map[string]*User
|
||||||
WebDavURL string
|
WebDavURL string
|
||||||
BeforeSave commandRunner
|
BeforeSave CommandFunc
|
||||||
AfterSave commandRunner
|
AfterSave CommandFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
// AbsoluteURL ...
|
// AbsoluteURL ...
|
||||||
|
|
Loading…
Reference in New Issue