Documentation
¶
Index ¶
- Variables
- func JSONToMap(jsonStr string) (map[string]interface{}, error)
- func StructToJSON(v interface{}) (string, error)
- func StructToPrettyJSON(v interface{}) (string, error)
- type AListDriverInfo
- type AListDriverInfoResp
- type AListLoginResp
- type Alist
- func (a *Alist) GenerateConfigByApi() (*models.EncrtptConfig, error)
- func (a *Alist) GetCryptDriverInfo() (*AListDriverInfoResp, error)
- func (a *Alist) GetCryptSorageId() (int, error)
- func (a *Alist) GetStorageIdByName(name string) (int, error)
- func (a *Alist) GetStorageInfo(storageId int) (*StorageInfo, error)
- func (a *Alist) GetStorageInfoByName(name string) (*StorageInfo, error)
- func (a *Alist) GetStorageList() (*StorageListResp, error)
- func (a *Alist) HttpGet(url string, resp interface{}) error
- func (a *Alist) Login() (string, error)
- type Cipher
- type Config
- func (c *Config) CheckConfig() bool
- func (c *Config) GetAppConfigDir() string
- func (c *Config) GetAppConfigFile() string
- func (c *Config) GetAppDir() string
- func (c *Config) GetAppSeriesDir() string
- func (c *Config) GetHomeDir() string
- func (c *Config) GetLogDir() string
- func (c *Config) ReadConfig() (*models.EncrtptConfig, error)
- type DriverAdditionInfo
- type DriverConfig
- type StorageInfo
- type StorageInfoContent
- type StorageListResp
Constants ¶
This section is empty.
Variables ¶
View Source
var CIns = Config{}
Functions ¶
func StructToPrettyJSON ¶
将结构体转换为格式化的JSON字符串的函数
Types ¶
type AListDriverInfo ¶
type AListDriverInfoResp ¶
type AListDriverInfoResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data struct {
Common []AListDriverInfo `json:"common"`
Additional []DriverAdditionInfo `json:"additional"`
Config DriverConfig `json:"config"`
} `json:"data"`
}
type AListLoginResp ¶
type Alist ¶
func (*Alist) GenerateConfigByApi ¶
func (a *Alist) GenerateConfigByApi() (*models.EncrtptConfig, error)
func (*Alist) GetCryptDriverInfo ¶
func (a *Alist) GetCryptDriverInfo() (*AListDriverInfoResp, error)
func (*Alist) GetCryptSorageId ¶
func (*Alist) GetStorageInfo ¶
func (a *Alist) GetStorageInfo(storageId int) (*StorageInfo, error)
func (*Alist) GetStorageInfoByName ¶
func (a *Alist) GetStorageInfoByName(name string) (*StorageInfo, error)
func (*Alist) GetStorageList ¶
func (a *Alist) GetStorageList() (*StorageListResp, error)
type Config ¶
type Config struct {
HomeDir string
AppSeriesDir string
AppDir string
AppConfigDir string
AppConfigFile string
LogDir string
}
func (*Config) CheckConfig ¶
func (*Config) GetAppConfigDir ¶
func (*Config) GetAppConfigFile ¶
func (*Config) GetAppSeriesDir ¶
func (*Config) GetHomeDir ¶
func (*Config) ReadConfig ¶
func (c *Config) ReadConfig() (*models.EncrtptConfig, error)
type DriverAdditionInfo ¶
type DriverConfig ¶
type DriverConfig struct {
Name string `json:"name"`
LocalSort bool `json:"local_sort"`
OnlyLocal bool `json:"only_local"`
OnlyProxy bool `json:"only_proxy"`
NoCache bool `json:"no_cache"`
NoUpload bool `json:"no_upload"`
NeedMs bool `json:"need_ms"`
DefaultRoot string `json:"default_root"`
Alert string `json:"alert"`
}
type StorageInfo ¶
type StorageInfo struct {
Code int `json:"code"`
Message string `json:"message"`
Data StorageInfoContent `json:"data"`
}
type StorageInfoContent ¶
type StorageInfoContent struct {
Id int `json:"id"`
MountPath string `json:"mount_path"`
Order int `json:"order"`
Driver string `json:"driver"`
CacheExpiration int `json:"cache_expiration"`
Status string `json:"status"`
Addition string `json:"addition"`
Remark string `json:"remark"`
Modified string `json:"modified"`
Disabled bool `json:"disabled"`
EnableSign bool `json:"enable_sign"`
OrderBy string `json:"order_by"`
OrderDirection string `json:"order_direction"`
ExtractFolder string `json:"extract_folder"`
WebProxy bool `json:"web_proxy"`
WebdavPolicy string `json:"webdav_policy"`
DownProxyURL string `json:"down_proxy_url"`
}
type StorageListResp ¶
type StorageListResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data struct {
Content []StorageInfoContent `json:"content"`
Total int `json:"total"`
}
}
Click to show internal directories.
Click to hide internal directories.