filemanager

package
v0.0.0-...-165d932 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: BSD-3-Clause Imports: 27 Imported by: 0

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(srv service.List)

func (*FileManager) IsInstalled

func (f *FileManager) IsInstalled() bool

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
modules

Jump to

Keyboard shortcuts

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