修改仓库地址
This commit is contained in:
parent
5d95dd6ec2
commit
2a0681f3fe
@ -4,10 +4,10 @@
|
||||
|
||||

|
||||
|
||||
[](https://github.com/filebrowser/filebrowser/actions/workflows/main.yaml)
|
||||
[](https://github.com/yi-you/filebrowser/actions/workflows/main.yaml)
|
||||
[](https://goreportcard.com/report/github.com/filebrowser/filebrowser)
|
||||
[](http://godoc.org/github.com/filebrowser/filebrowser)
|
||||
[](https://github.com/filebrowser/filebrowser/releases/latest)
|
||||
[](https://github.com/yi-you/filebrowser/releases/latest)
|
||||
[](http://webchat.freenode.net/?channels=%23filebrowser)
|
||||
|
||||
filebrowser provides a file managing interface within a specified directory and it can be used to upload, delete, preview, rename and edit your files. It allows the creation of multiple users and each user can have its own directory. It can be used as a standalone app.
|
||||
|
||||
@ -3,8 +3,8 @@ package auth
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// Auther is the authentication interface.
|
||||
|
||||
@ -9,10 +9,10 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// MethodHookAuth is used to identify hook auth.
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// MethodJSONAuth is used to identify json auth.
|
||||
|
||||
@ -3,8 +3,8 @@ package auth
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// MethodNoAuth is used to identify no auth.
|
||||
|
||||
@ -4,9 +4,9 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// MethodProxyAuth is used to identify no auth.
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// StorageBackend is a storage backend for auth storage.
|
||||
|
||||
@ -11,9 +11,9 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
16
cmd/root.go
16
cmd/root.go
@ -21,14 +21,14 @@ import (
|
||||
v "github.com/spf13/viper"
|
||||
lumberjack "gopkg.in/natefinch/lumberjack.v2"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/diskcache"
|
||||
"github.com/filebrowser/filebrowser/v2/frontend"
|
||||
fbhttp "github.com/filebrowser/filebrowser/v2/http"
|
||||
"github.com/filebrowser/filebrowser/v2/img"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/diskcache"
|
||||
"github.com/yi-you/filebrowser/v2/frontend"
|
||||
fbhttp "github.com/yi-you/filebrowser/v2/http"
|
||||
"github.com/yi-you/filebrowser/v2/img"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -5,8 +5,8 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -6,10 +6,10 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -5,9 +5,9 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/storage/bolt/importer"
|
||||
"github.com/yi-you/filebrowser/v2/storage/bolt/importer"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -3,7 +3,7 @@ package cmd
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -3,8 +3,8 @@ package cmd
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -14,9 +14,9 @@ import (
|
||||
"github.com/spf13/pflag"
|
||||
yaml "gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/storage/bolt"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/storage/bolt"
|
||||
)
|
||||
|
||||
func checkErr(err error) {
|
||||
|
||||
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/version"
|
||||
"github.com/yi-you/filebrowser/v2/version"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@ -20,8 +20,8 @@ import (
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
)
|
||||
|
||||
const PermFile = 0644
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
)
|
||||
|
||||
// MoveFile moves file from src to dst.
|
||||
|
||||
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module github.com/filebrowser/filebrowser/v2
|
||||
module github.com/yi-you/filebrowser/v2
|
||||
|
||||
go 1.20
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"github.com/golang-jwt/jwt/v4"
|
||||
"github.com/golang-jwt/jwt/v4/request"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/runner"
|
||||
"github.com/yi-you/filebrowser/v2/runner"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
10
http/data.go
10
http/data.go
@ -7,11 +7,11 @@ import (
|
||||
|
||||
"github.com/tomasen/realip"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/runner"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/runner"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
type handleFunc func(w http.ResponseWriter, r *http.Request, d *data) (int, error)
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
)
|
||||
|
||||
type modifyRequest struct {
|
||||
|
||||
@ -10,8 +10,8 @@ import (
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/img"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/img"
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"github.com/spf13/afero"
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
)
|
||||
|
||||
var withHashFile = func(fn handleFunc) handleFunc {
|
||||
@ -79,7 +79,7 @@ var withHashFile = func(fn handleFunc) handleFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// ref to https://github.com/filebrowser/filebrowser/pull/727
|
||||
// ref to https://github.com/yi-you/filebrowser/pull/727
|
||||
// `/api/public/dl/MEEuZK-v/file-name.txt` for old browsers to save file with correct name
|
||||
func ifPathWithName(r *http.Request) (id, filePath string) {
|
||||
pathElements := strings.Split(r.URL.Path, "/")
|
||||
|
||||
@ -10,10 +10,10 @@ import (
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/filebrowser/filebrowser/v2/storage/bolt"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/storage/bolt"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func TestPublicShareHandlerAuthentication(t *testing.T) {
|
||||
|
||||
@ -11,9 +11,9 @@ import (
|
||||
|
||||
"github.com/mholt/archiver/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/fileutils"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/fileutils"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
func slashClean(name string) string {
|
||||
|
||||
@ -14,9 +14,9 @@ import (
|
||||
"github.com/shirou/gopsutil/v3/disk"
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/fileutils"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/fileutils"
|
||||
)
|
||||
|
||||
var resourceGetHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/search"
|
||||
"github.com/yi-you/filebrowser/v2/search"
|
||||
)
|
||||
|
||||
var searchHandler = withUser(func(w http.ResponseWriter, r *http.Request, d *data) (int, error) {
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
type settingsData struct {
|
||||
|
||||
@ -13,8 +13,8 @@ import (
|
||||
|
||||
"golang.org/x/crypto/bcrypt"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
)
|
||||
|
||||
func withPermShare(fn handleFunc) handleFunc {
|
||||
|
||||
@ -12,10 +12,10 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/version"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/version"
|
||||
)
|
||||
|
||||
func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys fs.FS, file, contentType string) (int, error) {
|
||||
|
||||
@ -11,7 +11,7 @@ import (
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
)
|
||||
|
||||
func tusPostHandler() handleFunc {
|
||||
|
||||
@ -11,8 +11,8 @@ import (
|
||||
"golang.org/x/text/cases"
|
||||
"golang.org/x/text/language"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
libErrors "github.com/filebrowser/filebrowser/v2/errors"
|
||||
libErrors "github.com/yi-you/filebrowser/v2/errors"
|
||||
)
|
||||
|
||||
func renderJSON(w http.ResponseWriter, _ *http.Request, data interface{}) (int, error) {
|
||||
|
||||
2
main.go
2
main.go
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/cmd"
|
||||
"github.com/yi-you/filebrowser/v2/cmd"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@ -3,7 +3,7 @@ package runner
|
||||
import (
|
||||
"os/exec"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
// ParseCommand parses the command taking in account if the current
|
||||
|
||||
@ -7,8 +7,8 @@ import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// Runner is a commands runner.
|
||||
|
||||
@ -8,7 +8,7 @@ import (
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
)
|
||||
|
||||
type searchOptions struct {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// UserDefaults is a type that holds the default values
|
||||
|
||||
@ -6,7 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
)
|
||||
|
||||
const DefaultUsersHomeBasePath = "/users"
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package settings
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// StorageBackend is a settings storage backend.
|
||||
|
||||
@ -3,7 +3,7 @@ package share
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
)
|
||||
|
||||
// StorageBackend is the interface to implement for a share storage.
|
||||
|
||||
@ -3,9 +3,9 @@ package bolt
|
||||
import (
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
type authBackend struct {
|
||||
|
||||
@ -3,11 +3,11 @@ package bolt
|
||||
import (
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// NewStorage creates a storage.Storage based on Bolt DB.
|
||||
|
||||
@ -3,7 +3,7 @@ package bolt
|
||||
import (
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
)
|
||||
|
||||
type settingsBackend struct {
|
||||
|
||||
@ -11,10 +11,10 @@ import (
|
||||
"github.com/pelletier/go-toml/v2"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
type oldDefs struct {
|
||||
|
||||
@ -3,7 +3,7 @@ package importer
|
||||
import (
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/storage/bolt"
|
||||
"github.com/yi-you/filebrowser/v2/storage/bolt"
|
||||
)
|
||||
|
||||
// Import imports an old configuration to a newer database.
|
||||
|
||||
@ -7,9 +7,9 @@ import (
|
||||
"github.com/asdine/storm/v3"
|
||||
bolt "go.etcd.io/bbolt"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/filebrowser/filebrowser/v2/storage"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/storage"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
type oldUser struct {
|
||||
|
||||
@ -4,8 +4,8 @@ import (
|
||||
"github.com/asdine/storm/v3"
|
||||
"github.com/asdine/storm/v3/q"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
)
|
||||
|
||||
type shareBackend struct {
|
||||
|
||||
@ -6,8 +6,8 @@ import (
|
||||
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
type usersBackend struct {
|
||||
|
||||
@ -3,7 +3,7 @@ package bolt
|
||||
import (
|
||||
"github.com/asdine/storm/v3"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
)
|
||||
|
||||
func get(db *storm.DB, name string, to interface{}) error {
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"github.com/filebrowser/filebrowser/v2/auth"
|
||||
"github.com/filebrowser/filebrowser/v2/settings"
|
||||
"github.com/filebrowser/filebrowser/v2/share"
|
||||
"github.com/filebrowser/filebrowser/v2/users"
|
||||
"github.com/yi-you/filebrowser/v2/auth"
|
||||
"github.com/yi-you/filebrowser/v2/settings"
|
||||
"github.com/yi-you/filebrowser/v2/share"
|
||||
"github.com/yi-you/filebrowser/v2/users"
|
||||
)
|
||||
|
||||
// Storage is a storage powered by a Backend which makes the necessary
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
module github.com/filebrowser/filebrowser/v2/tools
|
||||
module github.com/yi-you/filebrowser/v2/tools
|
||||
|
||||
go 1.20
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
)
|
||||
|
||||
// StorageBackend is the interface to implement for a users storage.
|
||||
|
||||
@ -6,9 +6,9 @@ import (
|
||||
|
||||
"github.com/spf13/afero"
|
||||
|
||||
"github.com/filebrowser/filebrowser/v2/errors"
|
||||
"github.com/filebrowser/filebrowser/v2/files"
|
||||
"github.com/filebrowser/filebrowser/v2/rules"
|
||||
"github.com/yi-you/filebrowser/v2/errors"
|
||||
"github.com/yi-you/filebrowser/v2/files"
|
||||
"github.com/yi-you/filebrowser/v2/rules"
|
||||
)
|
||||
|
||||
// ViewMode describes a view mode.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user