Documentation
¶
Index ¶
- Constants
- Variables
- func LocalUserPath() string
- func Verify(cfg *Bootstrap) error
- type Bootstrap
- type CMDB
- type Encryption
- type FS
- type FSOwner
- type FUSE
- type FsApi
- type Loader
- type Meta
- type MinIOConfig
- type OSSConfig
- type OverwriteUser
- type S3Config
- type Storage
- type Value
- type Version
- type Webdav
- type WebdavStorageConfig
Constants ¶
View Source
const ( FsConfigGroup = "org.basenana.nanafs.fs" FsAPIConfigGroup = "org.basenana.nanafs.fs.api" AuthConfigGroup = "org.basenana.nanafs.authentication" DocConfigGroup = "org.basenana.nanafs.document" PluginConfigGroup = "org.basenana.nanafs.plugin" WorkflowConfigGroup = "org.basenana.nanafs.workflow" WebdavConfigGroup = "org.basenana.nanafs.webdav" AdminApiConfigGroup = "org.basenana.nanafs.admin.api" )
View Source
const ( MemoryMeta = "memory" SqliteMeta = "sqlite" PostgresMeta = "postgres" S3Storage = "s3" OSSStorage = "oss" MinioStorage = "minio" WebdavStorage = "webdav" LocalStorage = "local" MemoryStorage = "memory" AESEncryption = "AES" ChaCha20Encryption = "ChaCha20" )
View Source
const (
DefaultConfigBase = "nanafs.conf"
)
Variables ¶
View Source
var (
ErrNotConfigured = fmt.Errorf("no configured")
)
View Source
var FilePath string
Functions ¶
func LocalUserPath ¶
func LocalUserPath() string
Types ¶
type Bootstrap ¶
type Bootstrap struct { FUSE FUSE `json:"fuse"` Meta Meta `json:"meta"` Storages []Storage `json:"storages"` GlobalEncryption Encryption `json:"global_encryption"` FS *FS `json:"fs,omitempty"` Friday *fridayconf.Config `json:"friday,omitempty"` CacheDir string `json:"cache_dir,omitempty"` CacheSize int `json:"cache_size,omitempty"` Debug bool `json:"debug,omitempty"` }
type CMDB ¶
type CMDB interface { GetConfigValue(ctx context.Context, group, name string) (string, error) SetConfigValue(ctx context.Context, group, name, value string) error }
func NewFakeCmdb ¶
func NewFakeCmdb() CMDB
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 FsApi ¶
type FsApi struct { Enable bool `json:"enable"` Host string `json:"host"` Port int `json:"port"` Metrics bool `json:"metrics"` ServerName string `json:"server_name"` CertFile string `json:"cert_file"` KeyFile string `json:"key_file"` CaFile string `json:"ca_file"` CaKeyFile string `json:"ca_key_file"` }
type Loader ¶
type Loader interface { GetBootstrapConfig() (Bootstrap, error) InitCMDB(cmdb CMDB) error SetSystemConfig(ctx context.Context, group, name string, value any) error GetSystemConfig(ctx context.Context, group, name string) Value }
func NewConfigLoader ¶
func NewConfigLoader() Loader
func NewFakeConfigLoader ¶
type MinIOConfig ¶
type OverwriteUser ¶
type Storage ¶
type Storage struct { ID string `json:"id"` Type string `json:"type"` LocalDir string `json:"local_dir,omitempty"` S3 *S3Config `json:"s3,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
Click to show internal directories.
Click to hide internal directories.