Versions in this module Expand all Collapse all v0 v0.0.1 Nov 28, 2024 Changes in this version + const API_URL + const ClientID + const ClientSecret + const ClientVersion + const DownloadUserAgent + const FILE + const FILE_API_URL + const FOLDER + const PackageName + const RESUMABLE + const SdkVersion + const ThunderBrowserDriveSafeFolderType + const ThunderBrowserDriveSafeSpace + const ThunderBrowserDriveSpace + const ThunderDriveFolderType + const ThunderDriveSafeSpace + const ThunderDriveSpace + const UPLOAD_TYPE_RESUMABLE + const UPLOAD_TYPE_UNKNOWN + const UPLOAD_TYPE_URL + const XLUSER_API_URL + var Algorithms = []string + func BuildCustomUserAgent(deviceID, appName, sdkVersion, clientVersion, packageName string) string + func EncryptPassword(password string) string + func GetAction(method string, url string) string + type Addition struct + CaptchaToken string + Password string + RemoveWay string + SafePassword string + UseVideoUrl bool + Username string + func (i *Addition) GetIdentity() string + type CaptchaTokenRequest struct + Action string + CaptchaToken string + ClientID string + DeviceID string + Meta map[string]string + RedirectUri string + type CaptchaTokenResponse struct + CaptchaToken string + ExpiresIn int64 + Url string + type Common struct + Algorithms []string + CaptchaSign string + ClientID string + ClientSecret string + ClientVersion string + DeviceID string + DownloadUserAgent string + PackageName string + RemoveWay string + Timestamp string + UseVideoUrl bool + UserAgent string + func (c *Common) GetCaptchaSign() (timestamp, sign string) + func (c *Common) GetCaptchaToken() string + func (c *Common) RefreshCaptchaTokenAtLogin(action, userID string) error + func (c *Common) RefreshCaptchaTokenInLogin(action, username string) error + func (c *Common) Request(url, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) + func (c *Common) SetCaptchaToken(captchaToken string) + func (c *Common) SetDeviceID(deviceID string) + type CustomTime struct + func (ct *CustomTime) UnmarshalJSON(b []byte) error + type ErrResp struct + ErrorCode int64 + ErrorDescription string + ErrorMsg string + func (e *ErrResp) Error() string + func (e *ErrResp) IsError() bool + type ExpertAddition struct + Algorithms string + CaptchaSign string + CaptchaToken string + ClientID string + ClientSecret string + ClientVersion string + DeviceID string + DownloadUserAgent string + LoginType string + PackageName string + Password string + RefreshToken string + RemoveWay string + SafePassword string + SignType string + Timestamp string + UseVideoUrl bool + UserAgent string + Username string + func (i *ExpertAddition) GetIdentity() string + type FileList struct + Files []Files + FolderType int8 + Kind string + NextPageToken string + Version string + VersionOutdated bool + type Files struct + CreatedTime CustomTime + DeleteTime string + FolderType string + Hash string + ID string + IconLink string + Kind string + Md5Checksum string + Medias []struct{ ... } + ModifiedTime CustomTime + Name string + OriginalURL string + ParentID string + Size string + SortName string + Space string + ThumbnailLink string + Trashed bool + UserModifiedTime CustomTime + WebContentLink string + func (c *Files) CreateTime() time.Time + func (c *Files) GetHash() utils.HashInfo + func (c *Files) GetID() string + func (c *Files) GetName() string + func (c *Files) GetPath() string + func (c *Files) GetSize() int64 + func (c *Files) GetSpace() string + func (c *Files) IsDir() bool + func (c *Files) ModTime() time.Time + func (c *Files) Thumb() string + type Link struct + Expire time.Time + Token string + Type string + URL string + type SignInRequest struct + CaptchaToken string + ClientID string + ClientSecret string + Password string + Username string + type ThunderBrowser struct + func (x *ThunderBrowser) Config() driver.Config + func (x *ThunderBrowser) Drop(ctx context.Context) error + func (x *ThunderBrowser) GetAddition() driver.Additional + func (x *ThunderBrowser) Init(ctx context.Context) (err error) + type ThunderBrowserExpert struct + func (x *ThunderBrowserExpert) Config() driver.Config + func (x *ThunderBrowserExpert) Drop(ctx context.Context) error + func (x *ThunderBrowserExpert) GetAddition() driver.Additional + func (x *ThunderBrowserExpert) Init(ctx context.Context) (err error) + func (x *ThunderBrowserExpert) SetTokenResp(token *TokenResp) + type TokenResp struct + AccessToken string + ExpiresIn int64 + RefreshToken string + Sub string + Token string + TokenType string + UserID string + func (t *TokenResp) GetSpaceToken() string + func (t *TokenResp) GetToken() string + type UploadTaskResponse struct + File Files + Resumable struct{ ... } + UploadType string + type XunLeiBrowserCommon struct + func (xc *XunLeiBrowserCommon) Copy(ctx context.Context, srcObj, dstDir model.Obj) error + func (xc *XunLeiBrowserCommon) GetSafeAccessToken(safePassword string) (string, error) + func (xc *XunLeiBrowserCommon) IsLogin() bool + func (xc *XunLeiBrowserCommon) Link(ctx context.Context, file model.Obj, args model.LinkArgs) (*model.Link, error) + func (xc *XunLeiBrowserCommon) List(ctx context.Context, dir model.Obj, args model.ListArgs) ([]model.Obj, error) + func (xc *XunLeiBrowserCommon) Login(username, password string) (*TokenResp, error) + func (xc *XunLeiBrowserCommon) MakeDir(ctx context.Context, parentDir model.Obj, dirName string) error + func (xc *XunLeiBrowserCommon) Move(ctx context.Context, srcObj, dstDir model.Obj) error + func (xc *XunLeiBrowserCommon) Put(ctx context.Context, dstDir model.Obj, stream model.FileStreamer, ...) error + func (xc *XunLeiBrowserCommon) RefreshToken(refreshToken string) (*TokenResp, error) + func (xc *XunLeiBrowserCommon) Remove(ctx context.Context, obj model.Obj) error + func (xc *XunLeiBrowserCommon) Rename(ctx context.Context, srcObj model.Obj, newName string) error + func (xc *XunLeiBrowserCommon) Request(url string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) + func (xc *XunLeiBrowserCommon) SetRefreshTokenFunc(fn func() error) + func (xc *XunLeiBrowserCommon) SetSpaceTokenResp(spaceToken string) + func (xc *XunLeiBrowserCommon) SetTokenResp(tr *TokenResp)