Documentation
¶
Index ¶
- Constants
- Variables
- func LocalUserPath() string
- func Verify(cfg *Config) error
- type Api
- type Config
- type Encryption
- type FS
- type FSOwner
- type FUSE
- type Loader
- type Meta
- type MinIOConfig
- type OSSConfig
- type OverwriteUser
- type Plugin
- type Storage
- type Version
- type Webdav
- type WebdavStorageConfig
- type Workflow
Constants ¶
View Source
const ( MemoryMeta = "memory" SqliteMeta = "sqlite" PostgresMeta = "postgres" OSSStorage = "oss" MinioStorage = "minio" WebdavStorage = "webdav" LocalStorage = "local" MemoryStorage = "memory" AESEncryption = "AES" ChaCha20Encryption = "ChaCha20" )
View Source
const (
DefaultConfigBase = "nanafs.conf"
)
Variables ¶
View Source
var FilePath string
Functions ¶
func LocalUserPath ¶
func LocalUserPath() string
Types ¶
type Config ¶
type Config struct { Api Api `json:"api"` FUSE FUSE `json:"fuse"` Webdav *Webdav `json:"webdav,omitempty"` Meta Meta `json:"meta"` Storages []Storage `json:"storages"` GlobalEncryption Encryption `json:"global_encryption"` Workflow Workflow `json:"workflow"` Plugin *Plugin `json:"plugin,omitempty"` FS *FS `json:"fs,omitempty"` CacheDir string `json:"cache_dir,omitempty"` CacheSize int `json:"cache_size,omitempty"` Debug bool `json:"debug,omitempty"` }
type Encryption ¶
type FUSE ¶
type FUSE struct { Enable bool `json:"enable"` RootPath string `json:"root_path"` MountOptions []string `json:"mount_options,omitempty"` DisplayName string `json:"display_name,omitempty"` VerboseLog bool `json:"verbose_log,omitempty"` EntryTimeout *int `json:"entry_timeout,omitempty"` AttrTimeout *int `json:"attr_timeout,omitempty"` }
type Loader ¶
func NewConfigLoader ¶
func NewConfigLoader() Loader
type MinIOConfig ¶
type OverwriteUser ¶
type Storage ¶
type Storage struct { ID string `json:"id"` Type string `json:"type"` LocalDir string `json:"local_dir,omitempty"` MinIO *MinIOConfig `json:"minio,omitempty"` OSS *OSSConfig `json:"oss,omitempty"` Webdav *WebdavStorageConfig `json:"webdav,omitempty"` Encryption *Encryption `json:"encryption,omitempty"` }
type Version ¶
type Version struct { Major int `json:"major"` Minor int `json:"minor"` Patch int `json:"patch"` Release string `json:"release"` Git string `json:"git"` }
func VersionInfo ¶
func VersionInfo() Version
type Webdav ¶
type Webdav struct { Enable bool `json:"enable"` Host string `json:"host"` Port int `json:"port"` OverwriteUsers []OverwriteUser `json:"overwrite_users"` }
type WebdavStorageConfig ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.