mirror of
https://github.com/truewhile/MeBox.git
synced 2026-09-29 03:26:37 +08:00
71bf60c69c
初始化项目
17 lines
670 B
Go
17 lines
670 B
Go
package model
|
|
|
|
// StorageConfig holds the connection settings for one external storage
|
|
// backend (Alist / S3 / WebDAV). Type column makes the row poly-typed
|
|
// — Config is a JSON blob whose shape is determined by Type.
|
|
//
|
|
// alist → {server, token}
|
|
// s3 → {endpoint, region, bucket, access_key, secret_key, force_path_style}
|
|
// webdav → {url, username, password}
|
|
type StorageConfig struct {
|
|
Base
|
|
Type string `gorm:"uniqueIndex;size:16;not null" json:"type"`
|
|
Config string `gorm:"type:text;not null" json:"-"` // ciphertext
|
|
Enabled bool `gorm:"default:true" json:"enabled"`
|
|
LastError string `gorm:"size:512" json:"last_error,omitempty"`
|
|
}
|