reorganize
This commit is contained in:
parent
6377b8b6bc
commit
a39b3ea010
|
@ -4,6 +4,7 @@ import (
|
||||||
"crazyfs/api/routes"
|
"crazyfs/api/routes"
|
||||||
"crazyfs/api/routes/admin"
|
"crazyfs/api/routes/admin"
|
||||||
"crazyfs/api/routes/client"
|
"crazyfs/api/routes/client"
|
||||||
|
"crazyfs/api/routes/file"
|
||||||
"crazyfs/config"
|
"crazyfs/config"
|
||||||
"crazyfs/logging"
|
"crazyfs/logging"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
@ -28,19 +29,19 @@ var httpRoutes = Routes{
|
||||||
"ListDir",
|
"ListDir",
|
||||||
"GET",
|
"GET",
|
||||||
"/api/file/list",
|
"/api/file/list",
|
||||||
routes.ListDir,
|
file.ListDir,
|
||||||
},
|
},
|
||||||
Route{
|
Route{
|
||||||
"Download",
|
"Download",
|
||||||
"GET",
|
"GET",
|
||||||
"/api/file/download",
|
"/api/file/download",
|
||||||
routes.Download,
|
file.Download,
|
||||||
},
|
},
|
||||||
Route{
|
Route{
|
||||||
"Thumbnail",
|
"Thumbnail",
|
||||||
"GET",
|
"GET",
|
||||||
"/api/file/thumb",
|
"/api/file/thumb",
|
||||||
routes.Thumbnail,
|
file.Thumbnail,
|
||||||
},
|
},
|
||||||
Route{
|
Route{
|
||||||
"Search",
|
"Search",
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package routes
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crazyfs/SharedCache"
|
"crazyfs/SharedCache"
|
|
@ -1,4 +1,4 @@
|
||||||
package routes
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crazyfs/CacheItem"
|
"crazyfs/CacheItem"
|
|
@ -1,4 +1,4 @@
|
||||||
package routes
|
package file
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
|
@ -0,0 +1,12 @@
|
||||||
|
package file
|
||||||
|
|
||||||
|
import (
|
||||||
|
"crazyfs/logging"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
|
)
|
||||||
|
|
||||||
|
var log *logrus.Logger
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
log = logging.GetLogger()
|
||||||
|
}
|
Loading…
Reference in New Issue