filemanager

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2021 License: Apache-2.0 Imports: 26 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

File Manager

A GoAdmin plugin which help you build a file cloud disk.

How To

An example:

cd example
GO111MODULE=on go run main.go

login and then visit: http://localhost:9033/admin/fm/def/list

TODO

  • Customize previewer / 自定义previewer
  • Get permanent/temporary link / 获取永久/临时连接
  • Add shortcuts / 键盘快捷键
  • Check weather override / 检查是否覆盖
  • File encryption / 文件加密
  • Cloud deployment processes / 云部署流程
  • Operation rbac permission check / rbac权限判断
  • Support oss/qiniu/..., make a local driver / 支持oss/七牛等
  • CLI / cli工具
  • New Name: diskgo/diskcool(盘古)/magnego(万磁王)

Documentation

Index

Constants

View Source
const (
	Name          = "filemanager"
	TableName     = "filemanager_setting"
	ConnectionKey = "filemanager_connection"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	AllowUpload    bool   `json:"allow_upload",yaml:"allow_upload",ini:"allow_upload"`
	AllowCreateDir bool   `json:"allow_create_dir",yaml:"allow_create_dir",ini:"allow_create_dir"`
	AllowDelete    bool   `json:"allow_delete",yaml:"allow_delete",ini:"allow_delete"`
	AllowMove      bool   `json:"allow_move",yaml:"allow_move",ini:"allow_move"`
	AllowDownload  bool   `json:"allow_download",yaml:"allow_download",ini:"allow_download"`
	AllowRename    bool   `json:"allow_rename",yaml:"allow_rename",ini:"allow_rename"`
	Path           string `json:"path",yaml:"path",ini:"path"`
	Title          string `json:"title",yaml:"title",ini:"title"`
}

type FileManager

type FileManager struct {
	*plugins.Base
	// contains filtered or unexported fields
}

func NewFileManager

func NewFileManager(rootPath string, titles ...string) *FileManager

func NewFileManagerWithConfig

func NewFileManagerWithConfig(cfg Config) *FileManager

func (*FileManager) AddRoot

func (f *FileManager) AddRoot(key string, value root.Root) *FileManager

func (*FileManager) GetIndexURL

func (f *FileManager) GetIndexURL() string

func (*FileManager) GetSettingPage

func (f *FileManager) GetSettingPage() table.Generator

func (*FileManager) InitPlugin

func (f *FileManager) InitPlugin(srvList service.List)

func (*FileManager) IsInstalled

func (f *FileManager) IsInstalled() bool

func (*FileManager) SetPathValidator

func (f *FileManager) SetPathValidator(fn PathValidator) *FileManager

type PathValidator

type PathValidator func(path string) error

type Table

type Table struct {
	Id        int64
	Key       string    `xorm:"VARCHAR(100) 'key'"`
	Value     string    `xorm:"TEXT 'value'"`
	CreatedAt time.Time `xorm:"'created_at' timestamp NULL DEFAULT CURRENT_TIMESTAMP"`
	UpdatedAt time.Time `xorm:"'updated_at' timestamp NULL DEFAULT CURRENT_TIMESTAMP"`
}

func (*Table) TableName

func (*Table) TableName() string

Directories

Path Synopsis
code/golang command
modules

Jump to

Keyboard shortcuts

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