Documentation
¶
Index ¶
- Variables
- func CheckFileExist(path string) bool
- func GetSavePath(path string) string
- func GetUserNameByUID(uid uint64) (username string, err error)
- func Init()
- func Reload() error
- func UpdateActiveBaiduUser() error
- type Baidu
- type PCSConfig
- func (c *PCSConfig) CheckUIDExist(uid uint64) bool
- func (c *PCSConfig) DeleteBaiduUserByUID(uid uint64) bool
- func (c *PCSConfig) GetAllBaiduUser() string
- func (c *PCSConfig) GetBaiduUserByUID(uid uint64) (*Baidu, error)
- func (c *PCSConfig) Save() error
- func (c *PCSConfig) SetBDUSS(bduss string) (username string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Config 配置信息, 由外部调用 Config = new(PCSConfig) // ActiveBaiduUser 当前百度帐号 ActiveBaiduUser *Baidu // SaveDir 保存文件的目录 SaveDir = "download/" )
Functions ¶
func GetUserNameByUID ¶
Types ¶
type Baidu ¶
type Baidu struct {
UID uint64 `json:"uid"`
Name string `json:"name"`
BDUSS string `json:"bduss"`
Workdir string `json:"workdir"`
}
func NewWithBDUSS ¶
NewWithBDUSS 检测BDUSS有效性, 同时获取百度详细信息
type PCSConfig ¶
type PCSConfig struct {
BaiduActiveUID uint64 `json:"baidu_active_uid"`
BaiduUserList []*Baidu `json:"baidu_user_list"`
MaxParallel int `json:"max_parallel"`
}
PCSConfig 配置详情
func (*PCSConfig) CheckUIDExist ¶
func (*PCSConfig) DeleteBaiduUserByUID ¶
func (*PCSConfig) GetAllBaiduUser ¶
func (*PCSConfig) GetBaiduUserByUID ¶
Click to show internal directories.
Click to hide internal directories.