Rename project to dave
This commit is contained in:
parent
99360e877a
commit
a4cf71c527
8 changed files with 39 additions and 36 deletions
29
Readme.md
29
Readme.md
|
@ -1,9 +1,9 @@
|
|||
[![Build Status](https://travis-ci.org/micromata/daffy.svg?branch=master)](https://travis-ci.org/micromata/daffy)
|
||||
[![Go Report](https://goreportcard.com/badge/github.com/micromata/daffy)](https://goreportcard.com/report/github.com/micromata/daffy)
|
||||
[![Build Status](https://travis-ci.org/micromata/dave.svg?branch=master)](https://travis-ci.org/micromata/dave)
|
||||
[![Go Report](https://goreportcard.com/badge/github.com/micromata/dave)](https://goreportcard.com/report/github.com/micromata/dave)
|
||||
|
||||
# daffy - The simple webdav server
|
||||
# dave - The simple webdav server
|
||||
|
||||
*daffy* is a simple webdav server that provides the following features:
|
||||
_dave_ is a simple webdav server that provides the following features:
|
||||
|
||||
- Single binary that runs under Windows, Linux and OSX.
|
||||
- Authentication via HTTP-Basic.
|
||||
|
@ -14,6 +14,8 @@
|
|||
|
||||
It perfectly fits if you would like to give some people the possibility to upload, download or share files with common tools like the OSX Finder, Windows Explorer or Nautilus under Linux ([or many other tools](https://en.wikipedia.org/wiki/Comparison_of_WebDAV_software#WebDAV_clients)).
|
||||
|
||||
The project name _dave_ is an abbreviation for: **D**istributed **A**uthoring and **V**ersioning made **e**asy.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Configuration](#configuration)
|
||||
|
@ -37,7 +39,8 @@ following locations for the presence of a `config.yaml` in the following
|
|||
order:
|
||||
|
||||
- The directory `./config`
|
||||
- The directory `$HOME/.daffy`
|
||||
- The directory `$HOME/.swd` (swd was the initial project name of dave)
|
||||
- The directory `$HOME/.dave`
|
||||
- The current working directory `.`
|
||||
|
||||
### First steps
|
||||
|
@ -99,9 +102,9 @@ configuration with `apache2 httpd`'s `mod_proxy`:
|
|||
|
||||
### User management
|
||||
|
||||
User management in *daffy* is very simple. Each user in the `config.yaml` MUST have a password and CAN have a subdirectory.
|
||||
User management in _dave_ is very simple. Each user in the `config.yaml` MUST have a password and CAN have a subdirectory.
|
||||
|
||||
The password must be in form of a BCrypt hash. You can generate one calling the shipped cli tool `daffycli pasdaffy`.
|
||||
The password must be in form of a BCrypt hash. You can generate one calling the shipped cli tool `davecli pasdaffy`.
|
||||
|
||||
If a subdirectory is configured for a user, the user is jailed within it and can't see anything that exists outside of this directory. If no subdirectory is configured for an user, the user can see and modify all files within the base directory.
|
||||
|
||||
|
@ -150,7 +153,7 @@ There is no need to restart the server itself, if you're editing the user or log
|
|||
|
||||
### Binary installation
|
||||
|
||||
You can check out the [releases page](https://github.com/micromata/daffy/releases) for the latest precompiled binaries.
|
||||
You can check out the [releases page](https://github.com/micromata/dave/releases) for the latest precompiled binaries.
|
||||
|
||||
### Build from sources
|
||||
|
||||
|
@ -166,7 +169,7 @@ mkdir -p $GOPATH/src/github.com/micromata/ && cd $GOPATH/src/github.com/micromat
|
|||
3. Clone the repository (or your fork)
|
||||
|
||||
```
|
||||
git clone git@github.com:micromata/daffy.git
|
||||
git clone git@github.com:micromata/dave.git
|
||||
```
|
||||
|
||||
To build and install from sources you have two major possibilites:
|
||||
|
@ -176,7 +179,7 @@ To build and install from sources you have two major possibilites:
|
|||
You can use the plain go toolchain and install the project to your `$GOPATH` via:
|
||||
|
||||
```
|
||||
cd $GOPATH/src/github.com/micromata/daffy && go install ./...
|
||||
cd $GOPATH/src/github.com/micromata/dave && go install ./...
|
||||
```
|
||||
|
||||
#### magefile
|
||||
|
@ -192,12 +195,12 @@ Please ensure you've got [mage](https://magefile.org) installed. This can be don
|
|||
Now you can call `mage install` to build and install the binaries. If you just call `mage`, you'll get a list of possible targets:
|
||||
|
||||
Targets:
|
||||
build Builds daffy and daffycli and moves it to the dist directory
|
||||
buildReleases Builds daffy and daffycli for different OS and package them to a zip file for each os
|
||||
build Builds dave and davecli and moves it to the dist directory
|
||||
buildReleases Builds dave and davecli for different OS and package them to a zip file for each os
|
||||
check Runs golint and go tool vet on each .go file.
|
||||
clean Removes the dist directory
|
||||
fmt Formats the code via gofmt
|
||||
install Installs daffy and daffycli to your $GOPATH/bin folder
|
||||
install Installs dave and davecli to your $GOPATH/bin folder
|
||||
installDeps Runs dep ensure and installs additional dependencies.
|
||||
|
||||
## Connecting
|
||||
|
|
|
@ -50,7 +50,7 @@ func ParseConfig() *Config {
|
|||
viper.SetConfigName("config")
|
||||
viper.AddConfigPath("./config")
|
||||
viper.AddConfigPath("$HOME/.swd")
|
||||
viper.AddConfigPath("$HOME/.daffy")
|
||||
viper.AddConfigPath("$HOME/.dave")
|
||||
viper.AddConfigPath(".")
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package main
|
||||
|
||||
import "github.com/micromata/daffy/cmd/daffycli/subcmd"
|
||||
|
||||
func main() {
|
||||
subcmd.Execute()
|
||||
}
|
|
@ -3,7 +3,7 @@ package main
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/micromata/daffy/app"
|
||||
"github.com/micromata/dave/app"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"golang.org/x/net/webdav"
|
||||
syslog "log"
|
7
cmd/davecli/main.go
Normal file
7
cmd/davecli/main.go
Normal file
|
@ -0,0 +1,7 @@
|
|||
package main
|
||||
|
||||
import "github.com/micromata/dave/cmd/davecli/subcmd"
|
||||
|
||||
func main() {
|
||||
subcmd.Execute()
|
||||
}
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
// RootCmd represents the base command when called without any subcommands
|
||||
var RootCmd = &cobra.Command{
|
||||
Use: "daffycli",
|
||||
Use: "davecli",
|
||||
Short: "A cli for the simple webdav server",
|
||||
}
|
||||
|
26
magefile.go
26
magefile.go
|
@ -28,7 +28,7 @@ type target struct {
|
|||
goarch string
|
||||
}
|
||||
|
||||
// Build Builds daffy and daffycli and moves it to the dist directory
|
||||
// Build Builds dave and davecli and moves it to the dist directory
|
||||
func Build() error {
|
||||
mg.Deps(InstallDeps)
|
||||
mg.Deps(Clean)
|
||||
|
@ -47,7 +47,7 @@ func Build() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// BuildReleases Builds daffy and daffycli for different OS and package them to a zip file for each os
|
||||
// BuildReleases Builds dave and davecli for different OS and package them to a zip file for each os
|
||||
func BuildReleases() error {
|
||||
mg.Deps(Clean)
|
||||
|
||||
|
@ -61,20 +61,20 @@ func BuildReleases() error {
|
|||
|
||||
for _, t := range targets {
|
||||
fmt.Printf("Building for OS %s and architecture %s\n", t.goos, t.goarch)
|
||||
daffy, daffyCli, _ := buildSpecific(t)
|
||||
dave, daveCli, _ := buildSpecific(t)
|
||||
|
||||
files := []string{
|
||||
daffy,
|
||||
daffyCli,
|
||||
dave,
|
||||
daveCli,
|
||||
"Readme.md",
|
||||
filepath.Join("examples", "config-sample.yaml"),
|
||||
}
|
||||
|
||||
archiveName := fmt.Sprintf("daffy-%s-%s.zip", t.goos, t.goarch)
|
||||
archiveName := fmt.Sprintf("dave-%s-%s.zip", t.goos, t.goarch)
|
||||
zipFiles(filepath.Join("dist", archiveName), files)
|
||||
|
||||
os.Remove(daffy)
|
||||
os.Remove(daffyCli)
|
||||
os.Remove(dave)
|
||||
os.Remove(daveCli)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -132,7 +132,7 @@ func Check() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Install Installs daffy and daffycli to your $GOPATH/bin folder
|
||||
// Install Installs dave and davecli to your $GOPATH/bin folder
|
||||
func Install() error {
|
||||
mg.Deps(InstallDeps)
|
||||
|
||||
|
@ -179,8 +179,8 @@ func buildSpecific(t target) (string, string, error) {
|
|||
env = append(env, fmt.Sprintf("GOARCH=%s", t.goarch))
|
||||
}
|
||||
|
||||
daffySource := filepath.Join("cmd", "daffy", "main.go")
|
||||
daffyExe := filepath.Join(DIST, "daffy")
|
||||
daffySource := filepath.Join("cmd", "dave", "main.go")
|
||||
daffyExe := filepath.Join(DIST, "dave")
|
||||
if t.goos == "windows" {
|
||||
daffyExe += ".exe"
|
||||
}
|
||||
|
@ -191,8 +191,8 @@ func buildSpecific(t target) (string, string, error) {
|
|||
return "", "", err
|
||||
}
|
||||
|
||||
daffyCliSource := filepath.Join("cmd", "daffycli", "main.go")
|
||||
daffyCliExe := filepath.Join(DIST, "daffycli")
|
||||
daffyCliSource := filepath.Join("cmd", "davecli", "main.go")
|
||||
daffyCliExe := filepath.Join(DIST, "davecli")
|
||||
if t.goos == "windows" {
|
||||
daffyCliExe += ".exe"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue